Autres userform fullscreen ou normal sans api problème avec zoom

patricktoulon

XLDnaute Barbatruc
Bonjour a tous
j'ai un soucis avec zoom dans un userform
j'ai une sub dans le userform pour le mettre en plein écran ou le remettre a l'initial ( a condition que l'application soit fullscreen )
problème des que je fait un zoom lors de la remise a l'initiale il ne revient pas a sa position mais il reprend sa taille initiale
alors c'est très étonnant car le zoom a rien a voir avec le redimensionnement ou la position du Userform

VB:
Sub fullscreen()
    Static POS(1 To 4)
    Dim ha#
    Dim coeef#, newH#, newW#, EpCadre#, EpCaption#, oldWstate&
    EpCadre = (Me.Width - Me.InsideWidth)
    EpCaption = (Me.Height - Me.InsideHeight)
    ha = Application.Height - (EpCaption - EpCadre)
    wa = Application.Width - (EpCaption - EpCadre)
    If POS(1) = 0 Then POS(3) = Me.Width: POS(4) = Me.Height
    If Me.Height <> ha Then POS(1) = Me.Left: POS(2) = Me.Top:

    If Me.Height = POS(4) Then
        Me.Move EpCadre, EpCadre, wa, ha
    'Me.Zoom = Application.Min(100 * (Me.Height / POS(4)), 400)
    Else
     ' Me.Zoom = 100
     Me.Move POS(1), POS(2), POS(3), POS(4)
      End If
BtLarge.Left = Me.InsideWidth - (BtLarge.Width + 10)
End Sub


Private Sub BtLarge_Click()'bouton '
fullscreen
End Sub
 
Dernière édition:

Discussions similaires

Membres actuellement en ligne

Statistiques des forums

Discussions
312 321
Messages
2 087 265
Membres
103 501
dernier inscrit
talebafia