Click here to Skip to main content
15,889,863 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VS2005 error: Conversion from string "negative number" to type Date is not valid Pin
Xooku5-Feb-08 1:23
Xooku5-Feb-08 1:23 
AnswerRe: VS2005 error: Conversion from string "negative number" to type Date is not valid Pin
Guffa5-Feb-08 4:20
Guffa5-Feb-08 4:20 
GeneralRe: VS2005 error: Conversion from string "negative number" to type Date is not valid Pin
Paddy Boyd5-Feb-08 2:51
Paddy Boyd5-Feb-08 2:51 
GeneralRe: VS2005 error: Conversion from string "negative number" to type Date is not valid Pin
Xooku5-Feb-08 18:12
Xooku5-Feb-08 18:12 
GeneralAuto Scroll on a text BOX Pin
Benny_Lava5-Feb-08 0:58
Benny_Lava5-Feb-08 0:58 
AnswerRe: Auto Scroll on a text BOX Pin
Scubapro5-Feb-08 1:34
Scubapro5-Feb-08 1:34 
GeneralRe: Auto Scroll on a text BOX Pin
Dave Kreskowiak5-Feb-08 10:11
mveDave Kreskowiak5-Feb-08 10:11 
QuestionCustom events? Pin
Benny_Lava5-Feb-08 0:46
Benny_Lava5-Feb-08 0:46 
Hi,
I have a module and a public class.

The class is called publicPropertyShare. You can realize the function of the class by its name. In this class I put public property, public variable, anything that needs to be public for the entire project but need o be in a class.

Now I have a event declared in this class: public event indicator(byval msg as string)

Now I also have a public module in which I do basically the same thing as with the class but only put public functions,subs, and variables.

As the application starts I want to initialize all variables in the public module, including the publicPropertyShare class. I want it to instantiate the class at the very beginning so I do that. public class1 as new publicPropertyShare

I didn't have any problems until I needed this event, so I added public withEvents class1 as new publicPropertyshare.

So I could Raise and handle this event on the whole project without any other declaration or instantantation.

But when I want to handle the event in one of my classes it says error...

private sub handle(byval msg as string) handles publicPropertyShare.indicator
end sub

the error is : "Handles clause requires a WithEvents variable defined in the containing type or one of its base types"

But the variable is declared WithEvents in the public module!


Any help appreciated.

Thanks!
AnswerRe: Custom events? Pin
nlarson115-Feb-08 3:57
nlarson115-Feb-08 3:57 
AnswerRe: Custom events? Pin
Dave Kreskowiak5-Feb-08 10:13
mveDave Kreskowiak5-Feb-08 10:13 
AnswerRe: Custom events? Pin
User 2710095-Feb-08 17:37
User 2710095-Feb-08 17:37 
GeneralEncrypt & Decrypt Files Pin
duo!@#5-Feb-08 0:20
duo!@#5-Feb-08 0:20 
GeneralRe: Encrypt & Decrypt Files Pin
Guffa5-Feb-08 1:06
Guffa5-Feb-08 1:06 
GeneralRe: Encrypt & Decrypt Files Pin
Steven J Jowett5-Feb-08 4:12
Steven J Jowett5-Feb-08 4:12 
GeneralUpgrade VB6 to VB.Net Pin
Naunt5-Feb-08 0:10
Naunt5-Feb-08 0:10 
GeneralRe: Upgrade VB6 to VB.Net Pin
Vimalsoft(Pty) Ltd5-Feb-08 6:15
professionalVimalsoft(Pty) Ltd5-Feb-08 6:15 
GeneralRe: Upgrade VB6 to VB.Net Pin
Christian Graus5-Feb-08 8:51
protectorChristian Graus5-Feb-08 8:51 
QuestionExploiting Children Form events ... How? Pin
eusta5-Feb-08 0:09
eusta5-Feb-08 0:09 
GeneralRe: Exploiting Children Form events ... How? Pin
Christian Graus5-Feb-08 8:52
protectorChristian Graus5-Feb-08 8:52 
QuestionVPN using OpenSSL. Pin
Warp4-Feb-08 21:51
Warp4-Feb-08 21:51 
GeneralRe: VPN using OpenSSL. Pin
Dave Kreskowiak5-Feb-08 10:16
mveDave Kreskowiak5-Feb-08 10:16 
GeneralPrint several pages Pin
Marc Soleda4-Feb-08 20:31
Marc Soleda4-Feb-08 20:31 
GeneralRe: Print several pages Pin
Ajay.k_Singh4-Feb-08 22:01
Ajay.k_Singh4-Feb-08 22:01 
GeneralRe: Print several pages Pin
Marc Soleda5-Feb-08 20:37
Marc Soleda5-Feb-08 20:37 
Questionvb 6.0 crystal report 4.6 with crystalreport excepted below result Pin
perumalLashmi4-Feb-08 17:24
perumalLashmi4-Feb-08 17:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.