وعليكم السلام 🙂
ما فهمت قصدك في سبب اختفاء النموذج !!
اما بالنسبة الى الامر MoveandSize ن فيجب ادخال القيم تويبس Twips ، وهذا يعتمد على اعدادات الوندوز في جهازك ،
1 سم = 567 تويبس
1 بوصة = 1440 تويبس
1 بكسل = 15 تويبس
وهذه الوحدة النمطية تعطيك حجم الشاشة بالبكسل:
Option Compare Database
Option Explicit
Type RECT
x1 As Long
y1 As Long
x2 As Long
y2 As Long
End Type
#If VBA7 Then
Declare PtrSafe Function GetDesktopWindow Lib "user32" () As LongPtr
Declare PtrSafe Function GetWindowRect Lib "user32" (ByVal hwnd As LongPtr, lpRect As RECT) As Long
Dim hwnd As LongPtr
#Else
Declare Function GetDesktopWindow Lib "user32" () As Long
Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, rectangle As RECT) As Long
Dim hwnd As Long
#End If
Function GetScreenResolution() As String
Dim R As RECT
'Dim hwnd As Long
Dim RetVal As Long
hwnd = GetDesktopWindow()
RetVal = GetWindowRect(hwnd, R)
GetScreenResolution = (R.x2 - R.x1) & "x" & (R.y2 - R.y1)
End Function
.
جعفر