Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set a controls startup properties

Status
Not open for further replies.

JimHutton

Programmer
Sep 26, 2003
25
0
0
GB
Hi
I have created a control which is designed to fit around a form.

The only problem is I do not know how to make the control which I have created automatically fit to the edges of a form.

How can I do this?

I will be happy with something on the lines of,

UserControl.Left = 0
UserControl.Width = Screen.ActiveForm.Width
UserControl.Top = 0
UserControl.Height = Screen.ActiveForm.Height


Obviously this doesn't work anything similar though?

Cheers
Jim


Kindest Regards
Jim
-
 
are you looking for something similar to a docking toolbar?!?

good luck!

If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
come on... get involved!
To get the best response to a question, please check out FAQ222-2244 first
A General Guide To Excel in VB FAQ222-3383
 
What happens if you reference the user control properties to the ones on the form?, ie UserControl.Width=Form1.Width etc or is that no good/working. Obviously Form1 name might be Form2 or another name.
 
as this control will apply to any form in the project i can't put the form name, :(

It's a form frame that i am making, similar to the XP types but my custom look.

Kindest Regards
Jim
-
 
The Me keyword refers to the form you use it from. eg:
Me.Width

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top