473,498 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

set control position in the middle of form

70 New Member
hi , i have a panel control which contain 4 buttons and i want to display the panel control in the middle of the form, so that buttons can be displayed in the middle of the form. what is the solution ?
Mar 27 '07 #1
3 1373
kenobewan
4,871 Recognized Expert Specialist
Have you tried CSS?
Mar 27 '07 #2
pankajprakash
70 New Member
Have you tried CSS?
actually i am have a window form. And if i use dock property then it is not working properly. so i want to set the location of panel during the form load.
Mar 27 '07 #3
pankajprakash
70 New Member
actually i am have a window form. And if i use dock property then it is not working properly. so i want to set the location of panel during the form load.
I got the solution

pnlButton.Location = New System.Drawing.Point((Me.Width / 2) - (pnlButton.Width / 2), (Me.Height / 2) - (pnlButton.Height / 2))
Mar 27 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2131
by: Steve | last post by:
Hi all Is there a way in which I can get the Form's position on the screen in pixels? I am having to position another form in relation to an MDI Child form, so I cannot use the Location...
13
2053
by: Will Pittenger | last post by:
I have a Control derived class. When the parent of the control changes the control's Location property, the stack overflows. I have not found a way to find out what was on the stack when it does...
16
3035
by: DFS | last post by:
If you're listening, I want the middle of the calendar (showing 1 month) to open below the cursor position. It currently opens just to the right and below the cursor position. I hunted through...
1
5398
by: Jorge Ponte | last post by:
hi I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In that WUC I want have a textbox and a button. I want to click on the button and open a popup (I use javascript for...
6
10917
by: Colin McGuire | last post by:
Hello experts, this is a repost but I have been (much) more clear. I want to know the position of the horizontal scrollbar in a textbox as a percentage - if the horizontal scrollbar is hard...
4
1418
by: Dragon | last post by:
Hello! I'm writing user control, the custom progress bar. It should show current position, when application is playing an MP3 file. The problem is that sometimes, when it redraws itself, it...
4
1806
by: sperotti | last post by:
I am writing a windows application using VS 2005. I have a user control that returns customer data. I have placed this customers user control on several forms in my application. In the OnLoad...
7
28334
by: Joe-Paul Robb, Jr. | last post by:
Hello: I am building a program in Visual Basic 6.0. (Op Sys: Windows XP 2002 Service Pack 2) I placed an AOD Data Control on a form...and a data Grid. I bound the data grid to the data...
12
4179
by: slartybartfast | last post by:
I'm new(ish) to css, comfortable using tables, but trying real hard to move away. Please see http://84.9.125.31/developer/css_test/test5.html NB This issue is with IE & Opera - I've tried IE...
0
7126
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7210
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5465
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4595
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3087
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1424
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
293
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.