الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

اريد ان احرك الفوم من اي مكان من الفورم ؟؟؟؟

مغلق
بدأه if_else_2000 في 28 أكتوبر 2006 · 2 رد · 1,099 مشاهدة · في لغة Ms Visual Basic 6 وما قبلها من إصدارات
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

الساده الكرام

السلام عليكم ورحمة وبركاته

ارجو من الله ثم منكم المساعده العاجله باسرع وقت ممكن

اريد ان احرك الفوم من اي مكان من الفورم ؟؟؟؟

ايها الساده انا في انتظر الرد من طرفكم والله يوفقك الجميع

والكم مني فائق الاحترام

اخوكم / سالم

ax1.gif

#2

شوف التالي أخوي :

أو حمل المرفق

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

Form.zip

ألا بذكر الله تطمئن القلوب

#3

يمكنك ذلك باستخدام كل من :

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

هذا الموضوع مغلق.

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…