Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¹ØÓÚVBµÄListBox¿Ø¼þÑ¡¶¨ÏîµÄ»ñÈ¡

 ½ñÌìÔÚ×öVBÏîÄ¿µÄʱºò£¬Ê¹ÓÃÁËListBox¿Ø¼þÀ´»ñȡһЩÁбíÏÓÃÁ˲ŷ¢ÏÖûÓÐListViewºÃÓã¬ListViewÓÐItems£¨SelectItem£©¿ÉÒÔ¶¨Î»µ½µ±Ç°µÄÑ¡ÖÐÏ¶øListBoxûÓУ»ListViewÓÐTag¿ÉÒÔÉ趨ѡÖÐÏîµÄ±êʾ£¬ListBoxûÓС£ÉÏÍøÒ²ÕÒ²»µ½Ô­Òò£¬ÖªµÀÈ¥ÔĶÁMSDNºÍ×Ô¼º²âÊÔ¡£
Ö®ºóÖÕÓÚÕÒµ½ÁËÎÊÌâµÄ¹Ø¼ü¡£
ʼþ1£ºÌí¼ÓListBoxÏîºÍ¶ÔÓ¦ÏîµÄ±êʶ
Dim List1 As new ListBox
List1.addItem , , ÐÇÆÚÒ»
List1.ItemData(List1.newIndex) = "1"
List1.addItem , , ÐÇÆÚ¶þ
List1.ItemData(List1.newIndex) = "2"
List1.addItem , , ÐÇÆÚÈý
List1.ItemData(List1.newIndex) = "3"
List1.addItem , , ÐÇÆÚËÄ
List1.ItemData(List1.newIndex) = "4"
Private Sub List1_Click() 
    If List1.ListIndex = -1 Then
         Exit Sub             'ûÓÐÑ¡ÖÐÈκÎÏÍ˳ö·½·¨
    End If
    Debug.Print List1.ItemData(List1.ListIndex)      '´òÓ¡Ñ¡ÖеÄList1µÄ±êʶ¡£¡£¿ÉÄÜÊÇ"1" "2" "3" "4"
    Debug.Print List1.Text      '´òÓ¡Ñ¡ÖеÄList1µÄÃû³Æ¡£¡£¿ÉÄÜÊÇÐÇÆÚÒ»µ½ÐÇÆÚËÄ
End Sub
µÚÒ»´ÎдÎÄÕ£¬ÒòΪÓõÄÉÏ10´çµÄÉÏÍø±¾£¬Ð´µÃºÜ¼òµ¥£¬Èç¹û¿´²»¶®ÇëÁªÏµÎÒ¡£
¸ÕÓÃListBox¿Ø¼þ£¬ÈçÓÐÄÄÀï²»×㣬Çë¶à¶àÖ¸³ö¡£Ð»Ð»¡£


Ïà¹ØÎĵµ£º

VBÖд°ÌåÄ£¿é¡¢±ê׼ģ¿é¡¢ÀàÄ£¿éµÄÇø±ð

VBµÄ´úÂë´æ´¢ÔÚÄ£¿éÖС£ÔÚVBÖÐÌṩÁËÈýÖÖÀàÐ͵ÄÄ£¿é£º´°ÌåÄ£¿é¡¢±ê׼ģ¿éºÍÀàÄ£¿é¡£
¡¡¡¡¼òµ¥µÄÓ¦ÓóÌÐò¿ÉÒÔÖ»ÓÐÒ»¸ö´°Ì壬ËùÓõijÌÐò¶¼×¤ÁôÔÚ´°ÌåÄ£¿éÖУ¬¶øµ±Ó¦ÓóÌÐòÅÓ´ó¸´ÔÓʱ£¬¾ÍÒªÁíÍ⸽¼Ó´°Ìå¡£×îÖÕ¿ÉÄÜÓм¸¸ö´°ÌåÖÐÓÐһЩ¹²Í¬¶¼ÒªÖ´ÐеĴúÂ룬ΪÁËÔÚÁ½¸ö´°ÌåÖв»²úÉúÖظ´´úÂ룬¿É´´½¨Ò»¸ö¶ÀÁ¢µÄÄ£¿é£¬ÓÃËüʵÏÖ´ú ......

VBÉè¼Æ¶¯»­Ê±ÖÓ

 VBÉè¼Æ¶¯»­Ê±ÖÓ
³ÌÐòÃû£ºSec-Time.vbp
³ÌÐòÀà±ð£ºÍêÕûµÄVB³ÌÐò
¹¦ÄÜ£ºÏÔʾһ¸ö¶¯»­Ê±ÖÓ£¬¸ÃʱÕëËæ×ÅÿһÃë¶ø¶¯Ì¬±ä»¯¡£
³ÌÐò˵Ã÷
1£®ÈçºÎ»­Ê±ÖÓ±íÅÌÉϵÄËùÓÐÖ±ÏßÔªËØ£¿
ÓÃLoadÃüÁÁ¢Ô­Ê¼Line¿ØÖƵÄ14¸ö¿½±´£¨ÒòΪ±íÅÌÓÐ12¸öµãºÍʱ¡¢·Ö¡¢Ãë¹²15¸öLine£©£¬¸Ã¿ØÖÆÊý×éÿһ¸öʵÀýµÄ¶Ëµã×ø±êÊôÐÔÉèÖÃΪÿÌõÏßÔÚʱ ......

VB¼Ó½âÃÜ´úÂë

 Function crypt(Action As String, Key As String, Src As String) As String
'Action
'  E encrypts, D decrypts,
'Key is a unique string needed to en/decrypt (either
'  hardcode or setup something for the user to enter.
'Src is the string to be en/decrypted.
On Error GoTo errHandl ......

һС¶Î¹Ø¼ü´Ê·ÖÎö´úÂë(VB)

°ïÅóÓѸĵÄһС¶Î¹Ø¼ü´Ê·ÖÎö´úÂ룻 º¬Á½¸öµ¥´Ê¸´ºÏ¼ÆÊý
Private Function CollectWords() As Dictionary(Of String, Integer)
'Create a new dictionary
Dim table As New Dictionary(Of String, Integer)
'Prompt for the user
Console.WriteLine(
"Enter a line : ")
'Get the user's input
Dim input As St ......

dz̸VB±à³ÌÖÐÍø¸ñ¿Ø¼þµÄÑ¡Óü°Ê¹Ó÷½·¨

 ÄÚÈÝÌáÒªÕªÒª£º The software of visual basic developed by Microsoft corporation is becoming one of the main develop tools at today¡£ As it's remarkable peculiarity, the Grid control has very great practical and active use¡£ This topic discusses how to use the grid control of VB to develop prati ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ