danaxtip.blogg.se

Visual basic message boxes
Visual basic message boxes













comboBox = new () ĬomboBox.Size = new ( 180, 22) ĬomboBox.Location = new ( 90, 70) ĬomboBox.DropDownStyle = .DropDownList Private static Control Cntrl(Type type, string ListItems) Set size and event for all used buttons foreach (Button btn in returnButtons)ītn.Size = new ( 75, 23) ītn.Click += new System.EventHandler(button_Click) NeButton.Location = new ( 250, 101) ĪnoButton.Location = new ( 90, 101) StornoButton.Location = new ( 250, 101) ĪnoButton.Location = new ( 170, 101) Private static Button Btns(Buttons button, Language lang = Language.English) Stream = assembly.GetManifestResourceStream( ") Var assembly = Assembly.GetExecutingAssembly() // Get integrated sources Private static PictureBox Picture(Icon icon) Private static void frm_FormClosing( object sender, System. Private static void textBox_KeyDown( object sender, System.Windows. Private static void button_Click( object sender, EventArgs e) If (DialogRes = DialogResult.OK || DialogRes = DialogResult.Yes) Get automatically cursor to the TextBox if (ctrl.Name = " textBox") Add buttons to the form foreach (Button btn in Btns(buttons)) Label.TextAlign = ContentAlignment.MiddleLeft String ListItems = null, bool ShowInTaskBar = false, Font FormFont = null)įrm.FormBorderStyle = .FixedDialog įrm.Size = new ( 350, 170) įrm.FormClosing += new (frm_FormClosing) įrm.StartPosition = FormStartPosition.CenterParent Icon icon = Icon.Information, Buttons buttons = Buttons.Ok, Type type = Type.Nothing, / /// Message in dialog(as System.String) /// Title of dialog (as System.String) /// Select icon (as InputBox.Icon) /// Select icon (as InputBox.Buttons) /// Type of control in Input box (as InputBox.Type) /// Array of ComboBox items (as System.String) /// Font in form (as ) /// /// public static DialogResult ShowDialog( string Message, string Title = " ", / This form returning a DialogResult value. / /// This form is like a MessageBox, but you can select type of controls on it. Private static string buttonTextArray = new string // Source of InputBox class // using System Private void Form1_Load( object sender, EventArgs e) (InputBox.ResultValue) // Get returned value , // Set type (default nothing) new string, // String field as ComboBox items (default null) true, // Set visible in taskbar (default false) new ( " Calibri", 10F, )) // Set font (default by system) // Check InputBox result if (res = .OK || res = .Yes) " Combo InputBox", // Text message (mandatory), Title (optional) InputBox.SetLanguage() ĭialogResult res = InputBox.ShowDialog( " Select some item from ComboBox below:", Set buttons language Czech/English/German/Slovakian/Spanish (default English) Private void button1_Click( object sender, EventArgs e)















Visual basic message boxes