-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathForm6.frm
72 lines (71 loc) · 1.74 KB
/
Form6.frm
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
VERSION 5.00
Begin VB.Form Form6
BorderStyle = 1 'Fixed Single
Caption = "Form6"
ClientHeight = 975
ClientLeft = 45
ClientTop = 345
ClientWidth = 2190
LinkTopic = "Form6"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 975
ScaleWidth = 2190
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 735
Left = 120
TabIndex = 0
Top = 120
Width = 1935
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
x = InputBox("Input Number count", "Arash Hatami")
c = 0
For I = 1 To x
a = InputBox("input numbers " & I, "arash hatami")
c = c + a
Next I
d = c / x
aa = MsgBox("average is :" & " " & d, vbInformation, "result")
End Sub
Private Sub Form_Load()
Form6.Caption = "Average"
Command1.Caption = "Start"
Command1.Font = arial
Command1.FontSize = 16
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim counter As Integer
Dim I As Integer
counter = Me.Height
Do: DoEvents
counter = counter - 10
Me.Height = counter
Me.Top = (Screen.Height - Me.Height) / 2
Loop Until counter <= 10
I = 15
counter = Me.Width
Do: DoEvents
counter = counter + I
Me.Width = counter
Me.Left = (Screen.Width - Me.Width) / 2
I = I + 1
Loop Until counter >= Screen.Width
Form1.Show
Form2.Hide
Form3.Hide
Form4.Hide
Form5.Hide
Form6.Hide
Form7.Hide
Form8.Hide
Form9.Hide
End Sub