0

Hi,
i want to accept data from user in messagebox using a variable. and later i want to use that variable. please help me.

7
Contributors
7
Replies
28
Views
8 Years
Discussion Span
Last Post by rajasekar646
0

Hi,
i want to accept data from user in messagebox using a variable. and later i want to use that variable. please help me.

If MessageBox.Show("Do you want to save the data", "Save", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
do what you want
Else
do what you want
End If

0
Dim button As DialogResult

        button = MessageBox.Show _
        ("Are you sure you want to exit this application?", _
        "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1)

        If button = Windows.Forms.DialogResult.Yes Then
            Me.Close()
        Else
            'Do Nothing
        End If
0

If MessageBox.Show("Do you want to save the data", "Save", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
do what you want
Else
do what you want
End If

amazing common sense man... i was struggling over the msgbox result for hours

0

Hi,
i want to accept data from user in messagebox using a variable. and later i want to use that variable. please help me.

Use inputbox() buddy

0

create new form

public str as string
dim f1 as form 

form = new inputform()
'input form you must create it ,put question,textbox,buttons on it 

inputform.showdialog()

'inside click button event in input form ,save the value of the textbox in str public variable

'than use str , it contains the value of textbox
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.