Quantcast
Viewing all articles
Browse latest Browse all 12583

Static Class Question

Hi everyone.  I have code that gets the DPI Scaling for the screen and I am trying to move this into a class to make it more useful.

My problem is this line here:

Graphics g = this.CreateGraphics();

I realize that I can't use this in a static class, but what do I use instead?

I read a few other threads about this and it was recommeneded to use the Class Name but that then couldn't find CreateGraphics.

Thanks for your help.


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>