Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 »ñÈ¡ÍøÒ³Ô´´úÂë

Ò»¸ö²éѯijÐÅÏ¢µÄASPÍøÒ³£¬Ìá½»²ÉÓõÄÊÇpost·½·¨£¬²éÕÒ½á¹ûµÄÍøÒ³±ØÐëÓÒ¼üµã»÷¡°²é¿´Ô´Îļþ¡±²ÅÄÜ¿´µ½ÕæÕý²éѯ½á¹ûÍøÒ³µÄÔ´´úÂ룬ÓÃä¯ÀÀÆ÷²Ëµ¥¿´µ½µÄÊDzéѯǰµÄÔ´´úÂë
ÓÃVBÓÐʲô°ì·¨¿ÉÒÔ»ñÈ¡µ½Õâ¸ö²éѯºóµÄÔ´´ú ......

VBÎļþ²Ù×÷

Private Sub Command1_Click()

    Dim m As Integer    '½ÓÊÜÎı¾¿òÒ»µÄÊýÖµ
    Dim n As Integer  '½ÓÊÜÎı¾¿ò¶þµÄÊýÖµ
    Dim k As Integ ......

Ôõ樣優»¯VB³Ìʽ

ÓÉÓÚ´°體µÄÔö¶à£»
Ã÷顯¸Ð覺³Ìʽ運ÐÐÂýÁË£»
Ôõ樣優»¯£»
ÓÅ»¯ÄãµÄ³ÌÐòÂß¼­£¬±ÈÈ罫²»ÓõĴ°Ì弰ʱUnload£¬½«²»ÓõĶÔÏó¼°Ê±ÊÍ·Å

ÒýÓÃ
ÓÅ»¯ÄãµÄ³ÌÐòÂß¼­£¬±ÈÈ罫²»Óà ......

ÔõÑù±£´æVBµÄcomboboxµÄlistÖµ£¿

form1 ÖУ¬ÎÒÔÚText1ÀïÊäÈë1111111111

Dim str1 As String
Private Sub Command1_Click()
str1 = Me.Text1.Text
Combo1.AddItem str1
End Sub

µãCommand1£¬¾Íдµ½Combo1µÄ ÏÂÀ­²Ëµ¥ÀïÈ¥ÁË ......

vb adodb.stream writeдÈëÍøÒ³´úÂëΪutf8±àÂëµÄÎÊÌâ

´ÓÍøÒ³Í¨¹ýinet¿Ø¼þµÄInet1.GetChunk¶ÁÈ¡Æä´úÂ룬ȻºóÏëת»»Îªºº×Ö£¬×ª»»´úÂëÈçÏÂ
Private Sub Inet1_StateChanged(ByVal State As Integer)
    Dim strRecText As String
    Dim st ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ