form ontop and closing

thursday
04-03-2003, 08:58 AM
Hi,

Im using vb.net and have form1 opening form2, where form2 is modal.

Here's some code:

Private Sub openform_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles add_hotkey.Click
Dim f2 As New Form2()
f2.ShowDialog()
End Sub

Now, when I close form2 with the top right X button on the form, my whole program shuts down.. what can i do so only form2 closes?

(im use to vb6, this vb.net is different)
thanks

Machaira
04-03-2003, 10:48 AM
VB.NET questions should be posted here - http://www.dotnetforums.net/

thursday
04-03-2003, 11:48 AM
thanks man, that's awesome. ;)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum