|
发表于 2002-7-18 20:28:00
|
显示全部楼层
程序界面:(其中编辑框名为textbox1,三个命令按钮分别为
CommandButton1,CommandButton2,CommandButton3
coj3efbrjtg.jpg
------------
命令按钮的触动动作如下:
Private Sub CommandButton1_Click()
Dim TxtValue As String
TxtValue = TextBox1.Value
Me.Hide
Dim Pnt As Variant
On Error Resume Next
Pnt = ThisDrawing.Utility.GetPoint(, "请选择文字写入的位置:")
If Err 0 Then
Err.Clear
ThisDrawing.Utility.Prompt " 没有选取点,退出"
Exit Sub
End If
ThisDrawing.ModelSpace.AddText TxtValue, Pnt, 5
Unload Me
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub CommandButton3_Click()
MsgBox "乐筑天下:http://www.mjtd.com e-mail:mccad@mjtd.com"
End Sub
-------
建立一个模块做为程序的驱动主程序:
Sub main()
Load UserForm1
UserForm1.Show
End Sub |
|