The Location
property has type Point
which is a struct.
Instead of trying to modify the existing Point
, try assigning a new Point
object:
this.balancePanel.Location = new Point(
this.optionsPanel.Location.X,
this.balancePanel.Location.Y
);
Related Contents:
- How to get ALL child controls of a Windows Forms form of a specific type (Button/Textbox)?
- Get a Windows Forms control by name in C#
- Best way to access a control on another form in Windows Forms?
- Word wrap for a label in Windows Forms
- How to access a form control for another form?
- Find a control in Windows Forms by name
- How to access Winform textbox control from another class?
- Is it appropriate to extend Control to provide consistently safe Invoke/BeginInvoke functionality?
- Fake-scrolling containers with very many controls
- Pass click event of child control to the parent control
- C# Get a control’s position on a form
- What is the difference between User Control, Custom Control and Component?
- Getting The Location Of A Control Relative To The Entire Screen?
- How do you simulate Mouse Click in C#?
- How to configure an app to run correctly on a machine with a high DPI setting (e.g. 150%)?
- How to associate a file extension to the current executable in C#
- Controlling Volume Mixer
- How to double buffer .NET controls on a form?
- Load image from resources area of project in C#
- How to build splash screen in windows forms application?
- How to format DateTime columns in DataGridView?
- How can I close a login form and show the main form without my application closing?
- Is it possible to compile and execute new code at runtime in .NET?
- Transparent background image for Form – Smooth edge shape for the Form
- right click context menu for datagridview
- OLEDB Parameterized Query
- Single-assembly multi-language Windows Forms deployment (ILMerge and satellite assemblies / localization) – possible?
- Drawing glitches when using CreateGraphics rather than Paint event handler for custom drawing
- How can I disable a tab inside a TabControl?
- How can I get Visual Studio 2008 Windows Forms designer to render a Form that implements an abstract base class?
- What setup code should go in Form Constructors versus Form Load event?
- How can I draw a rounded rectangle as the border for a rounded Form?
- Zooming graphics based on current mouse position
- Can a class library have an App.config file?
- A PictureBox Problem
- Rounded edges in button C# (WinForms)
- Is the size of a Form in Visual Studio designer limited to screen resolution?
- expose and raise event of a child control in a usercontrol in c#
- passing values between forms (winforms)
- Process.Start to open an URL, getting an Exception?
- How do I change the culture of a WinForms application at runtime
- Raise an event when I hover the mouse over a ComboBox item
- How to change the button text for ‘Yes’ and ‘No’ buttons in the MessageBox.Show dialog?
- How to detect that C# Windows Forms code is executed within Visual Studio?
- Does the System.Windows.Forms.Timer run on a different thread than the UI?
- How to add buttons dynamically to my form?
- Use cookies from CookieContainer in WebBrowser
- Get current scroll position from rich text box control?
- What is the best way to determine application root directory?
- SaveFileDialog setting default path and file type?