Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
'in Module1... Public Sub main(ByJava args() As String) Dim myArgs() As String myArgs = args Form1.SetDefaultClose() Form1.Parent.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE) Form1.Show() End Sub 'in your Form... Public Sub Form_Unload(cancel As Integer) If MsgBox ("Quit?", vbCritical Or vbOKCancel,"Title") = 2 Then Exit Sub Me.Parent.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE) End Sub |
This post has been edited 1 times, last edit by "fomaxrge" (Sep 26th 2012, 7:37am)
Jabaco Source |
|
1 2 3 4 5 |
'in my Form... Public Sub Form_Unload(cancel As Integer) If MsgBox ("Quit?", vbCritical Or vbOKCancel,"Title") = 2 Then Exit Sub Me.Parent.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE) End Sub |
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 |
Public Form1 As New laoding_form 'in Module1... Public Sub main(ByJava args() As String) Dim myArgs() As String myArgs = args Form1.SetDefaultClose() Form1.Parent.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE) Form1.Show() End Sub |
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 |
'in my Form... Public Sub Form_Unload(cancel As Integer) If MsgBox ("Quit?", vbCritical Or vbOKCancel,"Title") = 2 Then Exit Sub Me.Parent.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE) End Sub |
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
Public Form1 As New main_form 'in Module1... Public Sub main(ByJava args() As String) Dim myArgs() As String myArgs = args Form1.SetDefaultClose() Form1.Parent.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE) Form1.Show() End Sub |
Jabaco Source |
|
1 2 3 4 |
Public Sub Form_Unload(cancel As Integer) Form1.Visible = True Form1.Show End Sub |
Jabaco Source |
|
1 2 3 4 |
Public Sub Form_Unload(cancel As Integer) If MsgBox ("Quit?", vbCritical Or vbOKCancel,"Title") = 2 Then Exit Sub Me.Parent.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE) End Sub |
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Public Form1 As New main_form Public Form2 As New loading_form 'in Module1... Public Sub main(ByJava args() As String) Dim myArgs() As String myArgs = args Form1.Visible = False Form1.SetDefaultClose() Form2.Show Form1.Parent.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE) End Sub |
Beginner
Date of registration: Feb 27th 2014
Location: Supanburi ,Thailand
Occupation: Agric Chemical Seller
Hobbies: learning programming and English
This post has been edited 3 times, last edit by "Theera" (Mar 2nd 2014, 7:41am)
Theera, use Dani's sample. Start there, that produces the effect that you want. Then add your command buttons and functionality.Hi all,
I need the form to ask when I click the x button which the right-top conner of the windows. How to code in Sub Form_Unload or Module1?
Other cases,I can do.