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

VB¸ù¾Ý´°¿Ú±êÌâ»ñÈ¡Ó¦ÓóÌÐòÍêÕû·¾¶(À´×ÔÍøÂç)

VB¸ù¾Ý´°¿Ú±êÌâ»ñÈ¡Ó¦ÓóÌÐòÍêÕû·¾¶(À´×ÔÍøÂç)
Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib "kernel32.dll" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessID As Long) As Long
Private Declare Function GetModuleFileNameExA Lib "psapi.dll" (ByVal hProcess As Long, ByVal hModule As Long, ByVal ModuleName As String, ByVal nSize As Long) As Long
Private Declare Function CloseHandle Lib "kernel32.dll" (ByVal hObject As Long) As Long
Private Declare Function EnumProcessModules Lib "psapi.dll" (ByVal hProcess As Long, ByRef lphModule As Long, ByVal cb As Long, ByRef cbNeeded As Long) As Long
Private Sub Command1_Click()
On Error Resume Next
Dim notepad_hwnd As Long, i As Long, pid As Long
Dim notepad_path As String
Shell "notepad.exe", vbNormalFocus
notepad_hwnd& = FindWindow(vbNullString, "ÎÞ±êÌâ - ¼Çʱ¾") '»ñµÃ´°¿Ú¾ä±ú
i = GetWindowThreadProcessId(notepad_hwnd, pid) '»ñµÃ¼Çʱ¾pid
notepad_path = GetProcessPathByProcessID(pid) '»ñÈ¡¼Çʱ¾È«Â·¾¶
Text1.Text = notepad_path
End Sub
Private Function GetProcessPathByProcessID(pid As Long) As String '»ñÈ¡Ó¦ÓóÌÐòµÄÍêÕû·¾¶
On Error GoTo ErrLine
Dim cbNeeded As Long
Dim szBuf(1 To 250) As Long
Dim Ret As Long
Dim szPathName As String
Dim nSize As Long
Dim hProcess As Long
hProcess = OpenProcess(&H400 Or &H10, 0, pid)
If hProcess <> 0 Then
Ret = EnumProcessModules(hProcess, szBuf(1), 250, cbNeeded)
If Ret <> 0 Then
szPathName = Space(260)
nSize = 500
Ret = GetModuleFileNameExA(hProcess, szBuf(1), szPathName, nSize)
GetProcessPathByProcessID = Left(szPathName, Ret)
End If
End If
Ret = Clos


Ïà¹ØÎĵµ£º

vbºÍaspÈçºÎÓÃremote·ÃÎÊÔ¶³ÌÊý¾Ý¿â

·ÃÎÊÔ¶³ÌÊý¾Ý¿âµÄÇé¿öÓÐÒÔϼ¸ÖÖ£º
1£©·ÃÎÊÔ¶³ÌÊý¾Ý¿âµÄaccessÊý¾Ý¿â
2£©·ÃÎÊÔ¶³ÌmssqlÊý¾Ý¿â»òoracleµÈÆäËû¹ØϵÊý¾Ý¿â£¬µ«ÊÇÊý¾Ý¿âͨÐŶ˿ڱ»·À»ðǽ×èµ²»òÆäËûÍøÂçÔ­ÒòÔì³ÉÎÞ·¨Ê¹Óøö˿Ú
±¾ÎĽöÔÚwindows2000 advance server,mdac2.8ϲâÊÔͨ¹ý£¬ÆäÓàÌõ¼þ²»±£Ö¤ÄÜÕý³£ÔËÐÐ
ÔÚmdacµÄService ProvidersÖаüÀ¨Microsoft ......

VBʵÏÖÅúÁ¿Ãû³ÆÐÞ¸Ä

Ç°Õó×ÓдÁËÒ»¸öĿ¼Ãû/ÎļþÃûµÄ»ñȡС³ÌÐò£¬ÕâÁ½Ìì¾ÓÈ»ÓÖ±»Ãû³ÆÅúÁ¿ÐÞ¸ÄÂé·³ÁËһϣ¬ËùÒÔÔÙдһ¸ö°É¡£
×¢Ò⣺ÄãÒªÊÇÖ»Ïëдһ´ÎµÄ»°£¬ÓÃÅú´¦Àí¸ü·½±ã¡£Ö»Óжà´ÎʹÓõÄÇé¿öÏ£¬×Ô¼ºÐ´³ÌÐò²ÅÓÐÒâÒå¡£
VBÖнøÐÐÃû³ÆÐ޸ĺÜÈÝÒ×,Óõ½µÄ¾ÍÊÇNameÕâ¸öº¯Êý£¬Ó÷¨ÈçÏ£º
Name OldName As NewName£¬Ëü²»½ö¿ÉÒÔ¸ÄдÃû³Æ£¬¶øÇÒ¿ÉÒÔ¸ü¸ ......

VBÖв¥·ÅWAVÎļþ

http://zhidao.baidu.com/question/33440250.html
ÔÚÄ£¿éÖÐÊäÈëÒÔÏ´úÂë
Public Declare Function sndPlaySound Lib "winmm" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
' flag uitzetten
Public Const SND_SYNC = &H0
Public Const SND_ASYNC = &H1 ......

VB¾ÖÓòÍøɨÃè

   ×î½üÓÉÓÚ¹¤×÷ÏîÄ¿Ô­Òò£¬ÁÙʱҪÇó×öÒ»¸ö¾ÖÓòÍøɨÃèÈí¼þ¡£¹¦ÄÜÒªÇó£¬É¨Ãè³öIPµØÖ·ÒÔ¼°¶ÔÓ¦µÄMACµØÖ·¡£¹¦ÄܱȽϼòµ¥¡£ÓÚÊǺܿì¾Í×öÁË¡£²ÉÓõĿª·¢¹¤¾ßÊÇ VB6.0
     ʹÓ÷½·¨ÊÇͨ¹ý·¢ËÍ ARP°ü£¬¹ã²¥ IPµØÖ·µÄ·½Ê½À´»ñµÃ ¶ÔÓ¦µÄ MACµØÖ·£¬SendARP£¨£©¡£
ÓÐһЩϸ½ÚҪעÒ⣬¾ÍÊÇ Êä³öMACµØÖ ......

vb ת C#

http://www.tangiblesoftwaresolutions.com/Product_Details/Instant_CSharp.html
http://www.tangiblesoftwaresolutions.com/?gclid=COeGzKKxo58CFQIupAodu2jvJQ
ÔÚÏß
VB.netºÍC#ÔÚÏß»¥×ª¹¤¾ß
http://bbs.51aspx.com/showtopic-2059.html
Convert VB.NET to C#
http://www.developerfusion.com/tools/convert/vb-to- ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ