تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
مشكلة في تحجيم الفورم ؟
#8

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





تفضل


PHP كود :
Public Class Form1

    
Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgsHandles MyBase.Load

        ResizeSeup
()

    
End Sub

#Region " Resize "
    
Private Sub ResizeSeup()
        
Me.FormBorderStyle Windows.Forms.FormBorderStyle.None
        AddHandler Me
.MouseMoveAddressOf ControlMouseMoving
        Dim LabelLeftWidth 
As New Label
        Dim LabelTopHeight 
As New Label
        Dim LabelRightWidth 
As New Label
        Dim LabelBottomHeight 
As New Label
        Dim LabelRightBottom 
As New Label
        Dim LabelLeftBottom 
As New Label
        Dim LabelRightTop 
As New Label
        Dim LabelLeftTop 
As New Label
        LabelLeftWidth
.Dock DockStyle.Left
        LabelTopHeight
.Dock DockStyle.Top
        LabelRightWidth
.Dock DockStyle.Right
        LabelBottomHeight
.Dock DockStyle.Bottom
        LabelRightBottom
.Anchor AnchorStyles.Right Or AnchorStyles.Bottom
        LabelLeftBottom
.Anchor AnchorStyles.Left Or AnchorStyles.Bottom
        LabelRightTop
.Anchor AnchorStyles.Right Or AnchorStyles.Top
        LabelLeftTop
.Anchor AnchorStyles.Left Or AnchorStyles.Top
        LabelLeftWidth
.Width 6
        LabelTopHeight
.Height 6
        LabelRightWidth
.Width 6
        LabelBottomHeight
.Height 6
        LabelRightBottom
.Size = New Size(66)
        
LabelLeftBottom.Size = New Size(66)
        
LabelRightTop.Size = New Size(66)
        
LabelLeftTop.Size = New Size(66)
        
LabelRightBottom.Location = New Point(Me.Width LabelRightBottom.WidthMe.Height LabelRightBottom.Height)
        
LabelLeftBottom.Location = New Point(0Me.Height LabelLeftBottom.Height)
        
LabelRightTop.Location = New Point(Me.Width LabelRightTop.Width0)
        
LabelLeftTop.Location = New Point(00)
        
LabelLeftWidth.Cursor Cursors.SizeWE
        LabelTopHeight
.Cursor Cursors.SizeNS
        LabelRightWidth
.Cursor Cursors.SizeWE
        LabelBottomHeight
.Cursor Cursors.SizeNS
        LabelRightBottom
.Cursor Cursors.SizeNWSE
        LabelLeftBottom
.Cursor Cursors.SizeNESW
        LabelRightTop
.Cursor Cursors.SizeNESW
        LabelLeftTop
.Cursor Cursors.SizeNWSE
        AddHandler LabelLeftWidth
.MouseMoveAddressOf LabelLeftWidth_MouseMove
        AddHandler LabelTopHeight
.MouseMoveAddressOf LabelTopHeight_MouseMove
        AddHandler LabelRightWidth
.MouseMoveAddressOf LabelRightWidth_MouseMove
        AddHandler LabelBottomHeight
.MouseMoveAddressOf LabelBottomHeight_MouseMove
        AddHandler LabelRightBottom
.MouseMoveAddressOf LabelRightBottom_MouseMove
        AddHandler LabelLeftBottom
.MouseMoveAddressOf LabelLeftBottom_MouseMove
        AddHandler LabelRightTop
.MouseMoveAddressOf LabelRightTop_MouseMove
        AddHandler LabelLeftTop
.MouseMoveAddressOf LabelLeftTop_MouseMove
        Me
.Controls.Add(LabelLeftWidth)
        
Me.Controls.Add(LabelTopHeight)
        
Me.Controls.Add(LabelRightWidth)
        
Me.Controls.Add(LabelBottomHeight)
        
Me.Controls.Add(LabelRightBottom)
        
Me.Controls.Add(LabelLeftBottom)
        
Me.Controls.Add(LabelRightTop)
        
Me.Controls.Add(LabelLeftTop)
        
LabelRightBottom.SendToBack()
        
LabelLeftBottom.SendToBack()
        
LabelRightTop.SendToBack()
        
LabelLeftTop.SendToBack()
        
LabelLeftWidth.SendToBack()
        
LabelTopHeight.SendToBack()
        
LabelRightWidth.SendToBack()
        
LabelBottomHeight.SendToBack()
    
End Sub
    
Private Sub ControlMouseMoving(ByVal sender As ObjectByVal e As System.Windows.Forms.MouseEventArgs)
        Static 
xxyy As Integer
        
If e.Button Windows.Forms.MouseButtons.Left Then
            sender
.Location = New Point(sender.Location.e.xxsender.Location.e.yy)
        Else
            
xx e.yy e.Y
        End 
If
    
End Sub
    
Private Sub LabelRightWidth_MouseMove(ByVal sender As ObjectByVal e As System.Windows.Forms.MouseEventArgs)
        Static 
xx As Integer
        
If e.Button Windows.Forms.MouseButtons.Left Then
            Me
.Width Me.Width e.xx
        
Else
            
xx e.X
        End 
If
    
End Sub
    
Private Sub LabelBottomHeight_MouseMove(ByVal sender As ObjectByVal e As System.Windows.Forms.MouseEventArgs)
        Static 
yy As Integer
        
If e.Button Windows.Forms.MouseButtons.Left Then
            Me
.Height Me.Height e.yy
        
Else
            
yy e.Y
        End 
If
    
End Sub
    
Private Sub LabelLeftWidth_MouseMove(ByVal sender As ObjectByVal e As System.Windows.Forms.MouseEventArgs)
        Static 
xx As Integer
        
If e.Button Windows.Forms.MouseButtons.Left Then
            Me
.Left Me.Left e.xx
            Me
.Width Me.Width e.xx
        
Else
            
xx e.X
        End 
If
    
End Sub
    
Private Sub LabelTopHeight_MouseMove(ByVal sender As ObjectByVal e As System.Windows.Forms.MouseEventArgs)
        Static 
yy As Integer
        
If e.Button Windows.Forms.MouseButtons.Left Then
            Me
.Top Me.Top e.yy
            Me
.Height Me.Height e.yy
        
Else
            
yy e.Y
        End 
If
    
End Sub
    
Private Sub LabelRightBottom_MouseMove(ByVal sender As ObjectByVal e As System.Windows.Forms.MouseEventArgs)
        Static 
xxyy As Integer
        
If e.Button Windows.Forms.MouseButtons.Left Then
            Me
.Width Me.Width e.xx
            Me
.Height Me.Height e.yy
        
Else
            
xx e.X
            yy 
e.Y
        End 
If
    
End Sub
    
Private Sub LabelLeftBottom_MouseMove(ByVal sender As ObjectByVal e As System.Windows.Forms.MouseEventArgs)
        Static 
xxyy As Integer
        
If e.Button Windows.Forms.MouseButtons.Left Then
            Me
.Left Me.Left e.xx
            Me
.Width Me.Width e.xx
            Me
.Height Me.Height e.yy
        
Else
            
xx e.X
            yy 
e.Y
        End 
If
    
End Sub
    
Private Sub LabelRightTop_MouseMove(ByVal sender As ObjectByVal e As System.Windows.Forms.MouseEventArgs)
        Static 
xxyy As Integer
        
If e.Button Windows.Forms.MouseButtons.Left Then
            Me
.Width Me.Width e.xx
            Me
.Top Me.Top e.yy
            Me
.Height Me.Height e.yy
        
Else
            
xx e.X
            yy 
e.Y
        End 
If
    
End Sub
    
Private Sub LabelLeftTop_MouseMove(ByVal sender As ObjectByVal e As System.Windows.Forms.MouseEventArgs)
        Static 
xxyy As Integer
        
If e.Button Windows.Forms.MouseButtons.Left Then
            Me
.Left Me.Left e.xx
            Me
.Width Me.Width e.xx
            Me
.Top Me.Top e.yy
            Me
.Height Me.Height e.yy
        
Else
            
xx e.X
            yy 
e.Y
        End 
If
    
End Sub
#End Region

End Class 





السلام عليكم ورحمة الله وبركاته
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
مشكلة في تحجيم الفورم ؟ - بواسطة W XP 2003 - 15-06-13, 07:09 PM
RE: مشكلة في تحجيم الفورم ؟ - بواسطة moftah70 - 29-02-16, 07:25 PM
مشكلة في تحجيم الفورم ؟ - بواسطة dhetos - 15-06-13, 07:49 PM
مشكلة في تحجيم الفورم ؟ - بواسطة W XP 2003 - 15-06-13, 08:06 PM
مشكلة في تحجيم الفورم ؟ - بواسطة dhetos - 15-06-13, 08:14 PM
مشكلة في تحجيم الفورم ؟ - بواسطة W XP 2003 - 15-06-13, 10:17 PM
مشكلة في تحجيم الفورم ؟ - بواسطة W XP 2003 - 16-06-13, 01:53 AM
مشكلة في تحجيم الفورم ؟ - بواسطة @@أبورائد@@_mybb_import5382 - 16-06-13, 02:39 AM
مشكلة في تحجيم الفورم ؟ - بواسطة dhetos - 16-06-13, 08:26 AM
مشكلة في تحجيم الفورم ؟ - بواسطة W XP 2003 - 17-06-13, 11:00 AM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم