VBʹÓÃActiveX¿Ø¼þʵÀýºÍ²½¾Û
Ä¿µÄÕÆÎÕÒ»¸ö¼òµ¥µÄVB³ÌÐòµÄ½¨Á¢¡¢±à¼¡¢µ÷ÊÔ¡¢ÔËÐкͱ£´æµÄ·½·¨¡£
²Ù×÷²½Öè ¢Å½øÈëVB»·¾³£¬Ð½¨¹¤³Ì¡£·½·¨ÊÇ£ºÈç¹û³öÏ֓н¨¹¤³Ì”¶Ô»°¿ò£¬ÔòÑ¡Ôñ“±ê×¼.EXE”²¢µã»÷[´ò¿ª]°´Å¦£»»òÕßÖ±½Óµã»÷²Ëµ¥[Îļþ]-[н¨¹¤³Ì]¡£¶¼»á³öÏÖÒ»¸öÃûΪ“Form1”µÄд°Ìå¡£
¢Æ´Ó±ê×¼¿Ø¼þ¹¤¾ßÀ¸ÖÐÏò´°Ìå¼ÓÈë±êÇ©(Label1ºÍLabel2)¡¢Á½¸öÃüÁŦ(Command1ºÍCommand2)¡£
¢ÇÓÉÓÚ±ê×¼¿Ø¼þ¹¤¾ß½öÌṩ20¸öÄÚ²¿¿Ø¼þ£¬Êµ¼ÊÉÏvb³ÌÐòÖл¹¿É¼ÓÈëActiveX¿Ø¼þºÍ¿É²åÈë¶ÔÏóµÈ¡£Îª´Ë±¾´ÎʵÑéÇëÊÔÓÃÒÔÏ·½·¨¼ÓÈë“»¬¿é”¿Ø¼þ£¬¼ÓÈëÇ°±ØÐëʹÓò˵¥[¹¤³Ì]-[²¿¼þ]£¬È»ºó´Óµ¯³öµÄÁбí¿òÖй´Ñ¡“Microsoft Windows Common Control 6.0 ”²¢µã»÷[È·¶¨]°´Å¦£¬È»ºó¾Í¿ÉÒԴӿؼþ¹¤¾ßÀ¸ÖмÓÈëÒ»¸öÃûΪ“Slider”µÄ»¬¿é¿Ø¼þÁË¡£
¢ÈÉèÖô°ÌåµÄ±³¾°Í¼Ïñ¡¢ÃüÁŦµÄPictureÊôÐÔºÍÁ½¸ö±êÇ©ÉϵÄÎÄ×ÖºÍ×ÖÌåºóµÈÊôÐÔ£º ¿Ø¼þÃû ÊôÐÔºÍÊôÐÔÖµ Form1 Caption=”³õʶVBÊÀ½ç”Picture=” BJtu.bmp” Label1 Caption=”ÐÂÄê¿ìÀÖ” Font Á¥Êé 36 ºÚÉ« Left=400 BackStyle ͸Ã÷ Label2 Caption=”ÐÂÄê¿ìÀÖ” Font Á¥Êé 36 °×É«BackStyle ͸Ã÷ Command1 ½«CaptionÇå³ý Picture=” HANDAR_Left.GIF” Style=1.Graphical Command2 ½«CaptionÇå³ý Picture=” HANDAR_Right.GIF” Style=1.Graphical Slider1 Max=7000 Min=500 LargeChange=50
¢É¸÷¿Ø¼þÊôÐÔÉèÖÃÍê³ÉºóЧ¹ûÈçÏ£º
¢Ê±àдÏìÓ¦¼¸¸öʼþµÄ´úÂ룬ĿµÄÊÇÔËÐÐʱIJ¿ØÖƱêÇ©ÎÄ×ÖµÄ×óÓÒÒƶ¯¡£¹²4¸öÒªÏìÓ¦µÄʼþ£º ¢Ù ´°ÌåµÄÔØÈëʼþ(Sub Form_Load):ÔÚ´°Ìå¿Õ°×´¦Ë«»÷Êó±ê×ó¼ü,¼´¿Éµ¯³ö¸ÃʼþµÄ¹ý³Ì´úÂëµÄ¿ò¼Ü,¼´ÓÐ: Private Sub Form_Load() End Sub ÇëÔÚÆäÖÐдÈëÁ½ÌõÓï¾ä(¹¦ÄÜÊÇͨ¹ýÉèÖñêÇ©µÄTopºÍLeftÊôÐÔ,ʹÁ½¸ö±êÇ©ÎÄ×Ö³ÊÁ¢Ìå´íλЧ¹û) Label2.Top = Label1.Top - 50 Label2.Left = Label1.Left - 50 ¢Ú Ë«»÷×óÊÖÖ¸ËùÔڵݴŦCommand1µÄÊó±êµ¥»÷ʼþ(Sub Command1_Click()):Ôڸð´Å¦ÉÏË«»÷Êó±ê,¼´¿Éµ¯³ö¸ÃÏîʼþµÄ¹ý³Ì´úÂëµÄ¿ò¼Ü,¼´ÓÐ: Private Sub Command1_Click() End Sub ÇëÔÚÆäÖÐдÈëÁ½ÌõÓï¾ä,¹¦ÄÜÊÇÈÃÁ½¸ö±êÇ©µÄ×ó±ß½çͬʱ¼õÉÙ50,ʹÆä×óÒÆ. Label1.Move Label1.Left - 50 Label2.Move Label2.Left - 50 ¢Û ÓÃͬÑùÔÚ·½·¨±àдÓÒÊÖÖ¸ËùÔڵݴŦCommand2µÄÊó±êµ¥»÷ʼþ,¼´ÔÚµ¯³öµÄ¹ý³Ì´úÂë¿ò¼ÜÖÐдÈ
Ïà¹ØÎĵµ£º
Option Explicit
Dim FSO As New FileSystemObject
Dim currentFolder As Folder
Dim currentFolderName As String
Dim folderItem, fileItem
Private Sub Form_Load()
currentFolderName = FSO.GetFolder(App.Path) & "\content"
SeachFolder (FSO.GetFolder(currentFolderName))
End Sub ......
VBÑÕÉ«ºÍRGBÉ«»¥Ïàת»»Í·ÌÛÁËÎÒºÃÒ»¶Îʱ¼ä,Èç½ñÕÒµ½½â¾ö°ì·¨ÁË
ÌرðÌù³öÀ´Óë´ó¼Ò¹²Ïí
Type RGB
Red As String
Green As String
Blue As String
End Type
Public Function ColorToRGB(ByVal dwColor As Long) As RGB
Dim clrHex ......
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
&nbs ......
ÎÞÒâÖз¢ÏÖVB ForÑ»·µÄÒ»¸öÌص㣺ÔÚÑ»·ÌåÖУ¬Æóͼ¸Ä±äÑ»·ÖÕÖ¹±äÁ¿Ê¹Ö®ÌáÇ°Í˳öÑ»·ÊÇͽÀ͵ġ£
Private Sub Form_Load()
Dim s(0 To 4) As String
Dim N As Integer, i As Integer
s(0) = "²âÊÔ1"
s(1) = "²âÊÔ2"
s(2) = "²âÊÔ3"
s(3) = "²âÊÔ4"
s(4) = "²âÊÔ5 ......
http://zhidao.baidu.com/question/84802747.html
VBÈçºÎ»ñÈ¡´°¿ÚµØÖ·À¸ÄÚÈÝ
¾ÍÊDZÈÈçÎÒ´ò¿ªDÅ̵ÄaaaÎļþ¼Ð£¬´°¿ÚµØÖ·À¸¾ÍÊÇÏÔʾD:\aaa£¬ÇëÎÊÎÒÒªÔõôÓÃVBд³ÌÐòÀ´»ñÈ¡´°¿ÚµØÖ·À¸µÄÄÚÈÝ£¿£¨²»ÊÇIEµÄµØÖ·À¸£©
Èô´ò¿ªÁËÁ½¸ö´°¿Ú£¬±ÈÈçDÅ̵ÄaaaÎļþ¼ÐºÍEÅ̵ÄbbbÎļþ¼ÐϵÄcccÎļþ¼Ð¶¼´ò¿ªµÄ»°£¬µã»÷command1,text1¾ÍÏÔʾ£º
......