|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Junior Member
Iscritto dal: Jul 2004
Messaggi: 2
|
VB.NET problema con 2 form
CIAO....
ho un problemino...ho creato un form e vorrei che premendo un bottone si aprisse un secondo form.... è possibile vero???' |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Apr 2001
Città: Casarsa (PN) Trieste e Navigo con FireFox! ;o)
Messaggi: 300
|
Ceeeeeeeeeeeerto che si!
devi far passare laseconda form per oggetto sul main...e a questo punto usando l'evento click del bottone fai un myForm.Load() della tua form con successivo myForm.Show() Ciao
__________________
Polcenigo rulez ![]() "Don't laugh if I, an old man, wear flower. The six strings harp is struck, the goblet passes round. Where in man's life there is a moment better than the once before a full wine-bowl." |
|
|
|
|
|
#3 |
|
Junior Member
Iscritto dal: Jul 2004
Messaggi: 2
|
....non riesco a farlo funzionare....
Ho creato un form principale... adesso devo fare in modo che quando premo un bottone si apra un form secondario che ho gia creato in precedenza... HELP! |
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Apr 2001
Città: Casarsa (PN) Trieste e Navigo con FireFox! ;o)
Messaggi: 300
|
Scusa...andiamo per passi:
1: crei il tuo bottone nel form da cui vuoi lanciare l'altro form; 2: nel codice di questo inserisci la sub per raccogliere l'evento click del tuo bottone; Codice:
Private Sub btnMyButton_Click(ByVal sender As Object, ByVal event As System.EventArgs) Handles btnMyButton.Click
' qui la frm è dichiarata locale...
'...se la vuoi pubblica la devi chiamare fuori come public!!!
Dim frm As Form2
frm = New Form2()
frm.Show()
End Sub
form...oppure devi vedere la littlex...oppure usi il trick del nascondi, ossia form2.hide() vedi tu!
__________________
Polcenigo rulez ![]() "Don't laugh if I, an old man, wear flower. The six strings harp is struck, the goblet passes round. Where in man's life there is a moment better than the once before a full wine-bowl." |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 07:49.




















