TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rajkumar R
NA
183
221.2k
How to get monitor width and height in C# windows app?
Sep 5 2014 2:04 AM
Hi,
My machine in windows-7 & Screen resolution is (1366 * 768) Highly recommended.
float height = SystemInformation.VirtualScreen.Height;
float width = SystemInformation.VirtualScreen.Width;
double diagonal = Math.Sqrt(width * width + height * height);
The above code I have used to get width and height of the screen to calculate diagonal in windows application. But the problem here is when I change the resolution width and height also gets change. So I need a piece of code that should read height and weight to calculate diagonal size.
Please post solution for this post.
Thanks in Advance.
Reply
Answers (
5
)
users login/logout times on my site.
Attempted to read or write protected memory.