Discussion Locked

Begginers Q

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
I'm using VB6 in Windows98SE.
I'm creating an ActiveX control and I want
to know how I can get the width of my control
at run time.
I've tried Me.Width but it doesn't recognise anything except the subs which I already have in the control.
Thanks for your time.

Craig

6 replies

by craig shepherd

The control is the only thing in my project. It's not on a form or anything.

I want to be able to get the width of the control at run time. ie.After it has been compiled and place on one of my forms, because some of the stuff in the control is relative to the width.

by andrew

You need to use:

UserControl.Width

Note that it is 'UserControl', NOT the name of the UserControl.

by andrew

My answer assumes you're trying to get the control width from within the control itself, not from the client form.

This discussion is closed to new replies.