Form Location

G

Guest

Hi,
I have developed an application vb.net. I have a tab control
placed on a form(Base form). On click of each tab different forms are
dispalayed in front of base form. I want to set the location of base form and
display form such as it should look like a single form. For this I used
form.location property. But every time I run the application base form is
displayed at different location without any change in code.Another form is
dipslayed on the proper position as set in the code.
What may be the problem in this?
Thanks in advance,

---RbanBph
 
M

Morten Wennevik

Hi RbanBph,

You need to set Form.StartupPosition = StartupPosition.Manual or Windows will determine where the Form is put.
 
G

Guest

Hi,
Thank U. I set the property. But still problem persists. Now the form is
displayed at the upper left corner only, though I change the co ordinates
many times. DOck property of tab control is none.

--RbanBph
 
M

Morten Wennevik

Are you setting the location using the .Left and .Top property, don't. Use
Form.Location = new Point(X, Y);

If not, can you show us a small but complete code sample that demonstrates your problem.



Hi,
Thank U. I set the property. But still problem persists. Now the form is
displayed at the upper left corner only, though I change the co ordinates
many times. DOck property of tab control is none.

--RbanBph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top