First if someone could explain a little bit about what that means to me. But most importantly I need to know how to code those withevents variables into the 3 different sections of the part of the code that needs it. I am pretty new so I don't know much really at all.
Here are the bits of code that need the variables. I've underlined the parts which VB Express underlines and then when you put the cursor over it it shows the error. Also all their errors except for one is this:
Quote
Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
The other error is PCPrint is not defined which I kind of understand but have no idea how to fix, so if someone could help me with that one after these WithEvents things are resolved that would be great!
First bit of code:
Private Sub NewWindowToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles [u]NewWindowToolStripMenuItem[/u].Click
Dim f2 As New Form
WebBrowser1.Navigate("http://www.sbhweb.co.nr")
f2.Show()
End Sub
Second bit of code:
Private Sub printToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles [u]printToolStripMenuItem[/u].Click
Dim printer As New [u]PCPrint[/u]()
printer.PrinterFont = New Font("Verdana", 10)
printer.TextToPrint = TextBox1.Text
printer.Print()
End Sub
Third error is like I said PCPrint is not defined, and it is the underlined word in the section of code above.
Fourth and final bit of code:
Private Sub SourceToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles [u]SourceToolStripMenuItem1[/u].Click Me.Show() End Sub
I'm sorry if this is a lot but I'd really like to get these errors solved. I don't understand it and would really like to if someone could teach me. I'd like help as fast as anyone could help me and I don't care who does. Sorry if it's a lot!
If you need anything else let me know.

New Topic/Question
Reply




MultiQuote







|