473,672 Members | 2,945 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

StartPosition.C enterParent

Hi Guys and Gals,

I have a small, two form, application. Form1 is the main window and Form2 is
a small window that has a label and a progress bar on it. I wish to display
form2 whilst doing some processing in Form1 and update Form2 as the
processing is being completed. I have the update functionality working
properly, what I can't seem to get working is the functionality of being
able to position Form2 in the centre of Form1. I have set the StartPosition
property to CenterParent, but I can't seem to find a property where I can
set the parent property of Form2. Forms do have a Parent property,
unfortunately it's read only. I can get the form to behave, more or less,
correctly if I use ShowDialog instead of Show but that holds up processing
whilst the form waits to receive input it can pass back to the main form,
which of course is not ever going to come, as the form has no inputs of any
kind. The application is not an MDI application so I can't use the MDIParent
property.

I would also like to stop the form from being moved. Anyone know what
property or properties need to be set to make this happen? And I'd like to
turn off it's titlebar if possible.

Thanks

Regards

Greg
Nov 15 '05 #1
0 2796

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

Similar topics

1
1963
by: DotNetMania | last post by:
How do you specify the startPosition of common dialog boxes in C#? such as OpenFileDialog there is not Position or Location method.... best regards... charles
1
1361
by: Richard Loupatty | last post by:
Does anyone know how to control windows mediaplayer? I would like to give the user the possibility to skip in the player by setting a new startposition. tia Richard
2
2145
by: Stephen Costanzo | last post by:
I have a blank form and my Sub New is as follows: Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent()
5
4463
by: Howard | last post by:
how can i make a program that always start at the top left corner of the screen in c#? vs does seem to have that option
3
11008
by: sklett | last post by:
I thought this would be easy. I want to position a login form based on whether or not it has a parent form, so I tried this: <code> if (ParentForm == null) { StartPosition = FormStartPosition.CenterScreen; } else {
1
15520
by: gewe | last post by:
I have a form (sizeable border, shows in taskbar, nothing unusual), which is the main form of my application (called MainForm). During an operation progress is shown in another form, that is shown from within the main form with: pf.Show(this); I have set the StartupPosition of the form pf to CenterParent. When the form shows, it is not centered on the parent. How can I get the progress form to be shown centered on the main form?
2
13533
by: Phillip Ross Taylor | last post by:
I have configured a few of the windows I am working on to have the form value "Start Position" to be "CenterParent" but some of them don't. Does Center Parent only work when the dialog is modal? I'm not writing an MDI application so I other posts I've read just don't seem very relevent. Do I have to explicitly set the parent??? What if I don't know it is?
4
5291
by: > Adrian | last post by:
I have "CenterParent" in the Properties and in the form location in the application, and still the form that is called does not get positionned center parent. Parent = this; produces errors. How do I get a form to go center parent? Thank you. Adrian.
6
5196
by: Eric B. | last post by:
I posted about this before but it is still bugging me. I am creating an instance of form2 from my form1, and although I have the StartPosition set to CenterParent for the form2 it is not appearing there. private void preferencesToolStripMenuItem_Click(object sender, EventArgs e) { Form_Preferences Preferences = new Form_Preferences(); this.AddOwnedForm(Preferences);
0
8498
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8840
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8630
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8694
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6251
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4237
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2833
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 we have to send another system
2
2084
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1831
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.