Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / March 2007

Tip: Looking for answers? Try searching our database.

Screen dimensions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lupo - 26 Feb 2007 10:22 GMT
Hi!
I need to create a form and fill it with a number of button decided at
run-time..then I need to create this buttons according to their number such
that they adapt on the whole screen dimension..
Is there any property or anything that tells me this?
Thanx!!!
Davide
Bryan Phillips - 14 Mar 2007 20:00 GMT
Use this code which is tolerant of multiple monitors:

    public class Form1 : Form
    {
        public Form1(){
            this.Load += new EventHandler(Form1_Load);
        }
       
        public void Form1_Load(object sender, EventArgs e)
        {
            MessageBox.Show("The screen resolution is: " +
Screen.FromControl(this).Bounds);
        }
    }

--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog:  http://bphillips76.spaces.live.com

> Hi!
> I need to create a form and fill it with a number of button decided at
[quoted text clipped - 3 lines]
> Thanx!!!
> Davide

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.