ΔΑΙΚΗ ΠΛΗΡΟΦΟΡΙΚΗ 1 Επανάληψη Θεωρίας 22/1/09 Private Sub Command1_Click() Athroisma = 0 For I = 1 To VScroll1.Value Athroisma = Athroisma + I Text1.Text = Athroisma -------------------------------- Private Sub Command2_Click() metritis = 0 Do A = InputBox("Γώζε ηλικία") If (A < 0) Or (A > 100) Then MsgBox ("Έδωζερ λάθορ ηλικία") metritis = metritis + 1 Text2.Text = metritis Loop While (A < 0) Or (A > 100) ----------------------------------- Private Sub Command3_Click() I = 1 Do While (I <= VScroll1.Value) Athroisma = Athroisma + I I = I + 1 Loop Text3.Text = Athroisma Private Sub VScroll1_Change() Label1 = VScroll1.Value ----------------------------------- Private Sub Command4_Click() Dim Array1(1 To 10) As String Dim Array2(1 To 100) As Integer S = 0 Array1(1) = "Δδαθολογία" Array1(2) = "Πληποθοπική" Array1(3) = "Βοηανική"
ΑΘΡΟΙΜΑ ΣΟΙΥΕΙΧΝ ΜΟΝΟΔΙΑΣΑΣΟΤ ΠΙΝΑΚΑ For I = 2 To 100 Step 2 Array2(I) = I S = S + Array2(I) Print "To Άθποιζμα είναι" + Str(S) ΕΠΑΝΑΛΗΦΗ ΤΛΗ ΕΡΓΑΣΗΡΙΟΤ Ππόγπαμμα ανηίζηοιχο ηηρ θόπμαρ1 --------------------------------------------- Private Sub Command1_Click() Dim Array1(1 To 10) As Integer For I = 1 To 10 Array1(I) = I * 2 For K = 0 To 9 Combo1.AddItem (Str(Array1(K + 1))) ------------------------------ Private Sub Command2_Click() End ------------------------- Private Sub Command3_Click() Form2.Show form1.hide ------------------------------- Private Sub mnu_blue_click() form1.backcolor = QBColor(1) mnu_blue.enabled = False mnu_red.enabled = True ------------------------------- Private Sub mnu_red_click() form1.backcolor = QBColor(4) mnu_red.enabled = False mnu_blue.enabled = True
Ππόγπαμμα ανηίζηοιχο ηηρ θόπμαρ2 Private Sub Command1_Click() Form2.Hide form1.show ------------- Private Sub Option1_Click() If Option1.Value = True Then Label1.Caption = "Âñßóêåóôå óôï åðßðåäï1" ------------- Private Sub Option2_Click() If Option2.Value = True Then Label1.Caption = "Âñßóêåóôå óôï åðßðåäï2"
ΕΠΑΝΑΛΗΦΗ 2 ΤΛΗ ΕΡΓΑΣΗΡΙΟΤ 15/1/09 Dim dentra(10, 3) As Integer Private Sub Command1_Click() dentra(i, 1) = InputBox("Dose diametro") Do While (dentra(i, 1) < 14) Or (dentra(i, 1) > 31) dentra(i, 1) = InputBox("Ksana Dose diametro") Loop dentra(i, 2) = InputBox("dose ilikia dentrou") Do While (dentra(i, 2) < 1) Or (dentra(i, 2) > 100) dentra(i, 2) = InputBox("Ksana Dose ilikia") Loop dentra(i, 3) = InputBox("dose ipsos dentrou") Do While (dentra(i, 3) < 50) Or (dentra(i, 3) > 1000) dentra(i, 3) = InputBox("Ksana Dose ipsos") Loop Label1.Caption = i
ΓΗΜΟΚΡΙΣΔΙΟ ΠΑΝΔΠΙΣΗΜΙΟ ΘΡΑΚΗ ----------------------------- Private Sub Command10_Click() Dim sum As Integer Dim mo As Single sum = 0 sum = sum + dentra(i, 2) mo = sum / 10 MsgBox (mo) -------------------------------- Private Sub Command11_Click() Dim sum As Integer Dim mo As Single sum = 0 sum = sum + dentra(i, 3) mo = sum / 10 MsgBox (mo) ------------------------- Private Sub Command2_Click() dentra(i, 1) = 0 dentra(i, 2) = 0 dentra(i, 3) = 0 Label1.Caption = 0 MsgBox ("O pinakas Midenistike") --------------------------- Private Sub Command3_Click()
Dim max As Integer max = 10 thesi = 0 If dentra(i, 1) > max Then max = dentra(i, 1) thesi = i MsgBox (max) --------------------- Private Sub Command4_Click() Dim max As Integer max = 0 thesi = 0 If dentra(i, 2) > max Then max = dentra(i, 2) thesi = i MsgBox (max) ---------------------------- Private Sub Command5_Click() Dim max As Integer max = 45 thesi = 0 If dentra(i, 3) > max Then max = dentra(i, 3) thesi = i
MsgBox (max) ----------------------------- Private Sub Command6_Click() Dim min As Integer min = 35 If dentra(i, 1) < min Then min = dentra(i, 1) thesi = i MsgBox (min) --------------------------- Private Sub Command7_Click() Dim min As Integer min = 110 If dentra(i, 2) < min Then min = dentra(i, 2) MsgBox (min) -------------------------------- Private Sub Command8_Click() Dim min As Integer min = 1200 If dentra(i, 3) < min Then min = dentra(i, 3) MsgBox (min) ---------------------------------- Private Sub Command9_Click() Dim sum As Integer Dim mo As Single
sum = 0 sum = sum + dentra(i, 1) mo = sum / 10 MsgBox (mo) ------------------