ͨ¹ýµ÷ÓÃCreateDataSetfromXmlÈ¡µÃXMLÊý¾Ý
Imports System.Xml
Public Const FILE_CONFIG = "MZZ.xml"
Public Const PATH_CONFIG = "\XML\"
Dim dstXML As DataSet
Dim tblXML_DB As DataTable
Dim dtCod As New DataTable
Dim strSQL As String = ""
clsPublic.pstrAppPath = System.Windows.Forms.Application.StartupPath'Æô¶¯³ÌÐò·¾¶
'Æô¶¯³ÌÐòÉϼ¶Ä¿Â¼£¨InStrRevÊÇÈ¡µÃ×îºóÏÔʾ\µÄλÖã©
clsPublic.pstrAppPath = Mid(clsPublic.pstrAppPath, 1, InStrRev(clsPublic.pstrAppPath, "\", ) - 1)
'Ö»ÄÜÆô¶¯Ò»¸ö³ÌÐò
If UBound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName)) > 0 Then
Exit Sub
End If
'¶ÁÈ¡XMLÊý¾Ý£¨QDIS½Úµã£¬×÷Ϊһ¸ötable,ËùÒÔÊÇdstXML.Tables(0)£©
dstXML = CreateDataSetfromXml(FILE_CONFIG)
tblXML_DB = dstXML.Tables(0)
clsDBBase.Uid = tblXML_DB.Rows(0).Item("UserId")
......
ͨ¹ýµ÷ÓÃCreateDataSetfromXmlÈ¡µÃXMLÊý¾Ý
Imports System.Xml
Public Const FILE_CONFIG = "MZZ.xml"
Public Const PATH_CONFIG = "\XML\"
Dim dstXML As DataSet
Dim tblXML_DB As DataTable
Dim dtCod As New DataTable
Dim strSQL As String = ""
clsPublic.pstrAppPath = System.Windows.Forms.Application.StartupPath'Æô¶¯³ÌÐò·¾¶
'Æô¶¯³ÌÐòÉϼ¶Ä¿Â¼£¨InStrRevÊÇÈ¡µÃ×îºóÏÔʾ\µÄλÖã©
clsPublic.pstrAppPath = Mid(clsPublic.pstrAppPath, 1, InStrRev(clsPublic.pstrAppPath, "\", ) - 1)
'Ö»ÄÜÆô¶¯Ò»¸ö³ÌÐò
If UBound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName)) > 0 Then
Exit Sub
End If
'¶ÁÈ¡XMLÊý¾Ý£¨QDIS½Úµã£¬×÷Ϊһ¸ötable,ËùÒÔÊÇdstXML.Tables(0)£©
dstXML = CreateDataSetfromXml(FILE_CONFIG)
tblXML_DB = dstXML.Tables(0)
clsDBBase.Uid = tblXML_DB.Rows(0).Item("UserId")
......
Option Explicit
Private rsMain As ADODB.Recordset
Private rsTerm As ADODB.Recordset
Private strSql As String
Private Sub cmdAbout_Click()
frmAbout.Show
End Sub
Private Sub cmdAddObject_Click() '³ÌÐò¶Î
If rsMain.RecordCount >= MaxRecNumber Then
MsgBox "¼²²¡¸öÊý²»Äܳ¬¹ý: " & Str(MaxRecNumber) & "¸ö" & vbCrLf & "Èç¹ûÐèÒªÔö¼Ó¼²²¡ÊýÁ¿,ÇëÓë×÷ÕßÁªÏµ", vbInformation, "Ìáʾ"
Exit Sub
End If 'ÅжÏ
If Trim(txtID.Text) = "" Then
& ......
ת×Ô£ºhttp://www.52arm.com/Article_Show.asp?ArticleID=186
×÷Õߣºweidian ---±¾Õ¾Ô´´ µã»÷Êý£º4721 ·¢±íʱ¼ä£º2008-5-7 ±à¼£ºsanzang
Winsock¿Ø¼þ½¨Á¢ÔÚTCP¡¢UDPÐÒéµÄ»ù´¡ÉÏ£¬Íê³ÉÓëÔ¶³Ì¼ÆËã»úµÄͨÐÅ¡£¼´Ê¹¶ÔTCP/IP²»Ì«ÊìϤµÄÓû§£¬Ê¹ÓøÿؼþÒ²¿ÉÒÔÔÚÊ®¼¸·ÖÖÓÄÚ´´½¨Ò»¸ö¼òµ¥µÄ¿Í»§»ú/·þÎñÆ÷³ÌÐò¡£ÏÂÃæÎÒÃǶÔWinsock¿Ø¼þµÄʼþ¡¢·½·¨¡¢ÊôÐÔ°´ÆäÔÚ³ÌÐòÖгöÏÖµÄ˳Ðò·Ö±ð×÷ÏêϸµÄ½éÉÜ£¬ÒÔ±ã¸üºÃµØÀí½â³ÌÐòÔ´´úÂë¡£
ÏÂÃæÊÇWinsock¿Ø¼þµÄÏà¹ØÊôÐÔ£¬·½·¨ºÍʼþ¡£(ÂÔȥһЩÔÝÓò»µ½µÄ)
*ÊôÐÔ
-------------------------------------------------------------------------
LocalHostName | ±¾µØ»úÆ÷Ãû
LocalIP | ±¾µØ»úÆ÷IPµØÖ·
LocalPort | ±¾µØ»úÆ÷ͨÐųÌÐòµÄ¶Ë¿Ú(0<¶Ë¿Ú<65536)
RemoteHost | Ô¶³Ì»úÆ÷Ãû
RemotePort | Ô¶³Ì»úÆ÷µÄͨÐųÌÐò¶Ë¿Ú
state | Á¬½ÓµÄµ±Ç°×´Ì¬(ÎĺóÓÐÏêϸ˵Ã÷)
Protocal | ʹÓÃTCP»òUDPÐÒé(ÕâÀïÎÒÃÇÑ¡‘0-sckTCPProtocal’)
--------------------------------------------------------------------- ......
Õâ¶Îʱ¼äÔÚÒÆÖ²ÏîÄ¿µÄ¹ý³ÌÖУ¬Æð³õÎÒÏëÅжÏÒ»¸ö×Ö·û´®ÖÐÊÇ·ñ´æÔÚij×Ö·û£¨´®£©£¬Ö±½ÓµÄʹÓ÷½·¨ÊÇÓÃinstr£¨start£¬string1£¬string2£¬VB compare£©£¬µ«¾¹ý·ÖÎöÔÚVBÖпÉÒÔÖ»ÓÃһϷ½·¨À´Åжϣ¡
1.³£ÓõÄINStr·½·¨
Function InStr([Start], [String1], [String2], [Compare As VbCompareMethod = vbBinaryCompare])
VBA.Strings µÄ³ÉÔ±
·µ»ØÔÚÁíÒ»×Ö·û´®ÖеÚÒ»´Î³öÏÖijһ×Ö·û´®µÄλÖÃ
ÅжÏstring1ÖдÓstart¿ªÊ¼µÄλÖõÚÒ»´Î³öÏÖstring2µÄλÖÃ
2.ʹÓÃÕýÔò±í´ïʽ
ÔÚVBÖÐÐèÒªÒýÈëLibrary VBScript_RegExp_55
λÖÃÔÚC:\WINDOWS\System32\vbscript.dll\3
Microsoft VBScript Regular Expressions 5.5
µ±È»£¬Äã¿ÉÒÔÖ±½ÓÔÚÏîÄ¿ÖÐÒýÓã¬Ê¹Ó÷½·¨ÈçÏ£º
Dim ResultString As String
Dim myRegExp As RegExp
Dim resultCollection As MatchCollection
Const pattern As String = "^\s*Dim\s+([\w|,|\s]+)(?:\s+As\s+Recordset)"
Public Function executes(SubjectString As String, result As MatchCollection)
Set myRe ......
¿ªÊ¼Ê¹ÓÃvbµÄʱºòϲ»¶ÓÃÊÖ»³öÄǸö¿Ø¼þµÄλÖÃ.È»ºóÒ»¸öÒ»¸öµÄÍ϶¯,Ò»µãÒ»µãµÄÒƶ¯.Ö±µ½¸Ð¾õÂúÒâÁËΪֹ.Èç¹ûÊǿؼþ¶àÁËÕâ¸ö¾ÍºÜÂé·³ÁË
Ò»²»Ð¡ÐÄ¿ÉÄܻὫı¸ö¿Ø¼þÍϵ½Ò»±ßÈ¥
ËùÒÔ,ÎÒÃÇÔÚÒÔºóµÄ×÷Æ·ÖÐ
¾¡Á¿Ê¹ÓôúÂëÀ´¶¨Òå¿Ø¼þλÖÃ,,ÒªÁé»îµÄÕÆÎÕ×ø±êλÖÃ.,¿ÉÒÔʹÓÃ×Ô¶¨Òå×ø±ê.ʹÓÃÏñËØÀ´¸üºÃµÄÀ´·ÖÇøÏÔʾ¿Ø¼þ.
ÀýÈç:
¾ßÌ嶨Òå·½·¨£º
ScaleModeÉè³É0
ScaleHeight´°¿ÚµÄ¿í¶È£¬Õâ¸öÖµ²»»áÓ°Ïì´°ÌåµÄÏÔʾ´óС£¬Ö»ÊDZíʾÄã°Ñ´°Ìå´¹Ö±·½ÏòÉÏ·Ö³ÉÁ˶àÉÙ·Ý
ScaleWidthÒâÒåºÍScaleHeightÒ»Ñù£¬ÊÇÔÚˮƽ·½ÏòÉ϶Դ°Ìå½øÐзָî
ScaleTop±íʾ´°ÌåµÄ¶¥²¿ÓÃÄãµÄ×Ô¶¨Òå×ø±êµ¥Î»À´±íʾÊǶàÉÙ
ScaleLeftºÍScaleTopÒ»Ñù£¬ÓÃ×Ô¶¨Òå×ø±êµ¥Î»±í±ê´°ÌåµÄ×ó±ßÆðµã
×¢Ò⣺ScaleWidthºÍScaleTop¶¼ÊÇÖ¸´°ÌåÄÚ²¿¿Õ¼äµÄλÖ㬲»°üÀ¨±êÌâºÍ´°Ìå±ß¿ò
¾ÙÀýÀ´½²£º
Èç¹û´°Ìå´óСÊÇ£¨400£¬300£©£¬ÔÚûÓÐÉè³É×Ô¶¨Òå×ø±êʱ£¬Ä¬ÈÏScaleModeÊÇ1£¨ç¾£©£¬Õâʱ´°ÌåµÄ×óÉϽÇÊÇ£¨0£¬0£©£¬¸ß¶ÈÊÇ300£¬¿í¶ÈÊÇ400£¬ÕâʱµÄ×ø±ê£¨200£¬150£©ÊÇ´°ÌåµÄÖÐÐĵ㣬£¨400£¬300£©ÊÇ´°ÌåµÄÓÒϽǣ¬ÏÖÔÚÎÒÃǸijÉ×Ô¶¨Òå×ø±ê£¬ÉèÖÃScaleWidth=200£¬ScaleHeight=-200£¨¸ºÖµ±íʾ´ÓÉÏÍùÏÂ×ø±êÖµÊǵݼõµÄ£©£ ......
ÕâÒ»¶Î´ó¼Ò±àд³ÌÐòºÜ¶àʱºò¶¼ÔÚʹÓÃAPI,Ëü¸øÎÒÃÇ´øÀ´ÁËÇ¿´óµÄ¹¦ÄÜ.ÈÃÎÒÃǷdz£¾ªÏ².
µ«ÊÇÎÒÃÇÔÚµ÷ÊÔ³ÌÐòµÄʱºòÓÐʱºò×ܻᱼÀ£.ÕâÑùºÜ²»·½±ã.
ÆäÖÐÓÐЩÊÇapiÈǵĻö
ʹÓÃapi×¢ÒâÊÂÏî:
Ê×ÏÈÎÒ˵˵ÎҵĹ۵ã.
1:ApiÊǺܶàϵͳҲÔÚÓÃ.ÎÒÃÇÔÚÉèÖòÎÊýʱÈç¹ûºÍϵͳµÄ²ÎÊýÓгåÍ».¾Í¿ÉÄÜÒýÆðÈí¼þ³ö´í
2.apiºÜ¶à¶¼ÊÇcÓïÑÔ±àдµÄ,cÖÐÕûÐÍÊý¶¼ÊÇ4¸ö×Ö½Ú.ÕâÑùvbÖж¨ÒåµÄ±äÁ¿¾Í¿ÉÄÜÓëapi³åÍ».
»¹ÓÐ:vb6.0ÔÚÓöµ½ÕûÐÍÊý¾Ýʱ¾¡Á¿Ê¹ÓÃLong±äÁ¿¡£ÒòΪLong±äÁ¿ÊÇ32λCPUµÄ±¾»úÊý¾ÝÀàÐÍ£¬ËùÒÔ´¦ÀíËٶȻáºÜ¿ì£¬ÓÈÆäÊÇÔÚÑ»·ÌåÖС£
------------------------------------------------------------
ʹÓÃInteger½øÐмÆËãÔÚijЩ¼«¶ËÊäÈëÏÂInteger±äÁ¿½á¹ûÒç³ö£¬ÓÖÒòΪʹÓÃÁËOn error resume next ¶øµ¼Ö³ö´íδÄÜÔÚ³ÌÐòÖÐÔËÐÐÖÐÌáʾ³ö´íÎó£¬ËùÒÔʹÓÃinteger ²»ÊÇÒ»¸öºÃÏ°¹ß
ÕâÀïÌṩһ¸öÁ´½Ó.¹ØÓÚʹÓÃapiµÄ×¢ÒâÊÂÏî
......
×ܼǼÊý:380; ×ÜÒ³Êý:64; ÿҳ6 Ìõ;
Ê×Ò³ ÉÏÒ»Ò³ [1] [2] [3] 4
[5] [6] [7] [8] [9] [10] ÏÂÒ»Ò³ βҳ