j'ai trouver comment enlever la croix d'une userform
Private Declare Function GetWindowLongA Lib "User32" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "User32" _
(ByVal hWnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Declare Function FindWindowA Lib "User32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub UserForm_Initialize()
Dim hWnd As Long
hWnd = FindWindowA("Thunder" & IIf(Application.Version Like "8*", _
"X", "D") & "Frame", Me.Caption)
SetWindowLongA hWnd, -16, GetWindowLongA(hWnd, -16) And &HFFF7FFFF
End Sub
Private Sub CmdFermer_Click()
End
End Sub
j'ai trouver comment enlever la croix de excel
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, _
ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Declare Function EnableWindow Lib "user32" (ByVal hWnd As Long, _
ByVal fEnable As Long) As Long
Private Declare Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) _
As Long
Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, _
ByVal bRevert As Long) As Long
Private Const SC_CLOSE As Long = &HF060
Private Sub CommandButton1_Click()
Dim myhWnd As Long, hMenu As Long
'Supprime la petite croix
myhWnd = FindWindow("XLMAIN", Application.Caption)
hMenu = GetSystemMenu(myhWnd, 0)
DeleteMenu hMenu, SC_CLOSE, 0&
DrawMenuBar myhWnd
End Sub
Private Sub CommandButton2_Click()
Dim myhWnd As Long, hMenu As Long
'Remet la petite croix
myhWnd = FindWindow("XLMAIN", Application.Caption)
hMenu = GetSystemMenu(myhWnd, 1)
DrawMenuBar myhWnd
End Sub
mais il reste encore une croix à enlever celle du classeur
comment faire
Merci de votre aide
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
LSteph
Bonjour,
Ca change quoi?
Alt+F4 ou Ctrl+Alt+Suppr et gestionnaire des tâches supprimer le processus ou alt+Tab
@+
-- LSteph
On 23 mar, 08:29, pedrito wrote:
Bonjour à tous j'aurais besoin d'un peut d'aide
j'ai trouver comment enlever la croix d'une userform
Private Declare Function GetWindowLongA Lib "User32" _ (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "User32" _ (ByVal hWnd As Long, ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long
Private Declare Function FindWindowA Lib "User32" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub UserForm_Initialize() Dim hWnd As Long hWnd = FindWindowA("Thunder" & IIf(Application.Version Like "8*", _ "X", "D") & "Frame", Me.Caption) SetWindowLongA hWnd, -16, GetWindowLongA(hWnd, -16) And &HFFF7FFFF End Sub
Private Sub CmdFermer_Click() End End Sub
j'ai trouver comment enlever la croix de excel
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, _ ByVal nPosition As Long, ByVal wFlags As Long) As Long Private Declare Function EnableWindow Lib "user32" (ByVal hWnd As Long, _ ByVal fEnable As Long) As Long Private Declare Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) _ As Long Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, _ ByVal bRevert As Long) As Long Private Const SC_CLOSE As Long = &HF060
Private Sub CommandButton1_Click()
Dim myhWnd As Long, hMenu As Long
'Supprime la petite croix myhWnd = FindWindow("XLMAIN", Application.Caption) hMenu = GetSystemMenu(myhWnd, 0) DeleteMenu hMenu, SC_CLOSE, 0& DrawMenuBar myhWnd End Sub
Private Sub CommandButton2_Click()
Dim myhWnd As Long, hMenu As Long
'Remet la petite croix myhWnd = FindWindow("XLMAIN", Application.Caption) hMenu = GetSystemMenu(myhWnd, 1) DrawMenuBar myhWnd
End Sub
mais il reste encore une croix à enlever celle du classeur comment faire Merci de votre aide
Pedro
Bonjour,
Ca change quoi?
Alt+F4
ou
Ctrl+Alt+Suppr et gestionnaire des tâches supprimer le processus
ou
alt+Tab
@+
--
LSteph
On 23 mar, 08:29, pedrito <pedr...@discussions.microsoft.com> wrote:
Bonjour à tous j'aurais besoin d'un peut d'aide
j'ai trouver comment enlever la croix d'une userform
Private Declare Function GetWindowLongA Lib "User32" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "User32" _
(ByVal hWnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Declare Function FindWindowA Lib "User32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub UserForm_Initialize()
Dim hWnd As Long
hWnd = FindWindowA("Thunder" & IIf(Application.Version Like "8*", _
"X", "D") & "Frame", Me.Caption)
SetWindowLongA hWnd, -16, GetWindowLongA(hWnd, -16) And &HFFF7FFFF
End Sub
Private Sub CmdFermer_Click()
End
End Sub
j'ai trouver comment enlever la croix de excel
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, _
ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Declare Function EnableWindow Lib "user32" (ByVal hWnd As Long, _
ByVal fEnable As Long) As Long
Private Declare Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) _
As Long
Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, _
ByVal bRevert As Long) As Long
Private Const SC_CLOSE As Long = &HF060
Private Sub CommandButton1_Click()
Dim myhWnd As Long, hMenu As Long
'Supprime la petite croix
myhWnd = FindWindow("XLMAIN", Application.Caption)
hMenu = GetSystemMenu(myhWnd, 0)
DeleteMenu hMenu, SC_CLOSE, 0&
DrawMenuBar myhWnd
End Sub
Private Sub CommandButton2_Click()
Dim myhWnd As Long, hMenu As Long
'Remet la petite croix
myhWnd = FindWindow("XLMAIN", Application.Caption)
hMenu = GetSystemMenu(myhWnd, 1)
DrawMenuBar myhWnd
End Sub
mais il reste encore une croix à enlever celle du classeur
comment faire
Merci de votre aide
Alt+F4 ou Ctrl+Alt+Suppr et gestionnaire des tâches supprimer le processus ou alt+Tab
@+
-- LSteph
On 23 mar, 08:29, pedrito wrote:
Bonjour à tous j'aurais besoin d'un peut d'aide
j'ai trouver comment enlever la croix d'une userform
Private Declare Function GetWindowLongA Lib "User32" _ (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "User32" _ (ByVal hWnd As Long, ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long
Private Declare Function FindWindowA Lib "User32" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub UserForm_Initialize() Dim hWnd As Long hWnd = FindWindowA("Thunder" & IIf(Application.Version Like "8*", _ "X", "D") & "Frame", Me.Caption) SetWindowLongA hWnd, -16, GetWindowLongA(hWnd, -16) And &HFFF7FFFF End Sub
Private Sub CmdFermer_Click() End End Sub
j'ai trouver comment enlever la croix de excel
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, _ ByVal nPosition As Long, ByVal wFlags As Long) As Long Private Declare Function EnableWindow Lib "user32" (ByVal hWnd As Long, _ ByVal fEnable As Long) As Long Private Declare Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) _ As Long Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, _ ByVal bRevert As Long) As Long Private Const SC_CLOSE As Long = &HF060
Private Sub CommandButton1_Click()
Dim myhWnd As Long, hMenu As Long
'Supprime la petite croix myhWnd = FindWindow("XLMAIN", Application.Caption) hMenu = GetSystemMenu(myhWnd, 0) DeleteMenu hMenu, SC_CLOSE, 0& DrawMenuBar myhWnd End Sub
Private Sub CommandButton2_Click()
Dim myhWnd As Long, hMenu As Long
'Remet la petite croix myhWnd = FindWindow("XLMAIN", Application.Caption) hMenu = GetSystemMenu(myhWnd, 1) DrawMenuBar myhWnd
End Sub
mais il reste encore une croix à enlever celle du classeur comment faire Merci de votre aide