
求VB编写一个小文件
3个回答
展开全部
Private Sub Check1_Click()
Text1.FontBold = Check1.Value
End Sub
Private Sub Check2_Click()
If Check2.Value Then
Text1.ForeColor = vbMagenta
Else
Text1.ForeColor = vbBlack
End If
End Sub
Private Sub Combo1_Click()
File1.FileName = Combo1.Text
End Sub
Private Sub Combo1_KeyPress(KeyAscii As Integer)
Dim i As Integer
If KeyAscii = 13 Then
For i = 0 To Combo1.ListCount - 1
If Combo1.Text = Combo1.List(i) Then Exit Sub
Next i
Combo1.AddItem (Combo1.Text)
File1.FileName = Combo1.Text
End If
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
File1.FileName = Combo1.Text
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
Text1.Text = File1.Path + File1.FileName
End Sub
Private Sub Form_Load()
File1.Path = Dir1.Path
File1.FileName = Combo1.Text
End Sub
Private Sub Option1_Click(Index As Integer)
Text1.Font = Option1(Index).Caption
End Sub
Private Sub Option2_Click(Index As Integer)
Text1.FontSize = Option2(Index).Caption
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询