الساده الكرام
السلام عليكم ورحمة وبركاته
ارجو من الله ثم منكم المساعده العاجله باسرع وقت ممكن
اريد ان احرك الفوم من اي مكان من الفورم ؟؟؟؟
ايها الساده انا في انتظر الرد من طرفكم والله يوفقك الجميع
الساده الكرام
السلام عليكم ورحمة وبركاته
ارجو من الله ثم منكم المساعده العاجله باسرع وقت ممكن
اريد ان احرك الفوم من اي مكان من الفورم ؟؟؟؟
ايها الساده انا في انتظر الرد من طرفكم والله يوفقك الجميع
والكم مني فائق الاحترام
اخوكم / سالم

شوف التالي أخوي :
أو حمل المرفق
Task: Move a form that has not title bar, or one that does by clicking anywhere on form
Declarations
Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Sub ReleaseCapture Lib "User32" ()
Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2
Code
'place this code in the MouseMove event of the form
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim lngReturnValue As Long
If Button = 1 Then
Call ReleaseCapture
lngReturnValue = SendMessage(Form1.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End If
End Sub
ألا بذكر الله تطمئن القلوب
يمكنك ذلك باستخدام كل من :
mouse move event
releasecapture api
اجمع ما بين الاثنين وتحصل على ماتريد
هاك مثال ممتاز على هذا
Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Sub ReleaseCapture Lib "User32" ()
Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim lngReturnValue As Long
If Button = 1 Then
'Release capture
Call ReleaseCapture
'Send a 'left mouse button down on caption'-message to our form
lngReturnValue = SendMessage(Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End If
End Sub
Private Sub Form_Paint()
Me.Print "Click on the form, hold the mouse button and drag it"
End Sub
هذا الموضوع مغلق.
المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية
جارٍ التحقق من المتواجدين…