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
Starwing
Private Declare Function FindWindowA Lib "User32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long 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 Sub UserForm_Initialize() Dim hWnd As Long, exLong As Long, zFactor As Integer
hWnd = FindWindowA(vbNullString, Me.Caption) exLong = GetWindowLongA(hWnd, -16) If exLong And &H880000 Then SetWindowLongA hWnd, -16, exLong And -8912897 zFactor = 100 * CInt(Application.Width / Me.Width) If zFactor > 400 Then zFactor = 400 Me.Width = Application.Width Me.Height = Application.Height Me.Zoom = zFactor End Sub
"Ced" a écrit dans le message de news:
Bonjour,
Je travaille sur un écran15,4", ou un 19" et maintenant sous un 8,9"
comment faire pour que le Userform et les controls se redimensionnent en fonction de la taille de l'écran tout seul ?
Redimentionner tous les boutons en fonction de la taille d'ecran est trop long. trop de boutons.
n'existe-t-il pas une solution automatique en intégrant dans le Userform-initialize
cordialement
-- ced
Private Declare Function FindWindowA Lib "User32" (ByVal lpClassName As
String, ByVal lpWindowName As String) As Long
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 Sub UserForm_Initialize()
Dim hWnd As Long, exLong As Long, zFactor As Integer
hWnd = FindWindowA(vbNullString, Me.Caption)
exLong = GetWindowLongA(hWnd, -16)
If exLong And &H880000 Then SetWindowLongA hWnd, -16, exLong And -8912897
zFactor = 100 * CInt(Application.Width / Me.Width)
If zFactor > 400 Then zFactor = 400
Me.Width = Application.Width
Me.Height = Application.Height
Me.Zoom = zFactor
End Sub
"Ced" <personne5150@example.com> a écrit dans le message de news:
BB6BE360-16E1-462F-84F3-99AF3669E097@microsoft.com...
Bonjour,
Je travaille sur un écran15,4", ou un 19" et maintenant sous un 8,9"
comment faire pour que le Userform et les controls se redimensionnent en
fonction de la taille de l'écran tout seul ?
Redimentionner tous les boutons en fonction de la taille d'ecran est trop
long. trop de boutons.
n'existe-t-il pas une solution automatique en intégrant dans le
Userform-initialize
Private Declare Function FindWindowA Lib "User32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long 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 Sub UserForm_Initialize() Dim hWnd As Long, exLong As Long, zFactor As Integer
hWnd = FindWindowA(vbNullString, Me.Caption) exLong = GetWindowLongA(hWnd, -16) If exLong And &H880000 Then SetWindowLongA hWnd, -16, exLong And -8912897 zFactor = 100 * CInt(Application.Width / Me.Width) If zFactor > 400 Then zFactor = 400 Me.Width = Application.Width Me.Height = Application.Height Me.Zoom = zFactor End Sub
"Ced" a écrit dans le message de news:
Bonjour,
Je travaille sur un écran15,4", ou un 19" et maintenant sous un 8,9"
comment faire pour que le Userform et les controls se redimensionnent en fonction de la taille de l'écran tout seul ?
Redimentionner tous les boutons en fonction de la taille d'ecran est trop long. trop de boutons.
n'existe-t-il pas une solution automatique en intégrant dans le Userform-initialize
cordialement
-- ced
Ced
Merci
Désolé, mais mon UF sort de tous les côtés de l'écran toujours.
C'est un UF multipage. (je ne sais pas si ca a une influence ou pas).
cordialement -- ced
"Starwing" a écrit :
Private Declare Function FindWindowA Lib "User32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long 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 Sub UserForm_Initialize() Dim hWnd As Long, exLong As Long, zFactor As Integer
hWnd = FindWindowA(vbNullString, Me.Caption) exLong = GetWindowLongA(hWnd, -16) If exLong And &H880000 Then SetWindowLongA hWnd, -16, exLong And -8912897 zFactor = 100 * CInt(Application.Width / Me.Width) If zFactor > 400 Then zFactor = 400 Me.Width = Application.Width Me.Height = Application.Height Me.Zoom = zFactor End Sub
"Ced" a écrit dans le message de news:
> Bonjour, > > Je travaille sur un écran15,4", ou un 19" et maintenant sous un 8,9" > > comment faire pour que le Userform et les controls se redimensionnent en > fonction de la taille de l'écran tout seul ? > > Redimentionner tous les boutons en fonction de la taille d'ecran est trop > long. trop de boutons. > > n'existe-t-il pas une solution automatique en intégrant dans le > Userform-initialize > > cordialement > > -- > ced
Merci
Désolé, mais mon UF sort de tous les côtés de l'écran toujours.
C'est un UF multipage. (je ne sais pas si ca a une influence ou pas).
cordialement
--
ced
"Starwing" a écrit :
Private Declare Function FindWindowA Lib "User32" (ByVal lpClassName As
String, ByVal lpWindowName As String) As Long
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 Sub UserForm_Initialize()
Dim hWnd As Long, exLong As Long, zFactor As Integer
hWnd = FindWindowA(vbNullString, Me.Caption)
exLong = GetWindowLongA(hWnd, -16)
If exLong And &H880000 Then SetWindowLongA hWnd, -16, exLong And -8912897
zFactor = 100 * CInt(Application.Width / Me.Width)
If zFactor > 400 Then zFactor = 400
Me.Width = Application.Width
Me.Height = Application.Height
Me.Zoom = zFactor
End Sub
"Ced" <personne5150@example.com> a écrit dans le message de news:
BB6BE360-16E1-462F-84F3-99AF3669E097@microsoft.com...
> Bonjour,
>
> Je travaille sur un écran15,4", ou un 19" et maintenant sous un 8,9"
>
> comment faire pour que le Userform et les controls se redimensionnent en
> fonction de la taille de l'écran tout seul ?
>
> Redimentionner tous les boutons en fonction de la taille d'ecran est trop
> long. trop de boutons.
>
> n'existe-t-il pas une solution automatique en intégrant dans le
> Userform-initialize
>
> cordialement
>
> --
> ced
Désolé, mais mon UF sort de tous les côtés de l'écran toujours.
C'est un UF multipage. (je ne sais pas si ca a une influence ou pas).
cordialement -- ced
"Starwing" a écrit :
Private Declare Function FindWindowA Lib "User32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long 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 Sub UserForm_Initialize() Dim hWnd As Long, exLong As Long, zFactor As Integer
hWnd = FindWindowA(vbNullString, Me.Caption) exLong = GetWindowLongA(hWnd, -16) If exLong And &H880000 Then SetWindowLongA hWnd, -16, exLong And -8912897 zFactor = 100 * CInt(Application.Width / Me.Width) If zFactor > 400 Then zFactor = 400 Me.Width = Application.Width Me.Height = Application.Height Me.Zoom = zFactor End Sub
"Ced" a écrit dans le message de news:
> Bonjour, > > Je travaille sur un écran15,4", ou un 19" et maintenant sous un 8,9" > > comment faire pour que le Userform et les controls se redimensionnent en > fonction de la taille de l'écran tout seul ? > > Redimentionner tous les boutons en fonction de la taille d'ecran est trop > long. trop de boutons. > > n'existe-t-il pas une solution automatique en intégrant dans le > Userform-initialize > > cordialement > > -- > ced
isabelle
bonjour Ced,
voici un exemple donné par Michel Pierron : http://cjoint.com/?gzriqewebU
isabelle
Ced a écrit :
Merci
Désolé, mais mon UF sort de tous les côtés de l'écran toujours.
C'est un UF multipage. (je ne sais pas si ca a une influence ou pas).
cordialement
bonjour Ced,
voici un exemple donné par Michel Pierron :
http://cjoint.com/?gzriqewebU
isabelle
Ced a écrit :
Merci
Désolé, mais mon UF sort de tous les côtés de l'écran toujours.
C'est un UF multipage. (je ne sais pas si ca a une influence ou pas).