Dialog Boxes: Pemrograman Visual by Kartika Firdausy Pvisual@ee - Uad.ac - Id Blog - Uad.ac - Id/kartikaf
Dialog Boxes: Pemrograman Visual by Kartika Firdausy Pvisual@ee - Uad.ac - Id Blog - Uad.ac - Id/kartikaf
Pemrograman Visual
by Kartika Firdausy
[email protected]
blog.uad.ac.id/kartikaf
kartikaf.wordpress.com
These common dialog boxes are stored in DLLs that ship with the operating
system but they may be provided in a raw format.
In the same way, the .NET Framework provides its own implementation of
these ready-made dialog boxes in a manner that makes it easier to
implement them.
Picture Box
A picture box is a rectangular
object that can serve different
purposes.
It can be used to host or hold
other controls, it can be used as
a drawing board instead of
drawing directly on a form, it
can be used to display a picture
on an application, it can also be
used for aesthetic reasons.
Picture Box
Web Browser
Pada Toolbox
pilih button
WebBrowser
Event
KeyDown pada textBoxAlamat
Event handler
private: System::Void buttonOK_Click(System::Object^ sender, System::EventArgs^ e)
{
webBrowser1->Navigate(textBoxAlamat->Text);
}
private: System::Void textBoxAlamat_KeyDown(System::Object^ sender,
System::Windows::Forms::KeyEventArgs^ e)
{
if (e->KeyCode == System::Windows::Forms::Keys::Enter
&& !textBoxAlamat->Text->Equals("")) {
webBrowser1->Navigate(textBoxAlamat->Text);
}
}
private: System::Void webBrowser1_Navigated(System::Object^ sender,
System::Windows::Forms::WebBrowserNavigatedEventArgs^ e) {
textBoxAlamat->Text = webBrowser1->Url->ToString();