PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework on the fly events for on the fly control

Reply

on the fly events for on the fly control

 
Thread Tools Rate Thread
Old 12-09-2006, 04:07 PM   #1
feby
Guest
 
Posts: n/a
Default on the fly events for on the fly control


I have situation here..
the scenario is,

private sub form.onload
dim a() as new button
panel1.controls.add(a(0))
panel1.controls.add(a(1))
end sub

now..how can I have events for those buttons on the fly??
i mean..a(0) for form2.showdialog()
and a(1) for form3.showdialog()

need advise, if you can give me sample code in vb I'll appreciate it
many thanks..

  Reply With Quote
Old 12-09-2006, 04:16 PM   #2
Guest
 
Posts: n/a
Default Re: on the fly events for on the fly control

By calling AddHandler


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--



"feby" <feby.adityawan@gmail.com> wrote in message
news:1158073666.227426.164070@h48g2000cwc.googlegroups.com...
>I have situation here..
> the scenario is,
>
> private sub form.onload
> dim a() as new button
> panel1.controls.add(a(0))
> panel1.controls.add(a(1))
> end sub
>
> now..how can I have events for those buttons on the fly??
> i mean..a(0) for form2.showdialog()
> and a(1) for form3.showdialog()
>
> need advise, if you can give me sample code in vb I'll appreciate it
> many thanks..
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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

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