¥³¥ó¥Æ¥ó¥È¥Ø¥Ã¥À¡¼

Ads by Google

¾åµ­¤Î¹­¹ð¤Ï£±¥ö·î°Ê¾å¹¹¿·¤Î¤Ê¤¤¥Ö¥í¥°¤Ëɽ¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
¿·¤·¤¤µ­»ö¤ò½ñ¤¯»ö¤Ç¹­¹ð¤¬¾Ã¤»¤Þ¤¹¡£
¤³¤Î¥Ú¡¼¥¸¤Î¥È¥Ã¥×¤Ø
¥³¥ó¥Æ¥ó¥È¥Ø¥Ã¥À¡¼

C# controls problem of draw of weight of other program window (urgent) online etc! ! !

I use program of other application of API function GetWindowDC(advocate the window sentence handle) get DC
Found an object Graphicsg=Graphics.FromHdc(DC next)
Use G.DrawString(222222222 next, newFont(Arial, 60) , newSolidBrush(Color.Red) , 0, 0);
G.DrawString(11111111111111, newFont(Arial, 60) , newSolidBrush(Color.Red) , 0, 0);
I send other now applying on program window body 111 was together with 222 overlay, I try to be being drawn 22222 when G.clear() but discovery is no good, setting color changed, use transparent COLOR to also be no good, next I try to apply a program to send WM_PAINT message to that, discover that application process seems to be not answered, do not weigh draw, how should be this problem solved? I am to hope to be outputted in window body 222222222 hind window body refresh, next reexport 111111111111. 。Up。Transient。You try this API:

[DllImport(user32.dll, charSet=CharSet.Auto, exactSpelling=true) ]
PublicstaticexternboolRedrawWindow(IntPtrhwnd, COMRECTrcUpdate, intPtrhrgnUpdate, intflags);

Call a method following give typical examples:
RedrawWindow(GetDesktopWindow() , null, intPtr.Zero, 0x85);。LZ you add between DrawString:
Application.DoEvents();

Look feasible。Besides that API above, it is OK also to still have refresh window, nevertheless the original poster's circumstance suits above that, to be called when suit, I also give you this referenced API statement:
[DllImport(user32.dll, charSet=CharSet.Auto, exactSpelling=true) ]
PublicstaticexternboolUpdateWindow(IntPtrhWnd);
。Does COMRECT need Using what? 。It is OK that you pass an empty cost,
Its definition is as follows:

PublicclassCOMRECT
{
Publicintleft;
Publicinttop;
Publicintright;
Publicintbottom;
PublicCOMRECT()
{
}
PublicCOMRECT(intleft, inttop, intright, intbottom)
{
This.left=left;
This.top=top;
This.right=right;
This.bottom=bottom;
}
}。Study study
Still have a transparent quality。Actually a simple method also can be solved, choose use FillRectangle to draw the district of a picture namely,
Use DrawString to input character content next,
Need changes content when, again new use Rectangle to that window refresh
The other method that reuse DrawString inputs content or uses Graphics next inputs content.


The purpose is to replace Graphics.Clear method, because this method cannot designate cleared area, and use FillRectangle is very agile. 。Graphicsg=Graphics.FromHdc(DC);
G.DrawString(222222222, newFont(Arial, 60) , newSolidBrush(Color.Red) , 0, 0);
/ / found Graphics to try afresh
Graphicsg=Graphics.FromHdc(DC)
G.DrawString(11111111111111, newFont(Arial, 60) , newSolidBrush(Color.Red) , 0, 0);。Seem to do not have dropped method clear. I also had been done before. 。Two are of diverse line Cheng, can use entrust。RedrawWindow() screen can flash
¤³¤Î¥Ú¡¼¥¸¤Î¥È¥Ã¥×¤Ø
¥³¥ó¥Æ¥ó¥È¥Ø¥Ã¥À¡¼
¥³¥ó¥Æ¥ó¥È¥Ø¥Ã¥À¡¼

¥³¥á¥ó¥È¤ÎÅê¹Æ

Èó¸ø³«¥³¥á¥ó¥È

¤³¤Î¥Ú¡¼¥¸¤Î¥È¥Ã¥×¤Ø
¤³¤Î¥Ú¡¼¥¸¤Î¥È¥Ã¥×¤Ø
¥×¥í¥Õ¥£¡¼¥ë

Author:voip call
£Æ£Ã£²¥Ö¥í¥°¤Ø¤è¤¦¤³¤½¡ª

ºÇ¿·µ­»ö
ºÇ¿·¥³¥á¥ó¥È
ºÇ¿·¥È¥é¥Ã¥¯¥Ð¥Ã¥¯
·îÊÌ¥¢¡¼¥«¥¤¥Ö
¥«¥Æ¥´¥ê
¸¡º÷¥Õ¥©¡¼¥à
RSS¥ê¥ó¥¯¤Îɽ¼¨
¥ê¥ó¥¯
Powered By FC2¥Ö¥í¥°

º£¤¹¤°¥Ö¥í¥°¤òºî¤í¤¦¡ª

Powered By FC2¥Ö¥í¥°

¥Ö¥í¤È¤â¿½ÀÁ¥Õ¥©¡¼¥à

¤³¤Î¿Í¤È¥Ö¥í¤È¤â¤Ë¤Ê¤ë

£Ñ£Ò¥³¡¼¥É
£Ñ£Ò¥³¡¼¥É