Click here to Skip to main content
16,005,206 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionWindows Installer 2.0 Pin
pathak7812-Dec-06 2:15
pathak7812-Dec-06 2:15 
Questionlittle bit of help needed Pin
peteyshrew12-Dec-06 2:02
peteyshrew12-Dec-06 2:02 
AnswerRe: little bit of help needed Pin
Uber112-Dec-06 2:36
Uber112-Dec-06 2:36 
GeneralRe: little bit of help needed Pin
peteyshrew12-Dec-06 4:19
peteyshrew12-Dec-06 4:19 
QuestionOutlook 2003 toolbar/ buttons Pin
infra2k412-Dec-06 0:52
infra2k412-Dec-06 0:52 
Questionmulti column combo vb6 Pin
shakir_bd12-Dec-06 0:13
shakir_bd12-Dec-06 0:13 
QuestionHow to handle the formClosing event VS2005 ? Pin
sync_austin11-Dec-06 22:41
sync_austin11-Dec-06 22:41 
AnswerRe: How to handle the formClosing event VS2005 ? [modified] Pin
The ANZAC11-Dec-06 23:22
The ANZAC11-Dec-06 23:22 
You need to include the message in the if statement:

If MessageBox.Show("Exit?", "Exit?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Hand) = Windows.Forms.DialogResult.Cancel Then<br />
       e.Cancel = True<br />
   Else<br />
       e.Cancel = False<br />
   End If


Alternatively:

dim result as windows.forms.dialogresult<br />
<br />
result = MessageBox.Show("Exit?", "Exit?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Hand)<br />
<br />
if result = Windows.Forms.DialogResult.Cancel then<br />
e.cancel = true<br />
elseif result = result = Windows.Forms.DialogResult.Yes then<br />
' do whatever<br />
else<br />
' do whatever<br />
end if


This way the cancel is dependant on the result.

P.S. Msgbox is old now, use messagebox.show, it's much more versatile and easier to create dialogs.




-- modified at 5:33 Tuesday 12th December, 2006

Posted by The ANZAC

Questionunhandled exception at 0x660688 Pin
egmano11-Dec-06 21:54
egmano11-Dec-06 21:54 
Questionvb child windows show/hide Pin
opti99911-Dec-06 21:51
opti99911-Dec-06 21:51 
QuestionBarcode Printing dos Pin
Aunalisiraj11-Dec-06 21:37
Aunalisiraj11-Dec-06 21:37 
AnswerRe: Barcode Printing dos Pin
Steven J Jowett13-Dec-06 1:15
Steven J Jowett13-Dec-06 1:15 
QuestionUsing References Of ReportPrinting.dll Pin
HatakeKaKaShi11-Dec-06 20:30
HatakeKaKaShi11-Dec-06 20:30 
Questioncombo box in 2005 Pin
amaneet11-Dec-06 20:07
amaneet11-Dec-06 20:07 
AnswerRe: combo box in 2005 Pin

MmM.net</

11-Dec-06 21:15

MmM.net</

11-Dec-06 21:15 
QuestionVisual Basic 6.0 Timer routine Pin
alhomed4411-Dec-06 18:31
alhomed4411-Dec-06 18:31 
AnswerRe: Visual Basic 6.0 Timer routine Pin
CPallini12-Dec-06 0:21
mveCPallini12-Dec-06 0:21 
Questionadding textbox to datagrid in winforms and display the value Pin
chinnivinay11-Dec-06 17:38
chinnivinay11-Dec-06 17:38 
AnswerRe: adding textbox to datagrid in winforms and display the value Pin
The ANZAC11-Dec-06 18:22
The ANZAC11-Dec-06 18:22 
GeneralRe: adding textbox to datagrid in winforms and display the value Pin
chinnivinay11-Dec-06 19:21
chinnivinay11-Dec-06 19:21 
GeneralRe: adding textbox to datagrid in winforms and display the value Pin
Janani Divya11-Dec-06 20:14
Janani Divya11-Dec-06 20:14 
GeneralRe: adding textbox to datagrid in winforms and display the value Pin
ADY00712-Dec-06 9:51
ADY00712-Dec-06 9:51 
QuestionUsing Forms as filter options Pin
Wicksylad11-Dec-06 11:39
Wicksylad11-Dec-06 11:39 
AnswerRe: Using Forms as filter options Pin
The ANZAC11-Dec-06 17:57
The ANZAC11-Dec-06 17:57 
GeneralRe: Using Forms as filter options Pin
Wicksylad15-Dec-06 10:32
Wicksylad15-Dec-06 10:32 

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.