Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   Runtime vs Design Time controls creation (http://www.velocityreviews.com/forums/t775205-runtime-vs-design-time-controls-creation.html)

rkbnair 01-14-2005 03:31 PM

Runtime vs Design Time controls creation
 
I create some CheckBox controls at runtime. How can I define events for these
controls. For an event to be working, it has to be defined in the
InitializeComponent.
So, how can I specify these since the checkboxes are not created at design
time?



Elmer Carías 01-15-2005 01:02 AM

Re: Runtime vs Design Time controls creation
 
You can use that, After you add the control you can define an Event for this
control that use a Sub defined in your code
Example :
......
' In the InitializeComponent
AddHandler _Form.Closing, AddressOf Me._Form_Close


Private Sub _Form_Close(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs)
'Your Code
End Sub


Try with that, i hope so that helps you

Elmer Carías
El Salvador, CA
MSN: elmer_carias@hotmail.com




"rkbnair" <rkbnair@discussions.microsoft.com> wrote in message
news:FE6BA130-E2A1-4C0A-A95E-0A16FA55BAD1@microsoft.com...
> I create some CheckBox controls at runtime. How can I define events for

these
> controls. For an event to be working, it has to be defined in the
> InitializeComponent.
> So, how can I specify these since the checkboxes are not created at design
> time?
>
>




rkbnair 01-15-2005 03:25 PM

Re: Runtime vs Design Time controls creation
 
Can you explain it a little bit deeper? Also, is it possible to code in c#?

Thanks in anticipation.

"Elmer CarÃ*as" wrote:

> You can use that, After you add the control you can define an Event for this
> control that use a Sub defined in your code
> Example :
> ......
> ' In the InitializeComponent
> AddHandler _Form.Closing, AddressOf Me._Form_Close
>
>
> Private Sub _Form_Close(ByVal sender As Object, ByVal e As
> System.ComponentModel.CancelEventArgs)
> 'Your Code
> End Sub
>
>
> Try with that, i hope so that helps you
>
> Elmer CarÃ*as
> El Salvador, CA
> MSN: elmer_carias@hotmail.com
>
>
>
>
> "rkbnair" <rkbnair@discussions.microsoft.com> wrote in message
> news:FE6BA130-E2A1-4C0A-A95E-0A16FA55BAD1@microsoft.com...
> > I create some CheckBox controls at runtime. How can I define events for

> these
> > controls. For an event to be working, it has to be defined in the
> > InitializeComponent.
> > So, how can I specify these since the checkboxes are not created at design
> > time?
> >
> >

>
>
>



All times are GMT. The time now is 03:09 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57