Link to home
Start Free TrialLog in
Avatar of KJLC
KJLC

asked on

LineShape Manipulation

I have application that i am resizing on start up depending on the screen resolution.

I am able to resize all the controls on the form, by passing the form into a routine and iterating through the controls.

I cant work out how I can iterate through the  LineShape's on the form as they are not actual a control?

Thanks,

Ads
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

You can still find LineShape controls in form's control list but you can not cast these to Control. You have to cast these to LineShape.
Avatar of KJLC
KJLC

ASKER

How would i detect that control is a Lineshape without casting it as a control?
Something like below

For Each ctrl In Me.Controls
   If Typeof(ctrl) Is LineShape Then
       Dim lctrl As LineShape = ctrl
       ...
   End If
End If
Avatar of KJLC

ASKER

Hi, i tried this before but i get a compile error saying

systems.windows.forms.control can never be of type Microsoft.visulabasic.powerpacks.lineshape

This is where i am really stuck as far as i can see the LineShape is not a control

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KJLC

ASKER

That's it thanks for the help