Click here to Skip to main content
15,507,755 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: issue in vb script while using MSXML2.ServerXMLHTTP.6.0 object Pin
Member 1032934426-Jul-17 18:23
Member 1032934426-Jul-17 18:23 
QuestionSet Focus on a textbox after showing form.showdialog() Pin
Hermawan2611-Nov-16 20:46
Hermawan2611-Nov-16 20:46 
AnswerRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard MacCutchan12-Nov-16 0:20
mveRichard MacCutchan12-Nov-16 0:20 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard Deeming12-Nov-16 4:55
mveRichard Deeming12-Nov-16 4:55 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard MacCutchan12-Nov-16 5:33
mveRichard MacCutchan12-Nov-16 5:33 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard Deeming12-Nov-16 5:37
mveRichard Deeming12-Nov-16 5:37 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard MacCutchan12-Nov-16 5:46
mveRichard MacCutchan12-Nov-16 5:46 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard Deeming12-Nov-16 6:48
mveRichard Deeming12-Nov-16 6:48 
If you've just closed the last open form in the application, the message box doesn't show. That seems like a bug to me.

If there's another form still open, the message box shows as expected.

Try this example from LINQPad:
C#
void Main()
{
    Application.Run(new Form1());
}

class Form1 : Form
{
    public Form1()
    {
        var btn = new Button();
        btn.Text = "Open Form2";
        btn.Click += btn_Click;
        Controls.Add(btn);
    }
    
    private void btn_Click(object sender, EventArgs e)
    {
        var form = new Form2();
        form.Show();
    }
}

class Form2 : Form
{
    public Form2()
    {
        var btn = new Button();
        btn.Text = "Close me";
        btn.Click += btn_Click;
        Controls.Add(btn);
    }
    
    private void btn_Click(object sender, EventArgs e)
    {
        Close();
        Console.WriteLine("Closed");
        MessageBox.Show("Closed");
    }
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard MacCutchan12-Nov-16 22:28
mveRichard MacCutchan12-Nov-16 22:28 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Dave Kreskowiak12-Nov-16 7:47
mveDave Kreskowiak12-Nov-16 7:47 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard Deeming12-Nov-16 12:44
mveRichard Deeming12-Nov-16 12:44 
QuestionWhy this sub is executed 3 times ? Pin
desanti7-Nov-16 19:26
desanti7-Nov-16 19:26 
AnswerRe: Why this sub is executed 3 times ? Pin
Eddy Vluggen11-Nov-16 8:17
professionalEddy Vluggen11-Nov-16 8:17 
GeneralRe: Why this sub is executed 3 times ? Pin
desanti11-Nov-16 20:28
desanti11-Nov-16 20:28 
GeneralRe: Why this sub is executed 3 times ? Pin
Eddy Vluggen12-Nov-16 2:42
professionalEddy Vluggen12-Nov-16 2:42 
QuestionMy application does not close anymore Pin
desanti31-Oct-16 13:33
desanti31-Oct-16 13:33 
QuestionRe: My application does not close anymore Pin
Midi_Mick31-Oct-16 15:43
professionalMidi_Mick31-Oct-16 15:43 
AnswerRe: My application does not close anymore Pin
desanti31-Oct-16 16:01
desanti31-Oct-16 16:01 
GeneralRe: My application does not close anymore Pin
Midi_Mick31-Oct-16 18:07
professionalMidi_Mick31-Oct-16 18:07 
GeneralRe: My application does not close anymore Pin
desanti31-Oct-16 19:35
desanti31-Oct-16 19:35 
AnswerRe: My application does not close anymore Pin
Midi_Mick31-Oct-16 19:47
professionalMidi_Mick31-Oct-16 19:47 
GeneralRe: My application does not close anymore Pin
desanti31-Oct-16 19:56
desanti31-Oct-16 19:56 
GeneralRe: My application does not close anymore Pin
Midi_Mick31-Oct-16 20:01
professionalMidi_Mick31-Oct-16 20:01 
GeneralRe: My application does not close anymore Pin
desanti31-Oct-16 20:06
desanti31-Oct-16 20:06 
GeneralRe: My application does not close anymore Pin
Midi_Mick31-Oct-16 20:26
professionalMidi_Mick31-Oct-16 20:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.