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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -