hey JMC Just wanted to say nice work I learned alot about vb.net looking through this project...
So I just wanted to say thanks...
Printable View
hey JMC Just wanted to say nice work I learned alot about vb.net looking through this project...
So I just wanted to say thanks...
I just noticed your comment on my custom TabControl Codebank submission. Thanks for that! I would be pleased to see "my" context-menu TabPages in this project!
Still, I'm not sure if my project is of much help for this. My aim was to be able to specify a different ContextMenu of your own choice to every TabPage, so you would not be limited to having the same ContextMenu on each TabPage. However, I can't see much use for different ContextMenu's in a webbrowser, they would probably be the same everywhere, in which case it would be much easier to handle the ContextMenu displaying differently (for one, you would not need to create a Designer class...).
My Tabbed MDI Editor codebank submission uses a much easier way to display a ContextMenu (one ContextMenu per TabControl, not separate per TabPage) by simply setting the TabControl's ContextMenu property, and checking for the SelectedTab in the ContextMenu_Opening event.
i am interested in the owner-drawn close buttons promised. I've managed to get something like this to work in a project i am working on, but i am unsure of the best way to go about it. I would like the "hot" effect when it's moused over (a giant close button for a media center program) but i have been unable to actually find anything besides the standard button in the owner-draw.
I've been concentrating on C# code examples for a while but I will get back to this.
um... where do I put the code?
I am new 2 VB.... just started 2day :)
k, I think I know where to put it... but....Quote:
Originally Posted by austinjf785
Nothing is happening.
You don't put the code anywhere, it is a complete project you can open and run. If you want to incorporate it into your own project, I think the meaning of this example is that you read it, try to understand what it does, and then recreate it in your own project. Once you understand how the code works you will have little trouble recreating it (especially if you keep a second instance of Visual Studio running alongside so you can peek sometimes, that's what I do!).Quote:
Originally Posted by austinjf785
Also, "nothing is happening" means nothing, you need to be more specific. I also don't think this thread is supposed to be for basic questions on this example.
Oh, okayQuote:
Originally Posted by NickThissen
NO COMMENT on the rest of it
it is acceptable to ask question about the project in the thread, but if you stray too far off topic you are risking sanctions from the moderators and a deletion of your posts. See page 1.
i want to know how to make the tabs document change to the url which the combobox navigates too and how to change the tabs respond commands like ie8 as in if i click a tab it selects it how to add a close button to the tab like ie8 and how to make add events for url to display in the bottom left hand corner like IE8 look at the pic below i want to embed this into my Web Browser please any1 Help Me
http://www.vbforums.com/images/ieimages/2009/07/1.jpg
How can I add those components to my project's toolbox? :confused:
This doesn't really have anything to do with the topic of this thread specifically. Adding items to the Toolbox is the same no matter what they are.
When you declare components in a solution they will automatically become available in the Toolbox within that solution after you build. If you want to add a component to the Toolbox permanently then you need to declare in a project that compiles to a DLL, i.e. a Class Library or Windows Control Library project. You can then add the component(s) in that DLL to the Toolbox the same way as any other DLL: by right-clicking the Toolbox or from the main menu.
Is this suppose to be able to work in Visual Basic Express 2008? I imported it but got errors, I have access to the code etc but when I debug it gives errors. Anyway I probably shouldn't need to run just find the code I am looking for, I have had a look through and have not been able to see how you handle popups/new windows being launched from a hyperlink. That is why I wanted to run the program so I could see if new windows opened up in new a tab, if so then I could look through the code to find out where you handle it. So as I can't run it, I will assume that a new window will open in a new tab and if this is the case, where should I be looking in the code for this. I can't seem to find newwindow anywhere. Could someone please point me in the right direction?
Several people have said that they get errors but noone yet has told me what the errors are so I simply can't help. I've downloaded my own attachment and successfully opened it in VS 2005 and VS 2008. I haven't tried VB Express as I no longer have it installed.
I haven't got as far as handling popups yet so I'm afraid I can't help you there, although there have definitely been posts on the topic in the VB.NET forum.
Thanks anyway. The error I get is theit says "NullReference Exception was unhandled" "Object reference not set to an instance of an object."Code:Me.tabs.AddTab()
Im getting the same error as nzwogboy.
It throws an exception at runtime
TabControl.TabPages.Add(X)
my example is add tabcontrol name it tabcontrol in properties in design name and called tabpage1 as tabpage in design name on properties
basically create new form add tabcontrol from toolbox then set its properties (design Name)should be default called tabcontrol1 call it TabControl .... then click the white window underneath go to its properties and should be called by default TabPage1 call it Tabpage ...... then go to toolbox add web browser and go to its properties should be called by default WebBrowser1 call it WebBrowser Then Add A Button double Click that Button And Add this code to that button code
On Error Resume Next
Dim X As New TabPage
X.Text = Me.ActiveBrowser.DocumentTitle
TabControl.TabPages.Add(X)
Dim Y As New WebBrowser
Y.Dock = DockStyle.Fill
X.Controls.Add(Y)
ignoring errors?
Ah ok I figured it out.
When it loaded up it didnt have a control called 'tabs' so I just added one and it worked.. Thats what you were getting at right?
Thanks guys for the help :)
its just incase the webbrowser doesnt naviagete or network unavailble due to your coding so there for the tabs will just ignore these errors and add tab
yeap i was no problem matey
there are some links that if we click on will open a new window on the internet explorer is it posible to make them open in a new tab?
i used this code to cancel links to open in new windows (IE) but what should i write where X to open the link i clicked on in a new tab?
X is the url stringCode:Private Sub currentBrowser_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles currentBrowser.NewWindow
e.Cancel = True
Me.tabs.AddTab(X)
End Sub
Hey there, it looks like you're getting on well with this sample project. I'm a young learner in programming, (really young... you'll be surprised). I've been learning quite alot about Visual Basic '08 and I have been learning for about 6 months now. I've been making alot of tabbed web browsers, and history and bookmarks.
I've made quite alot of login systems, and notepads etc (the basic microsoft programs). I've always wanted to know how to make either the link clicked in the browser open either in a new tab or in a new window. I can make the code, just I can't find the Handles to use with it.
Have you got any ideas with this JMC?
All the best,
Reece Benson
As I said previously, that's a problem I haven't tackled yet. I think it can be a bit tricky with the .NET WebBrowser control because it lacks one or two members exposed by the old ActiveX document viewer control. The WebBrowser control does have an ActiveXInstance property but I haven't worked out how to use that yet.
even in ie it doesnt do it automatically. i had this working in mine but used the com object. if i remember correctly i was cancelling navigation which stopped the new window then browsing to the blocked link in the new tab
Hey,
If anyone is interested, I have created a C# version of the latest version of the VB.Net Tabbed Web Browser. You can find it here:
http://www.vbforums.com/showthread.p...44#post3769244
It is a direct copy of the current functionality of the Tabbed Web Browser (or at least I think it is :))
Gary
I wanted to do a browser so bad I had no idea that this is a project that gets done to death. Great post anyway.
I am using vb 2008 express and I downloaded this project but various parts seem to be missing, and I get these warnings:
Could not find type 'TabbedWebBrowser.WebBrowserTabControl'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built.
and
The variable 'tabs' is either undeclared or was never assigned.
And this exception at runtime:
NullReferenceException was unhandled
Object reference not set to an instance of an object.
Please help!!! :confused: :(
Hey,
Am I right in saying that you get this error in the IDE when you try and open the MainWindow Form in design mode?
Can you take a screen shot of what you are seeing?
Gary
Opening the MainWindow Form in design mode works fine (although it does look a bit wierd). Here it is:
http://i67.servimg.com/u/f67/15/07/4...h/screen11.jpg
The exception however is when I debug it:
http://i67.servimg.com/u/f67/15/07/4...h/screen10.jpg
Does this help?
Hey,
When you opened the project in 2008 Express, did it go through a conversion process? If so, were there any errors? Did you change any of the code once you downloaded it?
The screen shot that you have shown suggests that the WebBrowserTabControl is not being found, and placed on the form surface. That is why you are getting the null reference exception.
Gary
Hey,
As a test, I have just downloaded the source code again from the original post, and opened it up in Visual Studio 2008 Team Edition, and it worked perfectly. I am just installing Visual Basic 2008 and I am going to do the same test.
Will post back once it is installed.
Gary
Bydo you mean Visual Studio 2008 Express Edition, or an edition you payed for?Quote:
Visual Studio 2008 Team Edition
Hey,
This is a higher version of Visual Studio that I get through my MSDN Subscription. It isn't free.
I have just tested the download through VB 2008 Express, and it works, so I am not sure what is going on here. Is it possible that you can zip up the folder containing the code that you are trying to run, and post it here?
Gary
Out of curiousity, can you try the download here:
http://www.vbforums.com/showthread.p...42#post3769342
This is a project which extends the work done by jmcilhinney. The one difference is that it was created in Visual Studio 2008, where as this project was created in Visual Studio 2005. There really shouldn't be any difference, but it would be interesting to see if it works for you or not.
Gary