ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[¤À¨É] visual basic.net ·s¤â±Ð¾Ç

¥»©«³Ì«á¥Ñ §b§b ©ó 2010-5-9 02:31 ½s¿è

·í§Ú­ÌÁä¤JMessageBox. ªº®É­Ô,·|¦Û°Ê¥X²{ show³o­Ó¤èªk
¦ÓMessageBox©Ò¦³ªº¦¨­û¤]¥u¦³³o­Ó¤èªk,¦ý¹ê»Ú¤W,show ¨Ã¤£¬OMessageBoxªº¦¨­û
¦pªG±z¦³¥J²Ó¬Ýªº¸Ü,´N·|¬Ý¨ì , show ³o­Ó¨ä¹ê¬O¤@­Ó¤À¨É¨ç¼Æ(¦³¤HºÙ¤§¬°ÀRºA¨ç¼Æ)
¦pªG§Ú­Ì¬Ý¨ìshow ªº¼ÐÀY©w¸q,¥]§t¤Fshared³o­Ó¦r
public shared function show(..........) as dialogresult
´N¥i¥H¤F¸Ñ,³o­Ó¨ç¼Æ¨ä¹ê¥i¥Hª½±µ³z¹LÃþ§O¦s¨ú,¦Ó¤£¥Î³z¹L¹êÅé¦s¨ú
©Ò¥H§Ú­Ì¤£·|¼g³o¼Ëªºµ{¦¡½X    dim x as new messagebox
µM«á¦A¨Ó x.show , ³o¬O¿ù»~ªº
¥t¥~,show³o­Ó¨ç¼Æ¥i¥H¶Ç¦^ dialogresult ³o­Ó¼Æ­È, ¥¦¨ä¹ê¬O¤@­Ó±`¼Æ,§Ú­Ì·|¦b«á­±¥Î¨ì¥¦
¦AªÌ,show¨ä¹ê¬O¤@­Ó¦³20ºØ§ÎºAªº¦h¸ü¨ç¼Æ,¥¦Åý¤@­Ó¨ç¼Æ¥i¥H¦³¬Û¦Pªº¦WºÙ,«o¦³µÛ¤£¦Pªº¿é¤J¤è¦¡
³o¨Ï±o¦WºÙªº¨Ï¥Î¤W§ó¨ã¦³¼u©ÊªÅ¶¡,¦P¼Ëªº°Ê§@¦WºÙ,«o¦³ªÌ¤£¦Pªº§e²{¤è¦¡,³o¼Ëªº¤è¦¡,Åýµ{¦¡½Xªº
ºÞ²z§ó¥[ªº¤è«K,¥H¤U§Ú­ÌÁä¤J¤@­Ó¦h¸üªºshow ¤èªk
  1.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

  2.         If MessageBox.Show("MyFirstProgram", "WindowsForm ", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information) = Windows.Forms.DialogResult.Yes Then

  3.             MessageBox.Show("¦¨¥\")
  4.         End If

  5.     End Sub
½Æ»s¥N½X
·íµM¥u¦³§Ú­Ì¦b«ö¤Uyes¶s¤~·|°Ê§@,¦Ó«ö¤Uyes®É´N¦^¶Ç Windows.Forms.DialogResult.Yes,
WindowsForm´N¬O³o»òªºÂ²³æ

TOP

        ÀR«ä¦Û¦b : ¥¬¬I¦p¼½ºØ¡A¥HÅw³ß¤ß´þ¼íºØ¤l¡A¤~·|µoªÞ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD