Why Doesn't My VB.NET WinForms WebBrowser Program Work?
Imports 开发者_JAVA百科System.Windows.Forms.WebBrowser
Public Class Form1
Dim browser As WebBrowser
browser.navigate("http://www.google.com")
End Class
This code will not work....
I have web programming background and trying to learn windows programming....any guide or tutorial to make the transition smoother ?
You're asking the right question, because your code show a lack of understanding of the foundational concepts of WinForms development. It looks like you're trying to do procedural programming, not object-oriented and event-driven programming, which is the paradigm used in winforms.
I would start here: http://msdn.microsoft.com/en-us/beginner/default.aspx
on the "Windows" track.
Even if you're not a beginner developer, you are a beginner to WinForms, so this is the right place to start. I have a feeling once you get past the basics, you'll have no problem with the rest.
Two things about the code you pasted there
1) It's not instantiating the object 2) You're not adding the object to the form
Here's a list of books that might help you: http://programmerworld.netfirms.com/dotnetbook/books.htm
Additionally, you can read through some tutorials at RampUp, and other resources at MSDN, or even head over to CodeProject and download some source code to see what folks are doing.
精彩评论