Skip to content
Loading
  • Ananth G
    +1
    ya its possible
     
     
     
     
    ----------- If My answer is correct , you will accept it . it help to others------------------
    +1
  • Ananth G
    +1
    @dinesh santhalingam 2 years before i am developing windows application. we are using highchart in winform ..
    +1
  • Ananth G
    0
    Output image
     
    1. ///   
    2.        /// Its Constructor.  
    3.        ///   
    4.        public Form1()  
    5.        {  
    6.            InitializeComponent();  
    7.             
    8.        }  
    9.   
    10.        void Form1_Load(object sender, EventArgs e)  
    11.        {  
    12.            //In below written code i have to get the current directory of this applicaton.  
    13.            string CurrentDirectory = Directory.GetCurrentDirectory();  
    14.            //Here i have to call html page using navigate method.Its mandetory to call   
    15.            //navigate method when you have to fire web  
    16.            //browser Document Completed event.  
    17.            webBrowser1.Navigate(Path.Combine(CurrentDirectory, "HTMLPage1.htm"));  
    18.        }  
    19.   
    20.         
    21.        ///   
    22.        /// here i have to Call javascript method.  
    23.        ///   
    24.        ///   
    25.        ///   
    26.   
    27.        private void btnCallFunction_Click(object sender, EventArgs e)  
    28.        {  
    29.            webBrowser1.Document.InvokeScript("ShowMessage");  
    30.        }  
    31.   
    32.   
    33.        ///   
    34.        ///here i have to  Call parametrize java script function.  
    35.        ///   
    36.        ///   
    37.        ///   
    38.        private void btnCallParametrizeFunction_Click(object sender, EventArgs e)  
    39.        {  
    40.            if (string.IsNullOrEmpty(txtInput.Text)) { MessageBox.Show("Please Type your message in Textbox before click on Button."); return; }  
    41.            webBrowser1.Document.InvokeScript("ShowMessageParametrizeFunction",new string[]{txtInput.Text.Trim()});  
    42.        }  
    0
  • Ananth G
    0
    refer 
    http://www.c-sharpcorner.com/uploadfile/7d3362/use-javascript-function-in-window-application-c-sharp1/ 
    0