Solved

LineShape Manipulation

Posted on 2013-01-30
6
410 Views
Last Modified: 2013-01-30
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
0
Comment
Question by:KJLC
  • 3
  • 3
6 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38834414
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.
0
 

Author Comment

by:KJLC
ID: 38834428
How would i detect that control is a Lineshape without casting it as a control?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38834670
Something like below

For Each ctrl In Me.Controls
   If Typeof(ctrl) Is LineShape Then
       Dim lctrl As LineShape = ctrl
       ...
   End If
End If
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:KJLC
ID: 38834685
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
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 250 total points
ID: 38834728
Ah. I think when you use shapes, a ShapeContainer1 object is added to the form. You can access all shapes using it.
0
 

Author Closing Comment

by:KJLC
ID: 38834789
That's it thanks for the help
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now