Luis,
I'm not big on VB syntax, but I believe in this case, the WithEvents clause is really not necessary (it's an optional clause in declaring variables). According to the help:
"The WithEvents keyword indicates that a declared object variable refers to a class instance that can raise events."
But, of course, Buttons and GroupBoxes can raise events anyway, so why bother using the WithEvents clause? That's probably why you don't see it for other controls on the form .... because it's really not necessary.
~~Bonnie
>I am rading code from a project of abook of visual basic net ,and the code of the form has part that says "Public Class FrmMain" ,after that appears the following lines
>
>
>Friend WithEvents GrbRegisteredCustomer As System.Windows.Forms.GroupBox
>Friend WithEvents CmdRegCustomer As System.Windows.Forms.Button
>
>
>But in other form does not appears where exists similar controls dont appear similar lines,why?
>
>thank you for the help
>
>Luis Martin