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

VBʵÏÖÈ«´°ÌåÒƶ¯

Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
ReleaseCapture
SendMessage hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0
End If
End Sub
http://topic.csdn.net/t/20030524/18/1829023.html
http://zhidao.baidu.com/question/93411647.html?fr=qrl&cid=867&index=5&fr2=query
ÎÒÏë°Ñform5Òƶ¯µ½form3ÖÐpicture1µÄλÖã¬ÏÂÃæÊÇÎҵĴúÂ루ÔÚform3µÄcodeÖУ©£º
Dim r2 As RECT
GetWindowRect Picture1.hwnd, r2
Form5.ScaleMode = vbPixels 'ÉèÖÃ×ø±êµ¥Î»ÎªÏñËØ
Form5.Move r2.Left, r2.Top
Form5.Show
ΪʲôÒƶ¯µÄ×ø±êÈÔÈ»ÊÇĬÈϵÄ羶ø²»ÊÇÆÁÄ»ÏñËØÄØ£¿
ÇëÖ¸½Ì£¡
ÎÊÌâ²¹³ä£º
ҪʵÏÖ´°¿ÚµÄÕýÈ·Òƶ¯£¬Ó¦¸ÃÔõô×ö£¿
½«form5µÄ×óÉϽǵÄλÖÃŲµ½form3ÖÐpicture1×óÉϽǵÄλÖÃ
 'form3ÖÐ
Private Type rect
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As rect) As Long
Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
Private Sub Command1_Click()
Dim wrect As rect
Dim picrect As rect
GetWindowRect Picture1.hwnd, picrect
GetWindowRect Form5.hwnd, wrect
MoveWindow Form5.hwnd, picrect.Left, picrect.Top, wrect.Right - wrect.Left, wrect.Bottom - wrect.Top, True
Form5.Show
End Sub


Ïà¹ØÎĵµ£º

VBÎļþ·ÛËé»ú


'´úÂë:
Option Explicit
'======================ÓÃÓÚ²éÕÒ½ø³ÌºÍÖÕÖ¹½ø³ÌµÄAPIº¯Êý³£Êý¶¨Òå================ =====
Private Declare Function CreateToolhelpSnapshot Lib "kernel32" Alias "CreateToolhelp32Snapshot" (ByVal lFlags As Long, ByVal lProcessID As Long) As Long
Private Declare Function ProcessF ......

VBÓëFTP±à³Ì

Option Explicit
Private Const INTERNET_OPEN_TYPE_DIRECT = 1
Private Const scuseragent = "vb wininet"
Private Const INTERNET_FLAG_PASSIVE = &H8000000
'µ÷ÓÃÉèÖû·¾³
Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long ......

VB MSHFLEXGRID MSHFLEXGRID ͬʱѡÖв»Á¬ÐøµÄ¶àÐÐ

  ÔÚ¹¤³ÌÖÐÌí¼ÓÒ»¸öÀàÄ£¿é£¬ÃûΪ   Selection  
  È»ºó¼ÓÈëÒÔÏ´úÂ룺  
   
  Dim   colRows   As   Collection  
  Dim   ControlKey   As   Boolean  
  Public   WithEvents   flx   As   M ......

vb ´®¿ÚͨѶ

MSComm¿Ø¼þÌṩÁËÁ½ÖÖ´¦ÀíͨÐŵķ½Ê½£ºÒ»ÖÖΪʼþÇý¶¯·½Ê½£¬¸Ã·½Ê½Ï൱ÓÚÒ»°ã³ÌÐòÉè¼ÆÖеÄÖжϷ½Ê½¡£µ±´®¿Ú·¢Éúʼþ»ò´íÎóʱ£¬MSComm¿Ø¼þ»á²úÉúOnCommʼþ£¬Óû§³ÌÐò¿ÉÒÔ²¶»ñ¸Ãʼþ½øÐÐÏàÓ¦´¦Àí¡£±¾ÎĵÄÁ½¸öÀý×Ó¾ù²ÉÓø÷½Ê½¡£ÁíÒ»ÖÖΪ²éѯ·½Ê½£¬ÔÚÓû§³ÌÐòÖÐÉè¼Æ¶¨Ê±»ò²»¶¨Ê±²éѯ MSComm¿Ø¼þµÄijЩÊôÐÔÊÇ·ñ·¢Éú±ä»¯£¬´Ó¶øÈ ......

vbÓÃapiµ÷ÓöԻ°¿ò

½¨Ò»¸öÄ£¿é
Public Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
Public Type OPENFILENAME
lStructSize As Long
hwndOwner As Long
hInstance As Long
lpstrFilter As String
lpstrCustomFilt ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ