Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

VB: È¡ÍøÒ³Ô´Âë

Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" ( _
    ByVal pCaller As Long, _
    ByVal szURL As String, _
    ByVal szFileName As String, _
    ByVal dwReserved As Long, _
    ByVal lpfnCB As Long _
    )  As Long Private Const CP_UTF8 = 65001
Private Declare Function MultiByteToWideChar Lib "kernel32" ( _
    ByVal CodePage As Long, ByVal dwFlags As Long, _
    ByVal lpMultiByteStr As Long, ByVal cchMultiByte As Long, _
    ByVal lpWideCharStr As Long, ByVal cchWideChar As Long) As Long 'È¡ÍøÒ³Ô´Âë
Public Function webTxtGet(ByVal Url1 As String) As String
   Dim strFile As String
   Dim lngReturn As Long
   Dim TextLine As String, textCon As String
   Dim Big5str As String
    Dim tmpUTF8() As Byte
    Dim lLength As Long, lBytes As Long, lWC As Long
On Error Resume Next
   strFile = App.Path & "\txtWeb.txt"
   Open strFile For Output As #1
   Close #1
   lngReturn = URLDownloadToFile(0, Url1, strFile, 0, 0)
   Open strFile For Binary As #1
    webTxtGet = Space(LOF(1))
    Get #1, , webTxtGet
   Close #1
  Kill strFile
End Function 'È¡ÍøÒ³Ô´Âë_Èç¹ûÍøÒ³ÊÇUTF-8
Public Function webTxtGet_utf8(ByVal Url1 As String) As String
   Dim strFile As String
   Dim lngReturn As Long
   Dim TextLine As String, textCon As String
   Dim Big5str As String
    Dim tmpUTF8() As Byte
    Dim lLength As Long, lBytes As Long, lWC As Long
On Error Resume Next
   strFile = App.Path & "\


Ïà¹ØÎĵµ£º

VB ·¢ËÍÄ£Äâ°´¼ü

Dim ReturnValue, I
ReturnValue = Shell("Calc.EXE", 1) ' ÔËÐмÆËãÆ÷¡£
AppActivate ReturnValue ' ¼¤»î¼ÆËãÆ÷¡£
For I = 1 To 100 ' ÉèÖüÆÊýÑ­»·¡£
SendKeys I & "{+}", True ' °´Ï°´¼ü¸ø¼ÆËãÆ÷
Next I ' ½«ËùÓÐ I ÖµÏà¼Ó¡£
SendKeys "=", True ' È¡µÃ×ܺϡ£
SendKeys "%{F4}", True ' °´ ALT+F4 ¹Ø ......

vb Ä£ÄâÊó±ê°´¼ü

 °ÑÊó±êÒƵ½ÆÁĻָ¶¨Î»Öà È磨111.111£© µ¥»÷Ò»ÏÂ
ÔÙÒƵ½ÆÁÄ»ÁíÒ»Ö¸¶¨Î»ÖÃÖ¸¶¨Î»Öà È磨222.222£©µ¥»÷Ò»ÏÂ
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Private Declare Function SetCursorPo ......

VBÖÐShellºÍShellExecuteº¯ÊýµÄʹÓ÷½·¨ºÍÇø±ð

 Ð´ÁËÒ»¸övbµÄ³ÌÐò£¬ÓÃÀ´°ÑÔ­À´Ð´µÄ¼¸¸övbºÍvcµÄ³ÌÐòÕûºÏÆðÀ´¡£¾ÍÊÇʹÓÃShellº¯Êý¡£½á¹û·¢ÏÖ£¬vcµÄ³ÌÐò¿ÉÒԺܺõÄÏÔʾ£¬µ«vbдµÄÈ´Ò»ÔËÐоÍ×îС»¯ÁË¡£×Ðϸ²é¿´ÁËÒ»ÏÂÒÔÏÂÎÄÕ£¬²Å·¢ÏÖÔ­À´shellº¯ÊýµÄĬÈÏÏÔʾģʽÊÇwindowstyleÊǵÈÓÚvbMinimizedFocus¡£È»ºó¾ÍÊÇÖ±½Ó¼ÓÉÏÒ»¸övbNormalFocus¡£Ò»ÇÐok!  
vbµÄs ......

VBÈ¡µÃÏ߳̾ä±ú

 Private Declare Function OpenThread Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwThreadId As Long) As Long
Private Const THREAD_ALL_ACCESS = &H1F03FF
 OpenThread(THREAD_ALL_ACCESS, 1, Ïß³ÌID)    'ÓÉÏß³ÌIDÈ¡µÃÏ߳̾ä±ú,·µ»ØÏß³Ì¾ä± ......

BarCode Ëã·¨ VBÀà¿â 2

 
Option Explicit
Public Function ascii2Char(strInput As String) As String
Dim i As Integer
Dim strTemp As String
Dim nPos As Integer
Dim nValue As Integer
i = 1
nPos = InStr(i, strInput, "&#", vbTextCompare)
While (nPos > 0)
    ascii2Char = ascii2Char + Left(st ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ