Re: Create controls at runtime

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello, Tony,

Hey, nothing to be sorry about. Things like that happen to us all.

Quite seriously, when things stop making any sense at all, I find it is helpful to just step back for a breather and focus on something else for a while. This is particularly true if you start saying to yourself "I can't...". Our minds, being the amazing things that they are will try to protect us by making us right. Hence, when you think you can't, you find out that you're right, you can't...

But when you come back to the problem with a different perspective, i.e. "I can..." or "I will..." often things work much better and begin to make sense again.

Keep at it, and good luck.

Cheers,
Randy


TonyMast wrote:

Sorry, for some reason it wasn't working in my form. I copied the example exactly to the form load and it didn't work. However I created a new form and it works fine. Very strange why it wasn't working in the first form but when I created another it did.

Thanks and again sorry
Tony
"R. MacDonald" <scitec@xxxxxxxxxxxxxxx> wrote in message news:4434231e$0$42166$dbd49001@xxxxxxxxxxxxxxxxxx

Hello, Tony,

Ummm... Maybe a good night's sleep and then a fresh look through the example in the morning will help. :-)

Try pasting the example exactly as it is into the default Form created when you create a new project. Then hit the F5 key.

Cheers,
Randy


TonyMast wrote:


Thanks to both, but I'm still stuck on how to use the
me.controls.add
Do I have to do this 300 times to create 300 controls?
I wanted to use some loops to create the objects.
I wanted to create objects with a for next loop,
for x =1 to 100
object = "label" & format (X)
dim object as new label
'I would also add the sizes and location here
next

Just can't figure out how to do it.

Thanks
Tony



.



Relevant Pages

  • Line continuation if for...do scripts
    ... Hey All. ... I have a pretty complex script that contains a ... bunch of for...do loops. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: GEt all the paths in a network
    ... Hey I just want to thank everybody who posted on list for their help and experience. ... This is a version of the code that gets you all the paths from a source to a destination depending on the number of nodes where all the nodes are connected and there are no loops. ... Thanks everybody for sharing their knowledge and I guess this is a wrap....... ...
    (comp.soft-sys.matlab)
  • For...Next vs Do...While
    ... Hey all, ... why not put a question up for debate. ... personal preference, is there any benefit to ... Do...While loops. ...
    (microsoft.public.dotnet.languages.vb)