Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9281961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:15:04+00:00 2026-06-18T18:15:04+00:00

How do I position a Windows Form to the bottom-right of the screen when

  • 0

How do I position a Windows Form to the bottom-right of the screen when it gets open, instead of top-left?

Situation: I have a Form1 which doesn’t actually do anything as a form, I just used it for its context menu (my app works from the tray only). So, most of the main running code goes into the Form1 class. When a context menu is clicked, it will do some processing and in the end it will show Form2. So Form2 gets opened/called by a context menu item of Form1. How do I change Form2’s position in this case?

Form1.cs (part where Form2 gets triggered)

private void menu_upload_file_Click(object sender, EventArgs e)
{
    DialogResult dialogOpened = openFileDialog1.ShowDialog();
    if (dialogOpened == DialogResult.OK)
    {
        string filename = openFileDialog1.FileName;

        using (var client = new WebClient())
        {
            var response = client.UploadFile("http://localhost/imgitv3/upload.php?submit=true&action=upload&request=app", "POST", filename);
            // string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + Path.DirectorySeparatorChar + "response.txt";

            if (response != null)
            {
                string responseContent = System.Text.Encoding.ASCII.GetString(response);
                Form2 linkWindow = new Form2();

                if (isURL(responseContent))
                {
                    linkWindow.toTextBox(responseContent);
                    linkWindow.Show();
                }
            }
        }
    }
}

Form2.Designer.cs

// 
            // Form2
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.CausesValidation = false;
            this.ClientSize = new System.Drawing.Size(419, 163);
            this.Controls.Add(this.textBox2);
            this.Controls.Add(this.textBox1);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.label1);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox = false;
            this.MaximumSize = new System.Drawing.Size(435, 202);
            this.MinimizeBox = false;
            this.MinimumSize = new System.Drawing.Size(435, 202);
            this.Name = "Form2";
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
            this.Text = "IMGit Image Uploader";
            this.TopMost = true;
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            this.Load += new System.EventHandler(this.Form2_Load);
            this.ResumeLayout(false);
            this.PerformLayout();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T18:15:06+00:00Added an answer on June 18, 2026 at 6:15 pm

    There are two things you need to know. First is the working area of the screen on which you are going to display the form. The working area is the size of the screen minus the task bars displayed on that screen. You can use the Screen.WorkingArea property for that.

    Second is the actual size of the window. Which is not in general the design size of the form, your user might have altered the size of the text in the window titlebar or may be running the video adapter in a different DPI setting from yours. You have to wait until the form’s Load event fires before you know that size.

    So make your code look like this, assuming that you want to display the form on the primary monitor:

            var frm = new Form2();
            frm.Load += (s, ea) => {
                var wa = Screen.PrimaryScreen.WorkingArea;
                frm.Location = new Point(wa.Right - frm.Width, wa.Bottom - frm.Height);
            };
            frm.Show();
    

    Which relocates the window just before it becomes visible. The form’s StartPosition property doesn’t matter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Windows program which generates forms. It takes the Top/Left properties at
I have a Windows form with a calendar which is hidden. I want to
I have a form positioned slightly above the taskbar/system tray in the bottom right
I have a Windows form app. I get data based on a row position
I have a form called Form1. Its set to startup-Position = Center but when
In Autohotkey, I want to position my Gui window to right bottom of the
I have a .NET windows form page and a WebBrowser component inside. I load
I have datagridviews on windows form, i am adding records to datagridview using small
I have several images that I want to place in a windows form. The
I have a Windows Form VS2010 .NET 4 project with a standard DataGridView bound

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.