Windows.Forms namespace?

andreacioci

New member
Joined
Jun 16, 2010
Messages
3
Programming Experience
3-5
Why I'm not able to see the System.Windows.Forms namespace using the visual basic .net express 2010. Anyone has encountered and hopefully solved this problem?
 
If it's a WPF app then you don't need the System.Windows.Form's namespace since those controls are for WinForms and not WPF app's.
 
Hmm, I guess the Screen class is in the System.Windows.Forms namespace, which is dumb because WPF apps would need it too so it shouldn't be strictly tied to WinForms programming, but never the less it is and there doesn't seem to be a WPF screen class either. What you can do is open the project's properties, click the 'References' tab and click the add button. Scroll down to System.Windows.Forms and click ok, now you have a reference to that dll and you should be able to use the Screen class now.

Edit: I did a google search for "get screen size in WPF" and didn't get any results that didn't require a reference to System.Windows.Forms, how'd you find that John?
 
how'd you find that John?
Using Google searching "wpf screen size".
And in case post gets lost, SystemParameters has properties that provide this info.
 
Back
Top