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 1055811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:37:13+00:00 2026-05-16T17:37:13+00:00

Using Visual Studio 2008, windows forms, C#, .NET 2.0 … Is there a code-less

  • 0

Using Visual Studio 2008, windows forms, C#, .NET 2.0 …

Is there a code-less way to get a control (it happens to be a PictureBox in my case) to stay centered as the window is resized? In other words, using some combination of property settings rather than writing code by hand to keep the element centered.

For example, there’s a button in the center of a windows forms window, when the user resizes the window, the button will stay fixed in place based on its default anchoring (top,left). What I’d like it to do is to stay centered, regardless of how the window is resized.

I’m aware that I could watch for a window resize event and then have all elements on the form reposition themselves to stay in their same relative positions (based on code I would write to have them do that). I’m hoping that there is some combination of property settings to acheive the same effect.

As suggested in other posts, I’ve tried using the TableLayout control, but could use a shove in the right direction in terms of the specific solution to centering an element.

  • 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-05-16T17:37:14+00:00Added an answer on May 16, 2026 at 5:37 pm

    Center your control in the designer and set its Anchor property to None.

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

Sidebar

Related Questions

Using Visual Studio 2008, c#, .net 2.0. I have a Windows Forms client application
I'm using Visual Studio 2008, .net Framework 3.5 for a Windows forms client-server app
The only way to install windows-service I know is using Visual Studio 2008 Command
I've developed a Notepad kinda Windows application in VB.NET using Visual Studio 2008. Is
I am using Visual Studio 2008 and VB.NET. I've got a listview control on
I am building a Windows Application using Visual Studio 2008. For the forms (2
I'm trying to put a plain image on a System.Windows.Forms.StatusStrip control (Visual Studio 2008,
I'm developing an application for Windows Mobile Devices using Visual Studio .NET 2008 whose
I'm using Visual Studio 2008 Professional in C++ with Windows Form, I have a
I'm using pthread on Windows Form in Visual Studio 2008 Professional, But I'm getting

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.