Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I close a form in vb.net?

Status
Not open for further replies.

BlueBlade

Technical User
Joined
Mar 2, 2007
Messages
15
Location
US
Hi everyone, I opened a form using a java script. There is a button on the form that I want to use to close the form. I tried putting this in the Button_Click event:

Me.close() when I do this, I get an error that says that close is not a member of my application.

Then I tried me.unload(). This time I get message that says ‘Public Event Unload(sender As Object, e As System.EventArgs)’ is an event, and cannot be called directly. Use a ‘RaiseEvent’ statement to raise an event.

My question is how do I use a ‘RaiseEvent’ statement? How do I close my form using a button control?

Thanks for any help.

Blade

 
javascript sounds like asp.net. different forum for both. But both should say to not do it.

Christiaan Baes
Belgium

"My old site" - Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top