Solved

LineShape Manipulation

Posted on 2013-01-30
6
422 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

726 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