ListBox相关属性:;;
在属性窗口中设置列表框的list属性,按ctrl+回车表示输入下一个项目
相关代码如下:
Private Sub C1_Click()
Form1.Picture = LoadPicture("k:\fjexam95\jztx.bmp")
End Sub
Private Sub C2_Click()
Form1.Picture = LoadPicture("")
End Sub
标签控件属性:;;
滚动条控件属性:;;;
菜单编辑器按钮:
将菜单降级为子菜单按钮:
相关代码如下:
Private Sub Add_Click()
Label1.Caption = Val(Text1.Text) + Val(Text2.Text)
End Sub
Private Sub Sub_Click()
Label1.Caption = Val(Text1.Text) - Val(Text2.Text)
End Sub
Private Sub Clean_Click()
Label1.Caption = ""
Text1.Text = ""
Text2.Text = ""
End Sub
相关代码如下:
Private Sub Command1_Click()
Text1.Visible = False
End Sub
Private Sub Command2_Click()
Text1.Visible = True
Text1.Text = "VB程序设计"
End Sub
Private Sub Form_Click()
Timer1.Interval = 0
End Sub
Private Sub Timer1_Timer()
L1.Caption = L1.Caption + 1
End Sub
标签控件属性:名称---L1
Caption---0,BorderStyle---1
计时器控件属性:Interval---2000
Shape控件属性:;;;
;
Form属性:
Private Sub Command1_Click()
Timer1.Interval = 500
End Sub
Private Sub Timer1_Timer()
If Val(Text1.Text) > 0 Then Text1.Text = Text1.Text - 1
If Text1.Text = 0 Then Timer1.Interval = 0
End Sub
Private Sub Command1_Click()
List2.AddItem List1.Text
End Sub
Private Sub Command2_Click()
MsgBox "你共选修了" & List2.ListCount & "门课程"
End Sub
相关属性:;;
Private Sub Form_Load()
Timer1.Enabled = False
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Label1.Caption = "00:00:00"
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Format(Time, "hh:mm:ss")
End Sub
Private Sub Command1_Click()
Picture1.Cls
Picture1.Line (0, 0)-(1800, 1100)
End Sub
Private Sub Command2_Click()
Picture1.Cls
Picture1.Circle (900, 550), 300, , , , 2
End Sub
;
Private Sub Command1_Click()
Text2.Text = Text1.SelText
End Sub
Private Sub Command1_Click()
List1.AddItem Text1.Text
List2.AddItem Len(Trim(Text1.Text))
Text1.SetFocus
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
End Sub
;;
Label控件属性:AutoSize—true;
Text属性:Heigh—600;Width—3000;MultiLine---True;ScrollBars—1-Horizontal
Priva