Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / October 2005



Tip: Looking for answers? Try searching our database.

Labels

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stan Weiss - 29 Oct 2005 19:16 GMT
Can some give me the pro's and con's for when you would code each of
these 2 different methods.

Label 1 to Label 111
verses
Label 1(0) to label 1(110)

Thanks,
Stan
Randy Day - 29 Oct 2005 20:35 GMT
> Can some give me the pro's and con's for when you would code each of
> these 2 different methods.
>
> Label 1 to Label 111

p: quick 'n easy - drag 'n drop
c: each control must have own subs and functions
c: no looping through controls; each must be tested
   in code separately
c: no creating new controls at runtime

> verses
> Label 1(0) to label 1(110)

p: loops such as the following:
   for x = 0 to 110
      if label 1(x) = "test" then
         'do something
      end if
   loop

p: add new controls on the fly:
   redim preserve label 1(112)
   'code here to position and use new label 1(111)

p: control subs/funcs now get 'Index' variable,
   so one sub can be written to handle all labels.
   Lots less code needed

c: requires 30 seconds more thought at design time
   to implement than 110 separate labels

HTH
Stan Weiss - 30 Oct 2005 00:03 GMT
Thanks Randy,
Stan

> > Can some give me the pro's and con's for when you would code each of
> > these 2 different methods.
[quoted text clipped - 29 lines]
>
> HTH
Frank Adam - 30 Oct 2005 03:43 GMT
>> verses
>> Label 1(0) to label 1(110)
>
>c: requires 30 seconds more thought at design time
>    to implement than 110 separate labels

Hah, i get that done in 28. ;-)

Signature

Regards, Frank

Steve Gerrard - 31 Oct 2005 02:04 GMT
>> Can some give me the pro's and con's for when you would code each of
>> these 2 different methods.
>>
>> Label 1 to Label 111
>
> p: quick 'n easy - drag 'n drop

Copy and paste on the first label gives you a prompt "wanna make a control
array", so its almost as easy.

> p: add new controls on the fly:
>    redim preserve label 1(112)
>    'code here to position and use new label 1(111)

My experience has been that
   Load label1(111)

will work better than redim preserve on a control array.
Randy Day - 31 Oct 2005 05:08 GMT
[snip]

> My experience has been that
>     Load label1(111)
>
> will work better than redim preserve on a control array.

<smacks forehead>

That's what I get for picking code out of the air!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.