I wonder if you could help.
The event handler code below, will allow the user to change the phone number
and write it on a label of a message box. I want to replace the message box
with a dialog box.
Can anybody help me replace the message box below to a dialog box. In other
words. I want to write the new phone number on a label (named "labe1")of a
dialog box (named "dialog2),inste ad of writing the new phone number on the
label of a message box.
private: System::Void dialogBtnItem_C lick(System::Ob ject * sender,
System::EventAr gs * e)
{
// Create the dialog
MyDialog* box = new MyDialog();
//Fill in the initial data
box->Phone = S"(650)123-3456)"; // <------ This is the phone number to be
changed
//Show dialog
if (box->ShowDialog() == DialogResult::O K)
{
MessageBox::Sho w(box->Phone); //<-----I tried to change this line
}
}
The event handler code below, will allow the user to change the phone number
and write it on a label of a message box. I want to replace the message box
with a dialog box.
Can anybody help me replace the message box below to a dialog box. In other
words. I want to write the new phone number on a label (named "labe1")of a
dialog box (named "dialog2),inste ad of writing the new phone number on the
label of a message box.
private: System::Void dialogBtnItem_C lick(System::Ob ject * sender,
System::EventAr gs * e)
{
// Create the dialog
MyDialog* box = new MyDialog();
//Fill in the initial data
box->Phone = S"(650)123-3456)"; // <------ This is the phone number to be
changed
//Show dialog
if (box->ShowDialog() == DialogResult::O K)
{
MessageBox::Sho w(box->Phone); //<-----I tried to change this line
}
}
Comment