c# - Updating string in a picture box -


this question has answer here:

i want create little game. therefore need help, because last time used graphics-library 10 years ago.

what plan do: have picturebox , grapics object

graphics g; void mainthread() {     thread.sleep(500);     g.fillrectangle(mybrushes.white, 0, 0, pbimage.width, pbimage.height);     graphics gblank = g;     while (shown)     {         g = gblank;         g.drawstring(string.format("x: {0}\ny: {1}", mousechords.x, mousechords.y), new font("arial", 10.0f), mybrushes.black, 755,560);         thread.sleep(50);     } }  public frmmain() {     g = pbimage.creategraphics();     thrmain = new thread(new threadstart(mainthread)); } 

i'd update cursorposition in down right corner, i'm moving mouse on control looks this.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -