Advertisement
ASP_Volume3 Databases/ Data Access/ DAO/ ADO #56384

Form Show

vb6 Form.show method in vb.net

AI

Riepilogo AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Codice sorgente
original-source
I'm beginner in VB.Net, just to share some tips
Let says you have 2 form, Form_1 and Form_2. Inside Form_1 you have 1 command button called command_1. if you show Form_2 when press command_1. in VB6 just can use <br><br>
Form_2.show<br><br>
But how to do it in vb.net?<br>
Private Sub command_1_Click(ByVal Sender As Object, ByVal e as EventArgs) Handles command_1.Click <br>
Dim frm As New Form_2() <br>
frm.Show()<br>
End Sub<br>
<br>
<br>
but if you don't need to show new form2 every time you press command_1. just put your declaration outside your sub. like this<br><br>
Dim frm As New Form_2() <br>
Private Sub command_1_Click(ByVal Sender As Object, ByVal e as EventArgs) Handles command_1.Click <br>
frm.Show()<br>
End Sub<br>

Upload
Commenti originali (3)
Recuperato da Wayback Machine