|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Load new Form
Hello All,
I am a very beginner at programming and im trying to make a simple calculator for a game. I have it all setup, and im just trying to link an About button to a new form. The main screen is Form1 and the About screen is Form2 I have typed: Private Sub AboutToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem1.Click Load(Form2) Form2.Show() End Sub But the program tells me that Public Event Load(sender As Object, e As System.EventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event. Could anyone help me at figuring out why this isnt working lol. Thanks in advance, BKerr |
|
#2
|
|||
|
|||
|
What version of VB?
In VB6, you don't put parentheses around the argument to the Load statement. Look up the Load documentation in the VB online documentation for more details.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Im in Visual Basic 2005 Express Edition,
where is the online documentation located at? |
|
#4
|
|||
|
|||
|
In VB6 documentation is included in the IDE, and is available online at msdn.microsoft.com/library
I suspect the VB 2005 Express has online documentation, or an online Help in the IDE. Did you try "Load Formname" (without the parentheses)? |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Load new Form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|