473,385 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How can i open a new form in center of the screen?

Hello Experts,

Currently I am working on a windows application using vs.net 2002.

Assume I have two forms, form A and B, where form A is the main form. In
form A, I have a button which will load form B when click. The question
is how can I open form B in the center of the screen?
Thanks,

Benny

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
3 29098
APG
Hi Benny,

You can use the StartPosition to do that.

Like:

frmB.StartPosition = FormStartPosition.CenterScreen;
frmB.Show();

HTH,
APG

Benny wrote:
Hello Experts,

Currently I am working on a windows application using vs.net 2002.

Assume I have two forms, form A and B, where form A is the main form. In
form A, I have a button which will load form B when click. The question
is how can I open form B in the center of the screen?
Thanks,

Benny

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #2
in form B look in property window look down to StartPosition and selct
to CentreScreen.
regards

Benny wrote:
Hello Experts,

Currently I am working on a windows application using vs.net 2002.

Assume I have two forms, form A and B, where form A is the main form. In
form A, I have a button which will load form B when click. The question
is how can I open form B in the center of the screen?
Thanks,

Benny

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 16 '05 #3
Hello APG,

I tried that before, but form B always pop up on the top left corner,
any ideas why?
Thanks,

Benny
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ahmed Jewahar | last post by:
Hi All, I'm new to this forum as well as new to ASP.NET. My backgorund is ASP. But, I'm just doing my .NET course with MS Certified training center currently. I have couple of questions (it...
2
by: monika | last post by:
Hi all... I am able to select a student's story and open it in a word doc. the teacher then corrects the story, highlight in colors the comments, strikethrough. In fact all the privileges I...
11
by: Clare Hsiao | last post by:
Hi,everybody: How can I use window.open to Open a page in the center of screen? I know showModalDialog() can,but I have to run both in IE and NN, so I have to use window.open to open a new...
8
by: alanstew | last post by:
With the body tag calling out 'window onload', a function with a 'window.open' fails at the 'window.open' line. If I cut out the body tag, the function executes as normal. At first I thought it...
5
by: Sean Berry | last post by:
I have a news video that I am sending out for a client. There are embedded links to flash movies in the email. I want the popup to be a set size (400 x 400). I am currently using the...
23
by: Markus | last post by:
Hi, i have this problem: Sometimes, i can't reproduce, if i click on an small image on the website, the popup _AND_ an other Tab in firefox open. Here are the linkcode: <div...
0
by: Keith | last post by:
I have a web form that contains a repeater control that is designed to ask like a check book register. Clicking on a certain transaction takes the user to a different .aspx page where it can be...
0
by: Keith | last post by:
I have a web form that contains a repeater control that is designed to ask like a check book register. Clicking on a certain transaction takes the user to a different .aspx page where it can be...
5
by: plumba | last post by:
Hi all I have a form (see below), which for some reason has decided to stop functioning all together. It just does not call up the function. It is called up in the opening <form> tag but...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.