Click here to Skip to main content
15,909,437 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Disable Close Button in Windows Form Pin
JR2124-Dec-08 20:42
JR2124-Dec-08 20:42 
Questionsearching a file from a folder Pin
dennymw4-Dec-08 1:00
dennymw4-Dec-08 1:00 
AnswerRe: searching a file from a folder Pin
JoeSharp4-Dec-08 1:15
JoeSharp4-Dec-08 1:15 
AnswerRe: searching a file from a folder Pin
Ashfield4-Dec-08 1:25
Ashfield4-Dec-08 1:25 
QuestionDesign Problem... Pin
Johndas3-Dec-08 21:13
Johndas3-Dec-08 21:13 
AnswerRe: Design Problem... Pin
Jay Royall3-Dec-08 21:35
Jay Royall3-Dec-08 21:35 
AnswerRe: Design Problem... Pin
Nanda_MR3-Dec-08 22:11
Nanda_MR3-Dec-08 22:11 
QuestionAdding an event (C# code in VB) Pin
MatthysDT3-Dec-08 20:34
MatthysDT3-Dec-08 20:34 
In C# I have a form which creates an object of my class DirtyMarker for which I pass (among others) a reference to my closeControl.

In the DirtyMarker class I have this code:
pCloseCtrl.Click += new EventHandler((pObj, pArgs) =>
                {
                    if (this.formIsDirty)
                    {
                        MessageBox.Show("There are unsaved changes, please save the changes before closing.");
                    }
                    else
                    {
                        pForm.Close();

                    }
                });


How would I do this in VB?

My concern is not with the anonymous function, but rather with adding the "new" event.

Regards!


AnswerRe: Adding an event (C# code in VB) Pin
Tom Deketelaere3-Dec-08 22:36
professionalTom Deketelaere3-Dec-08 22:36 
GeneralRe: Adding an event (C# code in VB) Pin
MatthysDT4-Dec-08 2:10
MatthysDT4-Dec-08 2:10 
GeneralRe: Adding an event (C# code in VB) Pin
Tom Deketelaere4-Dec-08 2:20
professionalTom Deketelaere4-Dec-08 2:20 
GeneralRe: Adding an event (C# code in VB) [modified] Pin
MatthysDT4-Dec-08 19:56
MatthysDT4-Dec-08 19:56 
GeneralRe: Adding an event (C# code in VB) Pin
Tom Deketelaere4-Dec-08 20:54
professionalTom Deketelaere4-Dec-08 20:54 
GeneralRe: Adding an event (C# code in VB) Pin
MatthysDT4-Dec-08 21:36
MatthysDT4-Dec-08 21:36 
GeneralRe: Adding an event (C# code in VB) Pin
Tom Deketelaere4-Dec-08 21:40
professionalTom Deketelaere4-Dec-08 21:40 
AnswerRe: Adding an event (C# code in VB) Pin
Gideon Engelberth4-Dec-08 3:01
Gideon Engelberth4-Dec-08 3:01 
AnswerRe: Adding an event (C# code in VB) Pin
Dave Doknjas4-Dec-08 13:52
Dave Doknjas4-Dec-08 13:52 
QuestionSerial Port in the toolbox Pin
Subjugate3-Dec-08 19:39
Subjugate3-Dec-08 19:39 
AnswerRe: Serial Port in the toolbox Pin
SelvaShankar3-Dec-08 20:07
SelvaShankar3-Dec-08 20:07 
Questiongetting file name Pin
jishbalan3-Dec-08 18:54
jishbalan3-Dec-08 18:54 
AnswerRe: getting file name Pin
Christian Graus3-Dec-08 19:00
protectorChristian Graus3-Dec-08 19:00 
Questioninsert multiple listbox text to database. Pin
sumit52833-Dec-08 18:47
sumit52833-Dec-08 18:47 
AnswerRe: insert multiple listbox text to database. Pin
Christian Graus3-Dec-08 18:59
protectorChristian Graus3-Dec-08 18:59 
GeneralRe: insert multiple listbox text to database. Pin
sumit52833-Dec-08 19:14
sumit52833-Dec-08 19:14 
GeneralRe: insert multiple listbox text to database. Pin
Mycroft Holmes3-Dec-08 19:41
professionalMycroft Holmes3-Dec-08 19:41 

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.