VB °æ (¾«»ªÇø)
·¢ÐÅÈË: zhaowei (»¹Öé¸ñ¸ñ), ÐÅÇø: VisualBasic
±ê Ìâ: Visual BasicÖеĽçÃæÉè¼ÆÔÔòºÍ±à³Ì¼¼ÇÉ7
·¢ÐÅÕ¾: ×Ï ¶¡ Ïã (Tue Jun 1 18:18:44 1999), תÐÅ
²Ëµ¥ÏîµÄÆäËûÊôÐÔ
ÓÃALT+×Öĸ¼ü¼¤»î¶¥²ã²Ëµ¥£¬»òÕßÔڲ˵¥¼¤»îºóÓÃ×Öĸ¼ü¼¤»î
Ò»¸ö²Ëµ¥Ï±ØÐëѧ»áʹÓÃ&¡£&ÓÃÔڲ˵¥ÏîµÄ±êÌâÊôÐÔ
(Caption)Àï¡£ËüµÄÓ÷¨ºÍ×÷ÓÃÓëÔÚÓÃCÓïÑÔ±àÖƵÄWindows³ÌÐò
ÖеÄÓ÷¨ºÍ×÷ÓÃÏàͬ¡£
ÓÐʱϣÍû¶¥²ã²Ëµ¥Ö®¼äµÄ¼ä¸ô´óһЩ£¬»òÕßij¸ö¶¥²ã²Ëµ¥³öÏÖ
Ôڲ˵¥ÌõµÄ×îÓҶˣ¬Õâʱ¾ÍÒªÓõ½±êÌâÊôÐÔÊÇ¿Õ¸ñµÄ²Ëµ¥¡£Èç
¹ûÒ»¸ö²Ëµ¥µÄ±êÌâÊÇÓɶà¸ö¿Õ¸ñ×é³ÉµÄ£¬ÄÇôÕâ¸ö²Ëµ¥Ôڲ˵¥
ÌõÉϾÍÕ¼Óøú¿Õ¸ñµÄ¸öÊýÏàÓ¦µÄ¿Õ¼ä£¬²¢ÇÒËüºóÃæµÄ²Ëµ¥Ò²Ë³
ÐòµØºóÒÆ£»Èç¹ûÕâ¸ö²Ëµ¥µÄVisibleÊôÐÔÊÇFalse£¬ÄÇôËü¾Í¸ú
²»´æÔÚÒ»Ñù¡£
¡¡
´°¿ÚÉè¼ÆµÄÔÔòºÍ¾ÙÀý
ÏÂÃæÊÇÒ»¸ö¸¡¶¯´°¿Ú¼¼ÊõµÄÀý×Ó¡£ÎªÁËÒýÆðÓû§µÄ×¢Ò⣬»òÕß
±ØÐë±£Ö¤º¬ÓÐÖØÒªÐÅÏ¢µÄ´°¿Ú²»±»ÆäËû´°¿Ú¸²¸Ç£¬¾ÍÒªÓõ½¸¡
¶¯´°¿Ú¼¼Êõ£¬½¨Á¢Ò»¸ö¡°×ÜÔÚ×îÇ°Ã桱(TopMost)µÄ´°¿Ú¡£¾ßÌå
µÄ×ö·¨ÊÇ£º
(1)ÔÚVB³ÌÐòÖмÓÈëÈçϵÄÉùÃ÷£º
Declare Function SetWindowPos Lib"user"(Byval h%,Byval
hb%,Byval x%,Byval y%,By
val cx%,Byval cy%,Byval f%)As Integer
Global Const SWP_NOMOVE=2
Global Const SWP_NOSIZE=1
Global Const HWND_TOPMOST= 1
Global Const HWND_NOTOPMOST=2
Global Const FLAGS=SWP_NOMOVE Or SWP_NOSIZE
(2)¼ÙÉèÒª°Ñ´°ÌåfrmExampleÉèÖóÉ×ÜÔÚ×îÇ°ÃæµÄ´°¿Ú£¬Ö»ÒªÔÚ
frmExample´°ÌåµÄForm_Load¹ý³ÌÀï¼ÓÈëÒÔÏ´úÂ룺
Dim success%
success=SetWindowPos(frmExample.hWnd,HWND_TOPMOST,0,0,0,0,FLAGS)
Èç¹ûҪȡÏû×ÜÔÚ×îÇ°ÃæµÄÌØÐÔ£¬Ôò¿ÉÒÔÖ´ÐÐÈçϵĴúÂ룺
success=SetWindowPos(frmExample.hWnd,HWND_NOTOPMOST,0,0,0,0,FLAGS)
success²»µÈÓÚ0±íʾSetWindowPosÖ´Ðгɹ¦¡£
ÔÚMDI³ÌÐòÀÓÐÒ»¸ö´°¿ÚÊÇËùÓÐÆäËû´°¿ÚµÄ¸¸´°¿Ú£¬¸÷¸ö×Ó´°
¿ÚÍê³ÉÏà¶Ô¶ÀÁ¢µÄ¹¦ÄÜ£¬¾ÍÏñÊǶà¸ö¶ÀÁ¢µÄ¹¤¾ß×éºÏÆðÀ´Ò»
Ñù¡£ÔÚÕâ·½Ã棬MS WordºÍWindowsµÄFile ManagerÊÇ×îºÃµÄÀý
×Ó¡£
--
----------------------
%-% Éí ÈË
% * * % ²» ÔÚ
% . % / ÓÉ ½
\\--/ ¼ººþ º
-----------------------
¡ù À´Ô´:£®×Ï ¶¡ Ïã bbs.hit.edu.cn£®[FROM: 202.118.243.47]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º3.254ºÁÃë