ÈçºÎͨ¹ý VB »ñµÃ google ·ÒëµÄ½á¹û£¿
´ÓÍøÉÏÕÒÁËÒ»¸ö°æ±¾£¬Ô´´úÂëÈçÏ£º
VB code:
Option Explicit
'Global DefLang As String
Const WebURL As String = "http://translate.google.com/translate_t"
Const SearchString As String = "result_box dir="
Const EndString As String = "</"
Public Function Translation(InputText As String, LangPair As String) As String
Dim TMPString As String
Dim StartPos As Long
Dim DebString As String
Dim InitString As String
If IsConnected = False Then
MsgBox "You don't have Internet connection!", vbInformation, "Translation"
Translation = ""
Exit Function
End If
'InputText
TMPString = GetHTMLfromURL(WebURL & "?langpair=" & LangPair & "&text=" & InputText)
InitString = SearchString & Chr(34) & "ltr" & Chr(34) & ">"
StartPos = InStr(1, TMPString, InitString, vbTextCompare)
If StartPos = 0 Then
Translation = ""
Exit Function
End If
DebString = Right(TMPString, Len(TMPString) - (StartPos + Len(InitString) - 1))
StartPos = InStr(1, DebString, EndString, vbTextCompare)
Translation = ReplaceHTMLString(Left(DebString, StartPos - 1))
End Function
Public Function ReplaceHT
Ïà¹ØÎÊ´ð£º
ÎÒÓÃDelphiдÁËÒ»¸öDLL, DLLÀïÓÐMDIµÄ×Ó´°Ìå,DLL³õʼ»¯Ê± ´«µÝµ÷ÓÃÕßµÄTApplication¸øDLL, ÔÚDelphi7Öе÷ÓÃÒѾͨ¹ý,µ«ÊDz»ÖªµÀÔÚVBÖÐÓÐÎÞTApplication¶ÔÓ¦ÀàÐÍ, ÊÇ·ñÄÜÔÚVBÖе÷ÓÃ?
ÄãºÃ£¬ÓÃinstance²»ÊǾͿÉÒÔÁË ......
Çë½ÌһϣºÎÒÓÃvbдÁËÒ»¸öµ÷ÓÃIllustratorµÄ²âÊÔ³ÌÐò£¬´úÂëºÜ¼òµ¥£ºPrivate Sub Command1_Click()
Dim app As New Illustrator.Application
Dim doc As Illustrator.Document
Dim thislayer As Illustrator.Layer ......
Òª²É¼¯µÄÒ³Ã棺http://city.qzone.qq.com/html/user/searchpro.htm#mod=0&act=city&cd=120000&pg=1
ÎÒÏë°ÑËÑË÷³öÀ´µÄQQ¶¼²É¼¯³öÀ´£¬¸ÃÔõô×ö¡£¿´ÁËÏ´úÂëºÃÏñ²»ÊÇÆÕͨµÄÄÇÖÖ£¬ÍøÖ·Àï°Ñ1¸Ä³É2ûÓà ......
vbÖÐÔõÑùʵÏÖÏñvb.netÒì³£´¦Àí(try....Catch ex As Exception...end try)¹¦ÄÜ£¿
ÓÑÇé°ï¶¥
ÎÞ·ÇÊÇOn error Goto ºÍErr.NumberÅжϰÉ?
ÏëÓÃvb6.0ʵÏÖÒÔÏÂvb.netµÄ¹¦ÄÜ£º
dim str as string 'Õâ¸öÒ»¸öÓ¦Ó ......
Ò»¸ö¸öΪÁ˳öÃû¾ÓȻʹÓÃ×Ô¼ºµÄÕÕƬ³öÀ´ÕÐÒ¡,Çî·èÁË°É
©°©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤My ѸÀ׵ȼ¶©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©´
so what? disturbed you?
´ó¸ÅºÃ¶àÖ»ÓгõÖбÏÒµ
ÊDz ......