TForm³£Óü¼ÇÉ
Ò»¡¢Èô°¿Ú×ÜÊÇÔÚ×îÇ°Ãæ Form µÄFormStyleÊôÐÔÉèÖÃΪfsStayOnTopÖµ¡£ ¶þ¡¢ ¶¯Ì¬µ÷Óô°ÌåForm ÔÚȱʡÇé¿öÏ£¬ ÓÉFile/New FormÉú³ÉÌí¼ÓÈëÏîÄ¿ÎļþÖÐµÄ ´°Ì嶼¾ßÓÐ"Auto Create"£¨×Ô¶¯´´½¨£©µÄÌØÐÔ¡£¼´Ö»Òª³ÌÐòÔËÐУ¬¸Ã´°Ìå¾Í´æÔÚÓÚ ÄÚ´æÖÐÁË£¬²»¹Üµ±Ç°ËüÊÇ·ñ±»µ÷Ó᣾ßÓÐÕâÖÖÌØÐԵĴ°ÌåÒ»°ãÊÊÓÃÓÚ´°ÌåÊôÐÔ±È½Ï ¹Ì¶¨¡¢¾³£±»µ÷ÓõÄÇé¿ö¡£ÆäÓŵãÊÇËٶȿ죬ȱµãÊÇÕ¼ÓÃÄÚ´æ¡£ÔÚʵ¼Ê³ÌÐòÉè ¼ÆÖУ¬»áÓö¼û´óÁ¿ÀàËƶԻ°¿ò¹¦ÄܵĴ°Ì壬ËüÃÇÓÃÓÚÏÔʾ״̬»òÊäÈëÐÅÏ¢£¬½öÐëÔÚ³Ì ÐòÖе÷ÓÃһϣ¬Íê³ÉÆ书ÄܾÍÐÐÁË£¬ÎÞÐ***פÄÚ´æ¡£Õâʱ¿ÉÒÔͨ¹ýÑ¡ÔñProject/Options/Forms£¬½«"Auto--Create forms " À¸ÖÐÏàÓ¦µÄ´°Ìå, ÈçForm1£¬ÓÃ" >" ¼üÒƶ¯µ½ "Available forms"À¸ÖУ¬²¢ÔÚ³ÌÐòÐèµ÷Óøô°Ìå´¦£¬¼ÓÈëÏÂÁÐÓï¾ä£º TForm1¡¡*myform=new TForm1(this); myform- >ShowModal(); delete myform; ´°ÌåForm1½öÊÇÔÚÐèÒªµ÷ ÓÃʱ²Åµ÷ÈëÄڴ棬µ÷ÓÃÍê³Éºó£¬¼´ÓÃdeleteÇå³ý³öÄÚ´æ¡£ÕâÑù¿É¼õÉÙ³ÌÐò¶ÔÄÚ´æ×ÊÔ´ µÄÕ¼ÓᣠÈý¡¢±éÀú´°Ìå¿Ø¼þµÄ·½·¨ Òª·ÃÎÊ»òÐ޸Ĵ°ÌåÉϵĿؼþ£¬·½·¨ºÜ¼òµ¥£¬ÒÔTEditΪÀý×Ó£º Edit1- >Text=""; Edit2- >Text=""; µ«Èç¹û´°ÌåÉÏÓÐÊ®À´¸öÏñEdit1 ÕâÑùµÄ¿Ø¼þ£¬ÐèÒª½øÐÐÏàͬµÄ³õʼ»¯£¬ÓÃÉÏÃæµÄ·½·¨Ò»¸öÒ»¸öµØ½øÐУ¬Æñ²»Âé·³ £¡ ËùÒÔÓбØÒªÕÆÎÕ ±é Àú´° Ìå ¿Ø ¼þ µÄ ·½ ·¨¡£ ÔÚ ½é ÉÜ ¸Ã ·½ ·¨ Ö®¡¡ Ç°£¬ Èà ÎÒ ÃÇ ÏÈÁË ½â Ò» Ï ´° ÌåForm µÄComponents ºÍControls Êô ÐÔ¡£ ²Î ¼û ±í Ò»¡£ ±í Ò»
ÏÂÃæÕâ¶Î´úÂëÍê³ÉÁ˶ÔPanel1ÉÏËùÓÐTEdit ¿Ø¼þµÄ±éÀú³õʼ»¯¡£¶ÁÕßÉÔ¼ÓÐ޸ģ¬¼´¿É¶ÔÆäËü¿Ø¼þ½øÐбéÀú¡£ÕâÀïÓÐÒ»¸öС¼¼ÇÉ£¬ ÎÒÃÇ°ÑÐèÒª½øÐгõʼ»¯µÄ¿Ø¼þ·ÅÖÃÔÚÁËÒ»Panel1ÉÏ£¬Óë²»ÐèÒª³õʼ»¯µÄ¿Ø¼þÇø·Ö¿ª À´£¬ÕâÑù±ãÓÚ±à³Ì¡£
ËÄ¡¢²»¹æÔò´°¿Ú 1.ÔÚ´°¿Ú¶¨ÒåÖÐ,¼ÓÈëHRGN hWndRgn; 2.ÔÚTForm::OnCreate()ÏûÏ¢º¯Êý×îºó,¼ÓÈëÏÂÃæµÄ´úÂë: hWndRgn=::CreateEllipticRgn(0,0,Width,Height); ::SetWindowRgn(hWndRgn,TRUE); 3.ÉèÖÃTFormµÄÊôÐÔΪÎÞ±êÌ⣬Îޱ߿ò¡£ 4.±àÒëÁ¬½ÓÓ¦ÓóÌÐò,¾Í¿ÉÒÔ¿´µ½Ò»¸öÍÖÔ²Ðδ°¿Ú¡£ Îå¡¢MDI Form 1.Application->CreateForm(__classid(Tjjcginput), &jjcginput); ºó²»ÓÃÔÚʹÓÃÏÔʾFormµÄÓï¾ä¾Í¿ÉÒÔÏÔʾ³öÀ´ÁË¡£ 2.form µÄonclose ʼþ±ØÐëÓÃÏÂÃæÓï¾äÊͷſռ䣺
|
ÁèÖڿƼ¼×¨ÒµÌṩ·þÎñÆ÷×âÓᢷþÎñÆ÷Íйܡ¢ÆóÒµÓʾ֡¢ÐéÄâÖ÷»úµÈ·þÎñ£¬¹«Ë¾ÍøÕ¾£ºhttp://www.lingzhong.cn ΪÁ˸ø¹ã´ó¿Í»§Á˽â¸ü¶àµÄ¼¼ÊõÐÅÏ¢£¬±¾¼¼ÊõÎÄÕÂÊÕ¼¯À´Ô´ÓÚÍøÂç,ÁèÖڿƼ¼×ðÖØÎÄÕÂ×÷ÕߵİæȨ£¬Èç¹ûÓÐÉæ¼°ÄãµÄ°æȨÓбØҪɾ³ýÄãµÄÎÄÕ£¬ÇëºÍÎÒÃÇÁªÏµ¡£ÒÔÉÏÐÅÏ¢ÓëÎÄÕÂÕýÎÄÊDz»¿É·Ö¸îµÄÒ»²¿·Ö,Èç¹ûÄúҪתÔر¾ÎÄÕÂ,Çë±£ÁôÒÔÉÏÐÅÏ¢£¬Ð»Ð»! |