منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : طلب كود تثبيت البرنامج لا يتحرك TOP MOST
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
طلب كود تثبيت البرنامج لا يتحرك TOP MOST
اجعل خاصية Top Most الخاصة بالفورم True
ثانيا : اجعل الفورم بدون اطار
اجعل خاصية Top Most الخاصة بالفورم True
كود :
Me.TopMost = True
ثانيا : اجعل الفورم بدون اطار
كود :
formborderstyle=none
ثالث : اذا اردت تحريك الفورم تفضل الكود

كود :
'Declare the variables
    Dim drag As Boolean
    Dim mousex As Integer
    Dim mousey As Integer

    Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
        drag = True 'Sets the variable drag to true.
        mousex = Windows.Forms.Cursor.Position.X - Me.Left 'Sets variable mousex
        mousey = Windows.Forms.Cursor.Position.Y - Me.Top 'Sets variable mousey
    End Sub

    Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
        'If drag is set to true then move the form accordingly.
        If drag Then
            Me.Top = Windows.Forms.Cursor.Position.Y - mousey
            Me.Left = Windows.Forms.Cursor.Position.X - mousex
        End If
    End Sub

    Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
        drag = False 'Sets drag to false, so the form does not move according to the code in MouseMove
    End Sub
جزاكم الله خير وعمت الفائدة