- Private Sub Command1_Click()
- Unload Me
- End Sub
-
- Private Sub Label_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
- If Button = 1 Then
- sgL = Me.Left
- sgT = Me.Top
- sgX = x
- sgY = y
- blMove = True
- ElseIf Button = 2 Then
- ' Bouton droit --> Affichage du menu
- PopupMenu Menu.mnuPopup
- End If
- End Sub
-
- Option Explicit
-
- Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, _
- ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _
- ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
-
- Private Const SWP_NOMOVE = 2
- Private Const SWP_NOSIZE = 1
- Private Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
- Private Const HWND_TOPMOST = -1
- Private Const HWND_NOTOPMOST = -2
-
- Private Sub mnuCouleur_Click()
- Dialog1.ShowColor
- End Sub
-
- Private Sub mnuImprimer_Click()
- Dialog1.ShowPrinter
- End Sub
-
- Private Sub mnuOuvrir_Click()
- 'Ouvre la boite de dialogue...
- Dialog1.ShowOpen
- End Sub
-
- Private Sub mnuQuitter_Click()
- ' Ferme les fenêtres...
- Unload Form1
- Unload Me
- End Sub
-
- Private Sub mnuSauver_Click()
- Dialog1.ShowSave
- End Sub
-
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Label_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 1 Then
sgL = Me.Left
sgT = Me.Top
sgX = x
sgY = y
blMove = True
ElseIf Button = 2 Then
' Bouton droit --> Affichage du menu
PopupMenu Menu.mnuPopup
End If
End Sub
Option Explicit
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, _
ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _
ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Const SWP_NOMOVE = 2
Private Const SWP_NOSIZE = 1
Private Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Sub mnuCouleur_Click()
Dialog1.ShowColor
End Sub
Private Sub mnuImprimer_Click()
Dialog1.ShowPrinter
End Sub
Private Sub mnuOuvrir_Click()
'Ouvre la boite de dialogue...
Dialog1.ShowOpen
End Sub
Private Sub mnuQuitter_Click()
' Ferme les fenêtres...
Unload Form1
Unload Me
End Sub
Private Sub mnuSauver_Click()
Dialog1.ShowSave
End Sub