Click here to Skip to main content
16,011,757 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Please Help ListBox Contains Very Urgent Pin
Dave Kreskowiak2-Jan-07 5:15
mveDave Kreskowiak2-Jan-07 5:15 
QuestionRegisterHotKey Pin
acidice3331-Jan-07 14:55
acidice3331-Jan-07 14:55 
AnswerRe: RegisterHotKey Pin
Dave Kreskowiak2-Jan-07 4:56
mveDave Kreskowiak2-Jan-07 4:56 
Questiononline translater for my program: how do I ? Pin
JustmeNick1-Jan-07 7:55
JustmeNick1-Jan-07 7:55 
AnswerRe: online translater for my program: how do I ? Pin
MatrixCoder1-Jan-07 22:22
MatrixCoder1-Jan-07 22:22 
QuestionCard Game ? Pin
Bso_Cool1-Jan-07 6:19
Bso_Cool1-Jan-07 6:19 
AnswerRe: Card Game ? Pin
Christian Graus2-Jan-07 0:10
protectorChristian Graus2-Jan-07 0:10 
AnswerRe: Card Game ? Pin
Martin.Smith2-Jan-07 0:12
Martin.Smith2-Jan-07 0:12 
In your FOR loop that is creating the labels, add an event handling function for the mouse click event, for example:
AddHandler Label(N).MouseClick, AddressOf CardClickFct

You will then need to create the CardClickFct, such as:
    Sub CardClickFct(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) <br />
       Dim TheCard as label = DirectCast(sender, Label)<br />
<br />
       ' TODO: Add whatever you want the card to do when its been clicked<br />
    End Sub


What you must also remember to do is remove the event handler when the label is destroyed (by calling RemoveHandler)....

You MUST ensure that your array variable "Label" is declared "WithEvents" for this to work!!!


I hope this helps you out....

Regards,

Martin
QuestionSearch in Combo Pin
msleem1-Jan-07 5:20
msleem1-Jan-07 5:20 
AnswerRe: Search in Combo Pin
The ANZAC1-Jan-07 23:20
The ANZAC1-Jan-07 23:20 
Questionalter excel-table via sql Pin
Smithers-Jones1-Jan-07 4:38
Smithers-Jones1-Jan-07 4:38 
Questionweb service Pin
arindam_1st31-Dec-06 22:51
arindam_1st31-Dec-06 22:51 
QuestionHelp Needed!! Problem with creating a installation Pin
ArchaBhandare31-Dec-06 20:06
ArchaBhandare31-Dec-06 20:06 
AnswerRe: Help Needed!! Problem with creating a installation Pin
MatrixCoder1-Jan-07 22:18
MatrixCoder1-Jan-07 22:18 
Questionfile input/output Pin
carl_sti31-Dec-06 17:14
carl_sti31-Dec-06 17:14 
AnswerRe: file input/output Pin
Dave Kreskowiak31-Dec-06 17:57
mveDave Kreskowiak31-Dec-06 17:57 
AnswerRe: file input/output Pin
Pravat Maskey31-Dec-06 19:16
Pravat Maskey31-Dec-06 19:16 
Questionhow do i list all computer name on my network Pin
JustmeNick31-Dec-06 17:03
JustmeNick31-Dec-06 17:03 
AnswerRe: how do i list all computer name on my network Pin
Dave Kreskowiak31-Dec-06 17:55
mveDave Kreskowiak31-Dec-06 17:55 
GeneralRe: how do i list all computer name on my network Pin
JustmeNick1-Jan-07 2:12
JustmeNick1-Jan-07 2:12 
GeneralRe: how do i list all computer name on my network Pin
S Douglas1-Jan-07 21:13
professionalS Douglas1-Jan-07 21:13 
QuestionOpening Files in Visual Studio.NET 2003 Pin
Peter Constant31-Dec-06 9:17
Peter Constant31-Dec-06 9:17 
AnswerRe: Opening Files in Visual Studio.NET 2003 Pin
KevinMac31-Dec-06 9:34
KevinMac31-Dec-06 9:34 
GeneralRe: Opening Files in Visual Studio.NET 2003 Pin
Peter Constant31-Dec-06 9:39
Peter Constant31-Dec-06 9:39 
QuestionLooking for a unique program ID Pin
roo42631-Dec-06 4:00
roo42631-Dec-06 4:00 

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.