05-03-22, 05:13 AM
وعليكم السلام
مرفق مثال في الاسفل
مرفق مثال في الاسفل
كود :
Public Class Form1
Dim xx1, xx2 As New Point
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
xx1 = Button2.Location
xx2 = Button3.Location
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Button2.Visible = True Then
Button2.Visible = False
Button3.Location = New Point(xx1)
Else
Button2.Visible = True
Button3.Location = New Point(xx2)
End If
End Sub
End Class