- 积分
- 25224
- 明经币
- 个
- 注册时间
- 2003-6-27
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2005-11-14 16:49:00
|
显示全部楼层
<RE class=Code>Utility.GetString</PRE><RE class=Code>AutoCAD里有帮助</PRE><RE class=Code>Sub Example_GetString()
' This example demonstrates different ways of returning a string
' entered by a user.
Dim returnString As String
' Prompt & Input cannot contain blanks
returnString = ThisDrawing.Utility.GetString(False, "Enter text (a space or <enter> terminates input): ")
MsgBox "The string entered was '" & returnString & "'", , "GetString Example"
' Prompt & Input can contain blanks
returnString = ThisDrawing.Utility.GetString(True, "Enter text (<enter> terminates input):")
MsgBox "The string entered was '" & returnString & "'", , "GetString Example"
' Prompt & Input can contain blanks, but not an empty string
Dim NoNull As Integer
NoNull = 1 ' Disallow null
ThisDrawing.Utility.InitializeUserInput NoNull
returnString = ThisDrawing.Utility.GetString(True, "Enter text (<enter> terminates input): ")
MsgBox "The string entered was '" & returnString & "'", , "GetString Example"
End Sub</PRE> |
|