[dba-VB] SCRUM: 27 controls' OnClick event

Mike Mattys mmattys at rochester.rr.com
Fri Apr 3 10:29:57 CDT 2009


Thanks, Gustav, excellent point.

I will add that one should not change code and then try to run
the project in the debugger without using Rebuild All first - the errors! 
ugh!

-
Michael R Mattys
MapPoint and Database Dev
www.mattysconsulting.com
-
----- Original Message ----- 
From: "Gustav Brock" <Gustav at cactus.dk>
To: "<Discussion concerning Visual Basic and related programmingissues." 
<dba-vb at databaseadvisors.com>
Sent: Friday, April 03, 2009 11:20 AM
Subject: Re: [dba-VB] SCRUM: 27 controls' OnClick event


> Hi Mike
>
> Just a comment, that this will not reduce code in total, just let VS 
> create these line automatically in the .design.cs file in 
> InitializeComponents.
> That is often very convenient, but if it is preferable, I think, is a 
> matter of taste. For example, I've found that debugging may be easier if 
> the code is in the .cs file.
>
> /gustav
>
>
>>>> Salakhetdinov Shamil <mcp2004 at mail.ru> 03-04-2009 15:34 >>>
> Hi Mike,
>
> I must add that instead of this manual coding:
>
> ...
>            aLabel.Click += new EventHandler(letterLabel_Click);
>            bLabel.Click += new EventHandler(letterLabel_Click);
>            cLabel.Click += new EventHandler(letterLabel_Click);
> ...
>
> you can use properties window to declaratively set letterLabel_Click as 
> event procedure for click event for every Label: in fact it's preferrable 
> to do it that way to have as little as possible custom coding.




More information about the dba-VB mailing list