neonburner Posted April 16, 2003 Posted April 16, 2003 (edited) hey , first off am stumbling from vb6 to .net , i want 2 close an instance of a form how would i do this? heres what i got goin Private Sub TB1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles TB1.ButtonClick Dim frm As New Form2() Select Case TB1.Buttons.IndexOf(e.Button) Case 0 frm .Show() Case 1 frm .Dispose() End Select End Sub Edited April 16, 2003 by Robby Quote
*Gurus* divil Posted April 17, 2003 *Gurus* Posted April 17, 2003 You'll have to declare frm outside the scope of that method. That way you'll be referring to the same instance of the form. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.