-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm8.vb
55 lines (46 loc) · 2.13 KB
/
Form8.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Imports System.IO
Public Class Form8
Dim drag As Boolean = False
Dim mousex As Integer, mousey As Integer
Private Sub Panel1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseUp
drag = False
End Sub
Private Sub Panel1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown
drag = True
mousex = Windows.Forms.Cursor.Position.X - Me.Left
mousey = Windows.Forms.Cursor.Position.Y - Me.Top
End Sub
Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
If drag Then
Me.Left = Windows.Forms.Cursor.Position.X - mousex
Me.Top = Windows.Forms.Cursor.Position.Y - mousey
End If
End Sub
Private Sub Form8_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
drag = False
End Sub
Private Sub Form8_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
drag = True
mousex = Windows.Forms.Cursor.Position.X - Me.Left
mousey = Windows.Forms.Cursor.Position.Y - Me.Top
End Sub
Private Sub Form8_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
If drag Then
Me.Left = Windows.Forms.Cursor.Position.X - mousex
Me.Top = Windows.Forms.Cursor.Position.Y - mousey
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If CheckBox1.Checked = True Then
If TextBox1.Text <> vbNullString Or TextBox3.Text <> vbNullString Then
File.WriteAllText(".\users\" + TextBox1.Text + ".txt", TextBox3.Text)
Me.Close()
End If
End If
End Sub
Private Sub Form8_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click
Me.Close()
End Sub
End Class