28-11-15, 02:24 AM
28-11-15, 08:52 AM
PHP كود :
Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
'اظهار الفورم الجديد على يمين الفورم الاول
Dim frm1Width As Integer = Me.Width
If Form2.Visible = False Then
Form2.Show()
Form2.Location = New Point(Me.Location.X + frm1Width, Me.Location.Y)
Else
Form2.Hide()
End If
End Sub
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
'اظهار الفورم الجديد يسار الفورم الاول
Dim frm1Width As Integer = Me.Width
If Form3.Visible = False Then
Form3.Show()
Form3.Location = New Point(Me.Location.X - frm1Width, Me.Location.Y)
Else
Form3.Hide()
End If
End Sub
Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
'اظهار الفورم الجديد فوق الفورم الاول
Dim frm1Height As Integer = Me.Height
If Form4.Visible = False Then
Form4.Show()
Form4.Location = New Point(Me.Location.X, Me.Location.Y - frm1Height)
Else
Form4.Hide()
End If
End Sub
Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
'اظهار الفورم الجديد تحت الفورم الاول
Dim frm1Height As Integer = Me.Height
If Form5.Visible = False Then
Form5.Show()
Form5.Location = New Point(Me.Location.X, Me.Location.Y + frm1Height)
Else
Form5.Hide()
End If
End Sub
End Class
[align=center
]
[/align]28-11-15, 02:01 PM
(28-11-15, 08:52 AM)أبو عمر كتب : [ -> ]
PHP كود :
Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
'اظهار الفورم الجديد على يمين الفورم الاول
Dim frm1Width As Integer = Me.Width
If Form2.Visible = False Then
Form2.Show()
Form2.Location = New Point(Me.Location.X + frm1Width, Me.Location.Y)
Else
Form2.Hide()
End If
End Sub
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
'اظهار الفورم الجديد يسار الفورم الاول
Dim frm1Width As Integer = Me.Width
If Form3.Visible = False Then
Form3.Show()
Form3.Location = New Point(Me.Location.X - frm1Width, Me.Location.Y)
Else
Form3.Hide()
End If
End Sub
Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
'اظهار الفورم الجديد فوق الفورم الاول
Dim frm1Height As Integer = Me.Height
If Form4.Visible = False Then
Form4.Show()
Form4.Location = New Point(Me.Location.X, Me.Location.Y - frm1Height)
Else
Form4.Hide()
End If
End Sub
Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
'اظهار الفورم الجديد تحت الفورم الاول
Dim frm1Height As Integer = Me.Height
If Form5.Visible = False Then
Form5.Show()
Form5.Location = New Point(Me.Location.X, Me.Location.Y + frm1Height)
Else
Form5.Hide()
End If
End Sub
End Class
[align=center
![]()
][/align]
جزاك الله خير مع انى جربت (Form3.Location = New Point(Me.Location.X , Me.Location.Y
و لم يعمل اعتقد السبب + - Height Width