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
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
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.
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
For Each ctrl In Me.Controls
If Typeof(ctrl) Is LineShape Then
Dim lctrl As LineShape = ctrl
...
End If
End If
ASKER
Hi, i tried this before but i get a compile error saying
systems.windows.forms.cont rol can never be of type Microsoft.visulabasic.powe rpacks.lin eshape
This is where i am really stuck as far as i can see the LineShape is not a control
Thanks
systems.windows.forms.cont
This is where i am really stuck as far as i can see the LineShape is not a control
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That's it thanks for the help