XL 2016 Minimisez et maximisez

patricktoulon

XLDnaute Barbatruc
re
on ajoute donc les boutons manquants dans la caption du UserForm
dans le module du Userform
VB:
Option Explicit
#If VBA7 Then
    Private Declare ptrsafe Function fwa Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Longptr
    Private Declare ptrsafe Function SetWindowLongA Lib "user32" (ByVal hwnd As Longptr, ByVal nIndex As Long, ByVal dwNewLong As Long) As Longptr
Dim handle As longptr
#Else
    Private Declare Function fwa Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Dim handle As Long
#End If
Private Sub UserForm_Activate()
    handle = fwa(vbNullString, Me.Caption)
    SetWindowLongA handle, -16, &H94CF0080                      'complete caption
End Sub
 

Yves Béchard

XLDnaute Nouveau
re
on ajoute donc les boutons manquants dans la caption du UserForm
dans le module du Userform
VB:
Option Explicit
#If VBA7 Then
    Private Declare ptrsafe Function fwa Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Longptr
    Private Declare ptrsafe Function SetWindowLongA Lib "user32" (ByVal hwnd As Longptr, ByVal nIndex As Long, ByVal dwNewLong As Long) As Longptr
Dim handle As longptr
#Else
    Private Declare Function fwa Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Dim handle As Long
#End If
Private Sub UserForm_Activate()
    handle = fwa(vbNullString, Me.Caption)
    SetWindowLongA handle, -16, &H94CF0080                      'complete caption
End Sub


Merci j’essais et je te reviens plus tard .....
 

Yves Béchard

XLDnaute Nouveau
re
on ajoute donc les boutons manquants dans la caption du UserForm
dans le module du Userform
VB:
Option Explicit
#If VBA7 Then
    Private Declare ptrsafe Function fwa Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Longptr
    Private Declare ptrsafe Function SetWindowLongA Lib "user32" (ByVal hwnd As Longptr, ByVal nIndex As Long, ByVal dwNewLong As Long) As Longptr
Dim handle As longptr
#Else
    Private Declare Function fwa Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Dim handle As Long
#End If
Private Sub UserForm_Activate()
    handle = fwa(vbNullString, Me.Caption)
    SetWindowLongA handle, -16, &H94CF0080                      'complete caption
End Sub

Bonjour !!!!

Ca ne fonctionne pas probablement et surment je ne comprend pas

je tenvoie mon fichier

Merci
 

Pièces jointes

  • Logiciel_DTT_Canada.xlsm
    277 KB · Affichages: 7

patricktoulon

XLDnaute Barbatruc
re
ben moi aussi je pige pas
le mot de passe?
mon code n'y est pas (dans aucun de tes userforms???
:rolleyes:

je l'ai modifié et mis a tous tes userforms
ca fonctionne en 32 bits
demo3.gif
 

Pièces jointes

  • Logiciel_DTT_Canada.xlsm
    282.7 KB · Affichages: 11
Dernière édition:

Yves Béchard

XLDnaute Nouveau
Merci

Je comprend mieux

2 Dernières questions
Maintenant quel est le code pour ètre capable d'en minimiser plusieurs a la fois c'est a dire n'en minimiser un et etre capabler d'en ouvrire un autre
Et pourquoi quand je me conecte jouvre sur ma deuxieme feuille ( Inventaire ) et non la premiere qui est ( Content )

J'ai créer un admin ( Yves ) Password (YB05cb21&07)
et Calole Password 110893AC ceci etais pour masquer les feuilles .....

Merci encore ......
 

Statistiques des forums

Discussions
311 725
Messages
2 081 945
Membres
101 849
dernier inscrit
florentMIG