[תÔØ]: ½ÌÄãÈçºÎÓÃVB×ö¿Ø¼þ*.ocx
½ÌÄãÈçºÎÓÃVB×ö¿Ø¼þ*.ocx
Ò»¸ö¿Ø¼þÓкܶàʼþÈ磺Click¡¢MouseDown¡¢MouseUp¡¢MouseMoveµÈ¡£Òª´¥·¢ÕâЩʼþ¶¼ÐèÒªÄã¼ÓÈë´úÂë¡£ÔڿؼþµÄÉùÃ÷´¦¼ÓÈëPublic Event Click()¾Í±íÃ÷¸Ã¿Ø¼þÓÐÒ»“Click”ʼþ¡£×Ô¼º±àдµÄ¿Ø¼þÓÐʲôʼþ¾ÍÔÚÉùÃ÷´¦¼Ó¼¸Ìõʼþ
Èç½ñOCX¿Ø¼þÔÚ±à³ÌÖÐÒÑÕ¼ÁìÁ˺ÜÖØÒªµÄµØλ,ÎÒÃÇ¿ÉÒÔÀûÓÃOCX¿Ø¼þÍê³ÉһЩÏ൱¸´Ôӵıà³Ì²Ù×÷.ͬʱOCX ¿Ø¼þ»¹ÓÐÀûÓÚÖ÷³ÌÐòµÄ¼òµ¥»¯¡¢¹¦ÄܵÄÖØÓá¢Òþ³£³ÌÐòʵÏÖϸ½Ú¡¢±ãÓÚÉý¼¶¡¢´«²¥·½±ãµÈÓŵ㡣ÏÖÔÚÎÒÃÇ¿ÉÒÔÀûÓÃVB 5.0·½±ãµÄÖÆ×÷³ö×Ô¼ºµÄOCX¿Ø¼þ¹©ÎÒÃÇÔÚ±à³ÌÖÐʹÓÃͬʱ»¹¿ÉÒÔ°ÑËüË͸øÄãÖÜΧϲ»¶±à³ÌµÄÅóÓÑ!
ÏÂÃæÁгöÖÆ×÷OCX¿Ø¼þµÄ²½Ö裺
Ò»£ºÐ½¨OCX ¡¡¡¡´ò¿ªVB 5.0Ñ¡Ôñн¨¹¤³ÌÔÚ¶Ô»°¿òÖÐÑ¡ÔñActiveX ¿Ø¼þ(Èçͼһ(map1.gif))´ò¿ªºó»á¼ûÒ»¿ÕµÄÎĵµÕâ¾ÍÊÇ OCX¿Ø¼þµÄ³õʼ½çÃæ¡£Ïë¿´Ò»¿´¿ÕOCX¿Ø¼þµÄЧ¹ûÂð?Ñ¡Ôñ“Ìí¼Ó¹¤³Ì”Ñ¡Öбê×¼EXE£¬ÕâʱÄã¾Í¿ÉÒÔÏñµ÷ÓÃÆäËü¿Ø¼þÒ»ÑùÔÚ×ó±ßµÄ¹¤¾ßÀ¸ÀïÑ¡Ôñ¸Õ²Åн¨µÄOCX¿Ø¼þͼ±ê·ÅÔÚ±ê×¼µÄEXEÎĵµÖп´Ò»¿´ÓÐʲôЧ¹û!(ʲôҲûÓÐ!) ×ÔÈ»ÒòΪ¸Õ²ÅµÄOCXÎĵµÊÇ¿ÕµÄÂï(·Ï»°Ì«¶à£¬Êý¸ö̵ÓÛÏòÎÒ·ÉÀ´)!
¶þ£º´´½¨½çÃæ
¡¡¡¡Ò»°ãÎÒÃÇÓÃVB´´½¨OCX¿Ø¼þ¶¼ÊÇÔÚÎÒÃǵĿؼþÀïÌí¼ÓÆäËüµÄ¿Ø¼þÀ´×éºÏ³ÉÒ»¸öÍêÕûµÄ¿Ø¼þ£¨Ò²¿ÉÒÔÈÃËüÖ»Íê³ÉijÖÖËã·¨£©±ÈÈ磺Äã¿ÉÒÔÔÚÉÏÃæÌí¼ÓÒ»°´Å¥¡¢±à¼¿òÕâʱÄãÔÙÓõÚÒ»²¿µÄ·½·¨¿´Ò»¿´Ð§¹û£¬ÊDz»ÊǿؼþÉ϶àÁËÒ»¸ö°´Å¥ºÍÒ»¸ö±à¼¿ò¡£
Èý£ºOCXÊôÐÔ
¡¡¡¡Ò»¸öOCX¿Ø¼þÓÐÐí¶àµÄÊôÐÔ£¬±ÈÈç¿Ø¼þ±³¾°ÊÇ·ñ͸Ã÷£¨BackStyle£©£¬¿Ø¼þÊÇ·ñ¿ÉÒÔ»ñµÃ½¹µã (CanGetFocus)µÈ¡£ÕâЩÊôÐÔ¶¼¿ÉÒÔÔڿؼþµÄ“ÊôÐÔ¿ò”ÖÐÕÒµ½¡£
ËÄ£ºÌí¼Óʼþ
¡¡¡¡Ò»¸ö¿Ø¼þÓкܶàʼþÈ磺Click¡¢MouseDown¡¢MouseUp¡¢MouseMoveµÈ¡£Òª´¥·¢ÕâЩʼþ¶¼ÐèÒªÄã¼ÓÈë´úÂë¡£ÔڿؼþµÄÉùÃ÷´¦¼ÓÈëPublic Event Click()¾Í±íÃ÷¸Ã¿Ø¼þÓÐÒ»“Click”ʼþ¡£×Ô¼º±àдµÄ¿Ø¼þÓÐʲôʼþ¾ÍÔÚÉùÃ÷´¦¼Ó¼¸Ìõʼþ¡£¹ØÓÚ´¥·¢Ê¼þÊÇʹÓÓRaiseEvent”Óï¾äÀ´Íê³ÉµÄÈ磺RaiseEvent ʼþÃû£¨²ÎÊý£©¡£
Î壺Óû§ÊôÐÔ
¡¡¡¡Ò»¸ö¿Ø¼þÓ¦ÓÐÐí¶àÊôÐÔ¹©Óû§ÉèÖÃÈ磺¿Ø¼þµÄ±³¾°É«¡¢¿Ø¼þÒªÏÔʾµÄͼÐεȡ£ËüÃÇͨ³£ÓÃProperty GetºÍ Property LetÁ½ÌõÓï¾äÀ´Íê³É¡£Ç°Õß±íʾ¸øÓû§ÏÔʾһ¸öÊôÐÔµÄÖµ£¬ºóÕß±íʾÓû§ÉèÖÃÒ»¸öÊôÐÔµÄÖµ¡£
Áù£º±£´æÊôÐԺͶÁÈ¡ÊôÐÔ
¡¡¡¡µ±ÊôÐÔ±»Óû§¸ü¸ÄºóÐèÒª½«¸ÃÊôÐÔÖµ±£´æ£¬ÒÔ±ã¿Ø¼þÔËÐÐʱ¶ÁÈ¡¸ü¸ÄºóµÄÊôÐÔÖµ¡£ËüÃÇ·Ö±ðÓà ReadPropertyºÍWri
Ïà¹ØÎĵµ£º
VBµÄ´úÂë´æ´¢ÔÚÄ£¿éÖС£ÔÚVBÖÐÌṩÁËÈýÖÖÀàÐ͵ÄÄ£¿é£º´°ÌåÄ£¿é¡¢±ê׼ģ¿éºÍÀàÄ£¿é¡£
¡¡¡¡¼òµ¥µÄÓ¦ÓóÌÐò¿ÉÒÔÖ»ÓÐÒ»¸ö´°Ì壬ËùÓõijÌÐò¶¼×¤ÁôÔÚ´°ÌåÄ£¿éÖУ¬¶øµ±Ó¦ÓóÌÐòÅÓ´ó¸´ÔÓʱ£¬¾ÍÒªÁíÍ⸽¼Ó´°Ìå¡£×îÖÕ¿ÉÄÜÓм¸¸ö´°ÌåÖÐÓÐһЩ¹²Í¬¶¼ÒªÖ´ÐеĴúÂ룬ΪÁËÔÚÁ½¸ö´°ÌåÖв»²úÉúÖظ´´úÂ룬¿É´´½¨Ò»¸ö¶ÀÁ¢µÄÄ£¿é£¬ÓÃËüʵÏÖ´ú ......
'Ìí¼Ó¸öpicture1ºÍcommand1
Option Explicit
Dim lngCenter As Long
Dim lngMax As Long
Dim lngPad&
Dim PCurrent As POINT, PLast As POINT
Private Type POINT
x As Long
y As Long
End Type
Private Sub Form_Load()
lngCenter = (Picture1.Top + Picture1.Height) / 2
lngMax = Pictu ......
Óɵ×ÖÁÉÏÊÇ£º
• ÍйÜ×ÊÔ´
• WMI »ù´¡½á¹¹
• ʹÓÃÕß
ÍйÜ×ÊÔ´
ÍйÜ×ÊÔ´ÊÇÈÎÒâÂß¼»òÎïÀí×é¼þ£¬Í¨¹ýʹ ......
°ïÅóÓѸĵÄһС¶Î¹Ø¼ü´Ê·ÖÎö´úÂ룻 º¬Á½¸öµ¥´Ê¸´ºÏ¼ÆÊý
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 ......
Èç½ñOCX¿Ø¼þÔÚ±à³ÌÖÐÒÑÕ¼ÁìÁ˺ÜÖØÒªµÄµØλ,ÎÒÃÇ¿ÉÒÔÀûÓÃOCX¿Ø¼þÍê³ÉһЩÏ൱¸´Ôӵıà³Ì²Ù×÷¡£Í¬Ê±OCX¿Ø¼þ»¹ÓÐÀûÓÚÖ÷³ÌÐòµÄ¼òµ¥»¯¡¢¹¦ÄܵÄÖØÓá¢Òþ²Ø³ÌÐòʵÏÖϸ½Ú¡¢±ãÓÚÉý¼¶¡¢´«²¥·½±ãµÈÓŵ㡣ÏÖÔÚÎÒÃÇ¿ÉÒÔÀûÓÃVB 5.0·½±ãµØÖÆ×÷³ö×Ô¼ºµÄOCX¿Ø¼þ¹©ÎÒÃÇÔÚ±à³ÌÖÐʹÓã¬Í¬Ê±»¹¿ÉÒÔ°ÑËüË͸øÄãÖÜΧϲ»¶±à³ÌµÄÅóÓÑ!ÏÂÃæÁгöÖÆ ......