VB ²éÕÒÓÎÏ·´°¿Ú¾ä±úµÄ·½·¨
VB ²éÕÒÓÎÏ·´°¿Ú¾ä±úµÄ·½·¨
ÐÅÏ¢À´Ô´£ººÚ¿Í´úÂë ±à¼£ºroot ä¯ÀÀ´ÎÊý£º191 ¼ÓÈëʱ¼ä£º2010-3-20 1:40:47 ÆÀÂÛ(0)
[ÎÊÌâÒ»,²»ÄÜ»ñµÃ´°¿Ú¾ä±ú]
Ò»°ãѰÕÒ´°¿Ú¾ä±ú¶¼ÊÇÖ±½ÓFindWindow°É,ÕâÑùÊDz»ÐеÄ,QQÈý¹úÔÚÕâЩº¯ÊýÉÏ×öÁËһЩ´¦Àí.ÎÒÀ´¸ø´ó¼Ò˵¸öÍòÄܵķ½·¨°É,
¶ÔÓÚGetWindowText·½·¨ÓÎÏ·¾Í¹Ü²»µ½ÁË,¿ÉÒÔÅäºÏʹÓÃGetWindowÀ´Ã¶¾ÙËùÓеĴ°¿Ú,ÔÙÅжÏö¾ÙµÄ´°¿ÚÀïÃæÊÇ·ñº¬ÓÐÓÎÏ·´°¿Ú±êÌâÎÄ×Ö,
×îºóÈ¡Æä¾ä±ú¾ÍÐÐÁË,ÏÂÃæÎÒ¸ø¶Î´úÂë,Ò²¸ø»¹ÓÐÒÉÎʵÄÅóÓÑһЩ°ïÖú,ÎûÎû!
Option Explicit
Private Declare Function GetDesktopWindow Lib "USER32" () As Long
Private Declare Function GetWindow Lib "USER32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Public Declare Function GetWindowText Lib "USER32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Const GW_CHILD = 5
Private Const GW_HWNDNEXT = 2
Public Function GetHandle(Title As String) As Long
Dim tmp As String
Dim hwnd As Long
Dim lngProcID As Long
Dim strTitle As String * 255 '//ÓÃÀ´´æ´¢´°¿ÚµÄ±êÌâ
'//È¡µÃ×ÀÃæ´°¿Ú
hwnd = GetDesktopWindow()
'//È¡µÃ×ÀÃæ´°¿ÚµÄµÚÒ»¸ö×Ó´°¿Ú
hwnd = GetWindow(hwnd, GW_CHILD)
'//ͨ¹ýÑ»·À´Ã¶¾ÙËùÓеĴ°¿Ú
Do While hwnd <> 0
'//È¡µÃÏÂÒ»¸ö´°¿ÚµÄ±êÌ⣬²¢Ð´Èëµ½Áбí¿òÖÐ
GetWindowText hwnd, strTitle, Len(strTitle)
If left$(strTitle, 1) <> vbNullChar Then
tmp = left$(strTitle, InStr(1, strTitle, vbNullChar))
If left(tmp, Len(Title)) = Title Then
GetHandle=hwnd
&
Ïà¹ØÎĵµ£º
×ö¸ömp3²¥·ÅÆ÷£¬ÓÃrealplayºÍWMP×ö³öÀ´µÄ³ÌÐòÄÚ´æÕ¼ÓÃÌ«´ó¡£
Èç¹ûÄã½ö½öÊDz¥·ÅMP3£¬½¨ÒéʹÓÃAPIº¯ÊýmciSendString¡£
Option Explicit
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal
lpstrReturnString As String, ByVal uReturnLength As Lo ......
Dim strPath As String = Server.MapPath("~\Îļþ¼Ð")
'Åжϱ£´æÎļþ·¾¶ÊÇ·ñ´æÔÚ ²»´æÔÚÔò´´½¨
If Not Directory.Exists(strPath) Then
Directory ......
Private Function NMoneyToSMoney ( NMoney As Variant ) As String
If IsNumeric ( NMoney ) = False Then
NMoneyToSMoney = "²»ÊÇÊý×ÖÀ ......
VB Winsock StateÊôÐÔÖµ
'winsock ״̬³£Êý
'sckClosed 0 ¹Ø±Õ״̬
'sckOpen 1 ´ò¿ª×´Ì¬
'sckListening 2 ÕìÌý״̬
'sckConnectionPending 3 Á¬½Ó¹ÒÆð
'sckResolvingHost 4 ½âÎöÓòÃû
'sckHostResolved 5 ÒÑʶ±ðÖ÷»ú
'sckConnecting 6 ÕýÔÚÁ¬½Ó
'sckConnected 7 ÒÑÁ¬½Ó
'sckClosing 8 ͬ¼¶ÈË ......
ת×Ô£ºhttp://tieba.baidu.com/f?kz=139765011
ÿ¸öº¯Êý¶¼¿ÉÒÔÇ¿ÖÆ½«Ò»¸ö±í´ïʽת»»³ÉijÖÖÌØ¶¨Êý¾ÝÀàÐÍ¡£
Óï·¨
CBool(expression)
CByte(expression)
CCur(expression)
CDate(expression)
CDbl(expression)
CDec(expression)
CInt(expression)
CLng(expression)
CSng(expression)
CStr(expression) ......