易截截图软件、单文件、免安装、纯绿色、仅160KB

VB如何判断一个控件是否文本框

VB如何判断一个控件是否文本框,是否是组合框?
找到答案,结贴

TypeOf


接分.

VB code:

dim o
for each o in controls
debug.print typename(o)
next



典型的倒分贴!

5楼正解!

If TypeOf 可以判断传入过程的控件是否为一文本框。

Sub ControlProcessor(MyControl As Control)
  If TypeOf MyControl Is CommandButton Then
      Debug.Print "You passed in a " & TypeName(MyControl)
  ElseIf TypeOf MyControl Is CheckBox Then
      Debug.Print "You passed in a " & TypeName(MyControl)
  ElseIf TypeOf MyControl Is TextBox Then
      Debug.Print "You passed in a " & TypeName(MyControl)
  End If
End Sub



引用
典型的倒分贴!

我得顶罪了

typename


相关问答:

vb如何调用Illustrator(此前Illustrator未启动)?

请教一下:我用vb写了一个调用Illustrator的测试程序,代码很简单:Private Sub Command1_Click()
Dim app As New Illustrator.Application
Dim doc As Illustrator.Document
Dim thislayer As Illustrator.Layer ......

vb中可选参数的问题

function multi(a as integer,b as integer,optional third)
  dim n as integer
  n = a * b
if not ismissing (third) then
    n = n * thid
end if
multi = n
end fu ......

VB文件操作

Private Sub Command1_Click()

    Dim m As Integer    '接受文本框一的数值
    Dim n As Integer  '接受文本框二的数值
    Dim k As Integ ......

用VB怎么实现这个程序的效果?

http://fp4bmg.blu.livefilestore.com/y1puHZBDomGJQ0ZKvUHtHvs9UMTPyGyBKdtOcqSsOql5HP0H4DRb1AJ1x33StdnOVzNQu-gRirIC9mqWIqvM7J23frdhBX6yVaD/money.exe
或者Reshacker把这个程序里面的图片替换掉也行!
( ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号