Si lo fa anche a me, credo si tratti di un bug dovuto alle GTK, si potrebbe rimediare così (forse):
Private iY As Integer
Public Sub Form_Open()
Me.Show
iY = Me.ScreenY - Screen.AvailableY
End
Public Sub Button1_Click()
If Me.Visible = True Then Me.Visible = False
Wait 1
Me.Y = iY
Me.Visible = True
End
Naturalmente, con la "soluzione" prospettata iY rimane fisso sempre e se sposti la finestra questa ritornerà all'altezza impostata in apertura.
Una soluzione accettabile potrebbe essere questa che si discosta solo al primo avvio e poi funziona bene, almeno qui.
Public Sub Button1_Click()
Dim hWindow As Window
hWindow = New Window(Me)
hWindow.Y = Me.Y
If Me.Visible = True Then Me.Visible = False
Wait 1
Me.Y = hWindow.Y
Me.Visible = True
End
:ciao:
Prego, confermo quanto dici.
Comunque la mia mente contorta mi porta a soluzioni assurde, così è decisamente più semplice ;D
Public Sub Button1_Click()
If Me.Visible = True Then Me.Visible = False
Wait 1
Me.Y = Me.ScreenY
Me.Visible = True
End