Professional Documents
Culture Documents
Teste
Teste
(MÓDULO)
Option Explicit
'Declare Function SetWindowLongA& Lib "User32" (ByVal hWnd&, ByVal nIndex&, ByVal
dwNewLong&)
Public Declare PtrSafe Function FindWindowA& Lib "User32" (ByVal lpClassName$, ByVal
lpWindowName$)
Public Declare PtrSafe Function GetWindowLongA& Lib "User32" (ByVal hWnd&, ByVal
nIndex&)
Public Declare PtrSafe Function SetWindowLongA& Lib "User32" (ByVal hWnd&, ByVal
nIndex&, ByVal dwNewLong&)
Public Sub InitMaxMin(mCaption As String, Optional Max As Boolean = True, Optional Min As
Boolean = True _
End Sub
(USERFORM)
'Declarações
Option Explicit
Dim Lg As Single
Dim Ht As Single
InitMaxMin Me.Caption
Ht = Me.Height
Lg = Me.Width
End Sub
If Me.Width < 300 Or Me.Height < 200 Or Fini Then Exit Sub
RtL = Me.Width / Lg
RtH = Me.Height / Ht
End Sub
Fini = True
End Sub