Form Location

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Hi RbanBph,

You need to set Form.StartupPosition = StartupPosition.Manual or Windows will determine where the Form is put.
 
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
 
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
 
Back
Top