VB °æ (¾«»ªÇø)
·¢ÐÅÈË: bloom (©À©Á©Â©Ã©Ä©Æ©Ç¨), ÐÅÇø: VB
±ê Ìâ: SetWindowPos(¿Ø¼þÓëÏûÏ¢)(תÔØ)
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (2000Äê09ÔÂ07ÈÕ18:41:57 ÐÇÆÚËÄ), תÐÅ
¡¾ ÒÔÏÂÎÄ×ÖתÔØ×Ô cnTemp ÌÖÂÛÇø ¡¿
¡¾ ÔÎÄÓÉ bloom Ëù·¢±í ¡¿
·¢ÐÅÈË: yucheng (ÎÞ»°¿É˵), ÐÅÇø: VisualBasic
·¢ÐÅÕ¾: BBS ˮľÇ廪վ (Wed Mar 29 23:29:01 2000) WWW-POST
SetWindowPos
VBÉùÃ÷
Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd
As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long,
ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
˵Ã÷
Õâ¸öº¯ÊýÄÜΪ´°¿ÚÖ¸¶¨Ò»¸öÐÂλÖúÍ״̬¡£ËüÒ²¿É¸Ä±ä´°¿ÚÔÚÄÚ²¿´°¿ÚÁбíÖеÄλÖ᣸Ã
º¯ÊýÓëDeferWindowPosº¯ÊýÏàËÆ£¬Ö»ÊÇËüµÄ×÷ÓÃÊÇÁ¢¼´±íÏÖ³öÀ´µÄ£¨ÔÚvbÀïʹÓãºÕë¶Ôvb
´°Ì壬ÈçËüÃÇÔÚwin32ÏÂÆÁ±Î»ò×îС»¯£¬ÔòÐèÖØÉè×²¿×´Ì¬¡£ÈçÓбØÒª£¬ÇëÓÃÒ»¸ö×ÓÀà
´¦ÀíÄ£¿éÀ´ÖØÉè×²¿×´Ì¬
·µ»ØÖµ
Long£¬·ÇÁã±íʾ³É¹¦£¬Áã±íʾʧ°Ü¡£»áÉèÖÃGetLastError
²ÎÊý±í
²ÎÊý ÀàÐͼ°ËµÃ÷
hwnd Long£¬Óû¶¨Î»µÄ´°¿Ú
hWndInsertAfter Long£¬´°¿Ú¾ä±ú¡£ÔÚ´°¿ÚÁбíÖУ¬´°¿Úhwnd»áÖÃÓÚÕâ¸ö´°¿Ú¾ä±úµÄºóÃæ
¡£Ò²¿ÉÄÜÑ¡ÓÃÏÂÊöÖµÖ®Ò»£º
HWND_BOTTOM ½«´°¿ÚÖÃÓÚ´°¿ÚÁбíµ×²¿
HWND_TOP ½«´°¿ÚÖÃÓÚZÐòÁеĶ¥²¿£»ZÐòÁдú±íÔÚ·Ö¼¶½á¹¹ÖУ¬´°¿ÚÕë¶ÔÒ»¸ö¸ø¶¨¼¶±ðµÄ
´°¿ÚÏÔʾµÄ˳Ðò
HWND_TOPMOST ½«´°¿ÚÖÃÓÚÁÐ±í¶¥²¿£¬²¢Î»ÓÚÈκÎ×²¿´°¿ÚµÄÇ°Ãæ
HWND_NOTOPMOST ½«´°¿ÚÖÃÓÚÁÐ±í¶¥²¿£¬²¢Î»ÓÚÈκÎ×²¿´°¿ÚµÄºóÃæ
x Long£¬´°¿ÚеÄx×ø±ê¡£ÈçhwndÊÇÒ»¸ö×Ó´°¿Ú£¬ÔòxÓø¸´°¿ÚµÄ¿Í»§Çø×ø±ê±íʾ
y Long£¬´°¿ÚеÄy×ø±ê¡£ÈçhwndÊÇÒ»¸ö×Ó´°¿Ú£¬ÔòyÓø¸´°¿ÚµÄ¿Í»§Çø×ø±ê±íʾ
cx Long£¬Ö¸¶¨ÐµĴ°¿Ú¿í¶È
cy Long£¬Ö¸¶¨ÐµĴ°¿Ú¸ß¶È
wFlags Long£¬°üº¬ÁËÆì±êµÄÒ»¸öÕûÊý
SWP_DRAWFRAME ΧÈÆ´°¿Ú»Ò»¸ö¿ò
SWP_HIDEWINDOW Òþ²Ø´°¿Ú
SWP_NOACTIVATE ²»¼¤»î´°¿Ú
SWP_NOMOVE ±£³Öµ±Ç°Î»Öã¨xºÍyÉ趨½«±»ºöÂÔ£©
SWP_NOREDRAW ´°¿Ú²»×Ô¶¯ÖØ»
SWP_NOSIZE ±£³Öµ±Ç°´óС£¨cxºÍcy»á±»ºöÂÔ£©
SWP_NOZORDER ±£³Ö´°¿ÚÔÚÁбíµÄµ±Ç°Î»Öã¨hWndInsertAfter½«±»ºöÂÔ£©
SWP_SHOWWINDOW ÏÔʾ´°¿Ú
SWP_FRAMECHANGED Ç¿ÆÈÒ»ÌõWM_NCCALCSIZEÏûÏ¢½øÈë´°¿Ú£¬¼´Ê¹´°¿ÚµÄ´óСûÓиıä
×¢½â
´°¿Ú³ÉΪ×¼¶´°¿Úºó£¬ËüÏÂÊôµÄËùÓд°¿ÚÒ²»á½øÈë×¼¶¡£Ò»µ©½«ÆäÉèΪ·Ç×¼¶£¬Ôò
ËüµÄËùÓÐÏÂÊôºÍÎïÖ÷´°¿ÚÒ²»áתΪ·Ç×¼¶¡£ZÐòÁÐÓô¹Ö±ÓÚÆÁÄ»µÄÒ»¸ù¼ÙÏëZÖáÁ¿»¯ÕâÖÖ
´Ó¶¥²¿µ½µ×²¿ÅÅÁеĴ°¿Ú˳Ðò
Àý×Ó£º
1-12£¬1-21,1-31,
--
--
¡î À´Ô´:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn£®[FROM: blo0m.bbs@smth.org]
--
¡ù תÔØ:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn£®[FROM: 202.118.247.254]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º2.606ºÁÃë