Windows Develop Bookmark and Share   
 index > Windows Forms Sample Applications > Unable to use GetCurrentWebBrowser
 

Unable to use GetCurrentWebBrowser

When i try to use the function GetCurrentWebBrowser() so as to ascertain the current web browser for the development of tabbed Internet explorer.It does not even give an option to add the same keyword and gives a compile time error as a invalid function.Do i need to include any particular class to access this function
Pabnix  Monday, March 03, 2008 8:09 AM
Just download the sample for the link in my last post and install it, open the project, you'll find the GetCurrentWebBrowser method in the Form1.cs

private WebBrowser GetCurrentWebBrowser()
{
// This method returns the currently display WebControl.
// We use an arraylist of webpages, and find the right one by getting the index
// of the current tab.

TabPage current_tab = tabControl1.SelectedTab;
WebBrowser thiswebpage = (WebBrowser)webpages[tabpages.IndexOf(current_tab)];
return thiswebpage;
}

Zhi-Xin Ye  Sunday, March 09, 2008 1:44 PM

Hi, Pabnix

"GetCurrentWebBrowser()" is not a standard method, it must be a custom defined function, where do you getthis function?Are you working on some sample code? Where did you get it?
I justdo some search, and find thisAn Overview of Web Browser Expresssample which contains "GetCurrentWebBrowser" function, hope it helps.

Best Regards,
Zhi-xin Ye

Zhi-Xin Ye  Friday, March 07, 2008 8:28 AM

Hi Zhi

Yes i was trying to work on the same article which you mentioned. But had no idea how the function is coming. as i have checked on other sites also they all have mentioned this function. If it is custom function, how will i implement it.
Pabnix  Saturday, March 08, 2008 2:09 AM
Just download the sample for the link in my last post and install it, open the project, you'll find the GetCurrentWebBrowser method in the Form1.cs

private WebBrowser GetCurrentWebBrowser()
{
// This method returns the currently display WebControl.
// We use an arraylist of webpages, and find the right one by getting the index
// of the current tab.

TabPage current_tab = tabControl1.SelectedTab;
WebBrowser thiswebpage = (WebBrowser)webpages[tabpages.IndexOf(current_tab)];
return thiswebpage;
}

Zhi-Xin Ye  Sunday, March 09, 2008 1:44 PM

You can use google to search for other answers

Custom Search

More Threads

• WS-Security
• User Submitted Improvements
• how to publish database in my win application project
• IssueVision lookup tables bug
• How to play Local
• Is taskvision free?
• Large DataSets
• PocketVision Errors
• How to change visualization of WMP?
• Anyone know where all the Terrarium samples went ?