Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1) Napraviti formu sa dugmetom i text boxom i nakon klika na dugme otvori se message box sa opcijama "Yes", "No", "Cancel". Nakon odabira opcije u text boxu u formi ce se ispisati "Izabrali ste Yes/No/Cancel".
- private void button1_Click(object sender, EventArgs e)
- {
- string poruka = "Pritisnite neko od ovih dugmadi";
- string naslov = "Naslovna linija Dijaloga za poruke";
- MessageBoxButtons buttons = MessageBoxButtons.YesNoCancel;
- MessageBoxIcon ikona = MessageBoxIcon.Information;
- DialogResult rez = System.Windows.Forms.MessageBox.Show(poruka, naslov, buttons, ikona);
- switch (rez)
- {
- case DialogResult.Yes:
- textBox1.Text = "Izabrali ste dugme YES";
- break;
- case DialogResult.No:
- textBox1.Text = "Izabrali ste dugme NO";
- break;
- case DialogResult.Cancel:
- textBox1.Text = "Izabrali ste dugme Cancel";
- break;
- }
- 2) Napraviti formu u kojoj se nalazi dugme i klikom na to dugme otvora se Explorer.
- Process.Start(" ");
- private void button1_Click(object sender, EventArgs e)
- {
- System.Diagnostics.Process.Start("Chrome");
- }
- ///////////////////////////
- private void button1_Click(object sender, EventArgs e)
- {
- System.Diagnostics.Process.Start("Chrome");
- }
- private void button2_Click(object sender, EventArgs e)
- {
- System.Diagnostics.Process.Start("IEXPLORE");
- }
- private void button3_Click(object sender, EventArgs e)
- {
- System.Diagnostics.Process.Start("firefox");
- }
- 3) Napraviti formu u kojoj imaju dva dugmeta. Klikom na prvo dugme pokrenemo aplikaciju a klikom na drugo dugme ugasimo tu pokrenutu aplikaciju.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement