¸÷λ¸ßÊÖÇëÎÊÈçºÎʹÓÃVB¹Ø±ÕÆäËûÓ¦ÓóÌÐò
ÔÚVS2008ÖУ¬ÎÒÓÃshell´ò¿ªÁËpowerpoint£¬ÇëÎÊÔõôÑùʹÓÃVBÔٹرմò¿ªµÄÕâ¸öpowerpoint£¬Ê¾·¶¾ßÌåµÄAPI£¬Ð»Ð»£¡
0)
End If
Loop While (ProcessNext(hSnapShot, pe32))
CloseHandle (hSnapShot)
GetTargetProcessID = dwRet
End Function
Private Function CloseTargetProcess(ByVal dwProcessID As Long) As Boolean
Dim hProcess As Long
Dim lpExitCode As Long
hProcess = OpenProcess(PROCESS_ALL_ACCESS, False, dwProcessID)
If hProcess = 0 Then
CloseTargetProcess = False
Exit Function
End If
If GetExitCodeProcess(hProcess, lpExitCode) = 0 Then
CloseTargetProcess = False
Exit Function
End If
If TerminateProcess(hProcess, lpExitCode) = 0 Then
CloseTargetProcess = False
Else
CloseTargetProcess = True
End If
CloseHandle (hProcess)
End Function
Private Function CloseProcess(ProcessName As String)
On Error Resume Next
Dim ret As Long
ret = GetTargetProcessID(ProcessName)
If ret <> 0 Then
ret = CloseTargetProcess(ret)
End If
End Function
'µ÷ÓÃ
Call CloseProcess("powerpoint.exe") 'ÕâÀïµÄ½ø³ÌÃû±ØÐëÒ»ÖÂ. ´óСд¶¼ÒªÒ»Ñù
ллÁË£¬²»¹ýºÃÏñÄã˵µÄÄÇЩ²»ÊÇVS2008Öеģ¬ÏµÍ³¶¼²»ÈÏʶÕâЩOpenProcessµÈµÈµÄ
²»»áVBµÄÈËԱ·¹ý£¡°ï¶¥£¡
VB code
Code highl
Ïà¹ØÎÊ´ð£º
Ï£Íû´ó¼ÒÄܹ»°ïÎÒÏÂ.¸ÐлÁË..
Ô´Âë´«ÔÚ´óÃ×ÅÌ VB6 µÄÔ´Âë http://www.damipan.com/file/3wNoKLW.html
תΪVB.NETÔ´Âë.
СµÜÍêÈ«ÊÇÐÂÊÖ ²»¶®µÄ˵.Âé·³¸÷λ°ïæһÏÂ
ÎÒµÄEMAILÊÇ:4452 ......
ÔÚvbÕâ±à³ÌÀïËÆºõÓкܶàµÄ¶«Î÷ÊÇÏàÁªÏµµÄ£¬ÎªÊ²Ã´ÓÐЩÈ˶ÔvbµÄ±à³ÌÃþ²»µ½Í·ÄÔ°¡£¡²¢ÇÒÓÐЩʺÜÈÝÒ׵쬵«ÊÇÈ´°ÑËüÃǵĴúÂë±ä³É¸´ÔÓ£¬Ò²È¥ÏëһЩ²»ÄÜʵÏֵĶ«Î÷°¡£¡
û·ÖÁË£¬Â¥Ö÷¶àÀ´µã·Ö£¡
À´½Óµã·Ö
......
¸Õ½Ó´¥vb6.0£¬ÓÐЩÃþ²»µ½µÄ¸Ð¾õ£¬¾´Çë¸÷λ´óϺ¸øµã½¨Ò飡£¡£¡
²»»á°É£¬ÍƼöѧϰ.NET¡£Ë³±ãÍÆ¼öʵÓôúÂëÍøÕ¾http://bingning.net/free/source/index.html¡£
Èç¹ûû»ù´¡ ¾ÍÓÃÒ×ÓïÑÔ°É ÖÐÎıà³ÌÄØ ´úÂë¶¼ÊÇÖÐÎÄ ......
VBÔõÑù»ñµÃÊó±ê´¦µÄ³¬¼¶Á¬½ÓÄØ£¿
ÔÚWebBrowser¿Ø¼þÖÐÓÐÕâÑùÒ»¸öʼþ:StatusTextChange(index As Integer, ByVal Text As String)
ËüµÄText²ÎÊýÕýÊÇÊó±ê´¦µÄ³¬¼¶Á¬½Ó,µ«ÎÊÌâÊÇÈç¹ûÎÒµÄä¯ÀÀÆ÷Õýà ......