Go Back  Xtreme Visual Basic Talk > Visual Basic .NET (2002/2003/2005/2008, including Express editions) > .NET General > how to control any picturebox according to location but not name


Reply
 
Thread Tools Display Modes
  #1  
Old 11-06-2007, 03:53 AM
sadiytoker sadiytoker is offline
Newcomer
 
Join Date: Nov 2007
Posts: 1
Default how to control any picturebox according to location but not name


hi
i want to move pictureboxes according to their location

for example the pictureboxes having location.y values =250 will move 10 units left with a button click

tell me please how to do that
thanks
Reply With Quote
  #2  
Old 11-06-2007, 10:44 AM
user name user name is offline
Junior Contributor
 
Join Date: Sep 2004
Posts: 264
Default

Create a control array of the picturebox's then loop through that array checking what the Left position is, if it matches then move it.
Reply With Quote
  #3  
Old 11-06-2007, 05:05 PM
Qua's Avatar
Qua Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Location: 127.0.0.1
Posts: 2,171
Default

This might be something:

Code:
'The control to iterate through Dim VariableName As ControlType ' Go through all of those controls For Each VariableName In FormName.Controls If Condition Then DoSomething() End If Next
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->