VBÖÐʵÏÖµØͼ²Ù×÷µÄ·½·¨
1. ÔÚVBµÄFormÉè¼Æʱ£¬¼ÓÈëÒ»¸öpicturebox¿Ø¼þ£¬Õâ¸ö¿Ø¼þ×÷ΪOLEÈÝÆ÷£¬MapInfoÖеĵØͼ½«ÔڸÿؼþÉÏÏÔʾ¡£
2. Ö´ÐÐVBµÄº¯ÊýCreateobject(“MapInfo.Application”),Æô¶¯MapInfo¡£ÕâʱMapInfoÔÚºǫ́Æô¶¯£¬¶ÔÓû§À´Ëµ²»¿É¼û£¬²»»áµ¯³ösplash´°¿Ú
3. µ÷ÓÃMapBasicµÄº¯ÊýSet Application Window£¬ÉèÖÃMapInfoµÄ¸¸´°ÌåID£¬Ò²¾ÍÊÇVB´°ÌåµÄID£¬ÒÔºóµÄMapInfo¶Ô»°¿ò¶¼°ÑVB´°Ìå×÷Ϊ¸¸´°Ìå¡£
4. Éú³ÉÒ»¸öOLE×Ô¶¯»¯»Øµ÷¶ÔÏó£¬ÓÃÀ´´¦ÀíMapInfoµÄ»Øµ÷ÐÅÏ¢¡£È»ºóµ÷ÓÃMapBasicµÄº¯ÊýSetCallbackÀ´Ö¸ÏòÕâ¸ö»Øµ÷¶ÔÏó¡£
5. µ÷ÓÃMapBasicµÄº¯ÊýOpen TableÀ´´ò¿ªËùÒª´ò¿ªµÄ±í£¬Õâ¸öʱºò½ö½öÊÇ´ò¿ªÊý¾Ý¿âÎļþ¶øÒÑ£¬Í¼²ã²¢²»¿É¼û¡£
6. µ÷ÓÃMapBasicµÄº¯ÊýMap fromÉú³É¿É¼ûµÄµØͼ£¬µØͼÏÔʾÔÚpictureboxÄÚ¡£
7. µ÷ÓÃMapBasicµÄº¯ÊýSet Next Document Parent£¬ÖØж¨ÏòMapInfoÎĵµ´°¿ÚµÄ¸¸´°Ì壬ÕâÑùµØͼ´°¿Ú¾Í³ÉΪVBÓ¦ÓóÌÐòµÄ×Ó´°Ìå¡£
Ïà¹ØÎĵµ£º
ÕâһƪÎÒÔÙ˵˵ˮ¾§±¨±íµÄÇé¿ö¡£ACCESSÖжÔӦˮ¾§±¨±í·½Ã棬´ó¼Ò¿ÉÄÜ»áÓöµ½µÄ×î¶àµÄÎÊÌâÓ¦¸Ã¾ÍÊÇ´ò¿ª±¨±íºó
»á³öÏÖÐèÒªµÇ¼µÄÎÊÌâ¡£
Õâ¸öÊÇΪʲôÄØ£¿Ã÷Ã÷ÎÒûÓÐÉèÖÃÃÜÂ룬Ôõô»áÓÐÒªÊäÈëÃÜÂëÄØ£¿Èç¹ûÄã¹»³Á×Å£¬Èç¹ûÄãµÄdebug¾Ñ鲻ȱ·¦µÄ»°£¬
Äã»á·¢ÏÖÔÚË®¾§±¨±íÌø³öÊäÈëÃÜÂëµÄµÇ¼¿òÖУ¬accessµÄ·¾¶²»ÊÇÎÒÏÖÔÚÊý¾Ý¿â· ......
Dim rs As ADODB.Recordset
Dim sqlstr As String
'²éѯ
sqlstr = "select * from ±íÃû where ×Ö¶ÎÃû = '" & ²éѯµÄÄÚÈÝ & "'"
rs = VScn.Execute("" & SqlSt ......
'ÕâÀïÊÇÆô¶¯¹ý³Ì[ʼþ»¥³â¾Í²»Ð´ÁË]
Dim f as frmMain
Sub Main
Set f=New frmMain
f.Show
End Sub
'ÕâÀïÊÇÒ»¸öÏß³ÌÀà¡£¡£¡£Ëæ±ãдɶ¡£¡£¡£
ˈ̞:BT
'ÕâÀïÊÇÖ÷´°¿Ú
Dim cBT as BT
Sub form_Load
'Ææ¹ÖµÄÎÊÌâ¾ÍÔÚÕâÀï...
Set cBT=CreateObject("¹¤³ÌÃû.BT")
'ÔÚL ......
YXOnlineÒѾ½Ó½üβÉù,ΪÁË´¦ÀíһЩ½çÃæµÄÎÊÌâ,²âÊÔÒ»¸öC++µÄDLL
Ò»¸öº¯Êý,ÓÃdeasambling¿´C++µÄ´úÂëÊÇûÓдíÎóµÄ,µ«Êǵ½ÁËVB,Çë¿´
bµÄ·µ»ØÖµÊÇTrue ²»¹ÜC++ºÍVBÏ໥¼üÔ¼¶¨TrueºÍFalse¸÷¶ÔӦΪʲôÊýÖµ
ÕâÀïÒѾÊÇTrueÁË
µ«ÄÇʱÏÔʾTrue = True ÈԾɲ»Ö´ÐеÚÒ»¸öMsgbox
Ö±½ÓÌøµ½Else
¶øÈç¹ûÊ¡ÂÔb = True Ϊ If b Then ......
1. ¸÷ÖÖ½øÖÆת»»º¯Êý Ò»°ãµÄÊý¾Ý½øÖÆ°üÀ¨Ê®½øÖÆ,¶þ½øÖÆ,Ê®Áù½øÖÆ.Ê®½øÖƾÍÊÇÎÒÃÇÈÕ³£Éú»îÓõ½µÄÊý¾Ý½øÖÆ,Òò´ËÒ²ÊÇÎÒÃÇ×îÊìϤºÍÇå³þµÄ;¶þ½øÖÆÊǼÆËã»úµÄ»ù´¡½øÖÆ,Ö÷ÒªÊÇÒòΪ±ãÓÚÓÃÎïÀíÆ÷¼þʵÏÖ¶þ½øÖÆ;°Ë½øÖƺÍÊ®Áù½øÖÆÒòΪºÍ¶þ½øÖƵÄÌìÈ»µÄÇ×ÃܹØϵ,²¢ÇÒ±íʾ±È¶þ½øÖƸü·½±ã,
¡¡¡¡1.
¸÷ÖÖ½øÖÆת»»º¯Êý
¡¡¡ ......