本文最後由 編輯部女孩 於 2016-7-18 16:44 編輯
按下"POWER"鍵
POWER燈會亮
會在班級姓名座號內顯示程式碼內的設定值
在國文英文數學空格內輸入成績
按下"傳送"鍵
平均的空格內會顯示三科平均
傳送燈會亮
然後傳送區的空格內會顯示>>> 國文多少分
英文多少分
數學多少分
平均分數多少分
按下"接收"鍵
接收燈會亮
將傳送區空格內的東西全部COPY過來接收區
然後最右邊的空格內會顯示
XX科不及格
XX科不及格
XX科不及格
不及格的科目平均分數
按下"清除"鍵
空格清除
按下"結束"鍵
視窗關閉
以上是這程式的目的
以下是我自己想的程式碼
Dim buf$
Private Sub Command1_Click()
Text1.Text = "小老婆幼幼班"
Text2.Text = "小柯柯"
Text3.Text = 9527
Shape1.FillColor = RGB(0, 255, 0)
End Sub
Private Sub Command2_Click()
Sum = Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text)
average = Sum / 3
average = Round(average, 2)
Text7.Text = average
Text8.Text = "國文 Text4 英文 Text5 數學 Text6 "Text4Text5Text6就是要顯示國文英文數學的分數,怎麼在text裡面輸入text啊?
Shape2.FillColor = RGB(255, 0, 0)
End Sub
Private Sub Command3_Click()
Text9.Text = Text8
Shape3.FillColor = RGB(255, 0, 0)
Text10.Text = ""
If Val(Text4.Text) < 60 Then
Text10.Text = "國文不及格"
End If
If Val(Text5.Text) < 60 Then
Text10.Text = "英文不及格"
End If
If Val(Text6.Text) < 60 Then
Text10.Text = "數學不及格"
End If
這裡我完全不會寫 題目是說要如果國文50分跟英文30分不及格的話,最右邊的空格內要顯示:>> 國文不及格
英文不及格
平均分數40
End Sub
Private Sub Command4_Click()
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
End Sub
Private Sub Command5_Click()
End
End Sub
Private Sub Form_Load()
End Sub
以上紅色區域有疑問
可否教我一下 |