Click here to Skip to main content
16,005,141 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Help Needed Again: Funny Effects about My.Settings Pin
Sonhospa1-Dec-16 8:58
Sonhospa1-Dec-16 8:58 
GeneralRe: Help Needed Again: Funny Effects about My.Settings Pin
Eddy Vluggen2-Dec-16 2:56
professionalEddy Vluggen2-Dec-16 2:56 
GeneralRe: Help Needed Again: Funny Effects about My.Settings Pin
Sonhospa13-Dec-16 6:48
Sonhospa13-Dec-16 6:48 
GeneralRe: Help Needed Again: Funny Effects about My.Settings Pin
Eddy Vluggen13-Dec-16 8:31
professionalEddy Vluggen13-Dec-16 8:31 
QuestionMy.Settings out of scope? Pin
Sonhospa24-Nov-16 0:42
Sonhospa24-Nov-16 0:42 
AnswerRe: My.Settings out of scope? Pin
Richard MacCutchan24-Nov-16 1:08
mveRichard MacCutchan24-Nov-16 1:08 
GeneralRe: My.Settings out of scope? Pin
Sonhospa24-Nov-16 1:25
Sonhospa24-Nov-16 1:25 
GeneralRe: My.Settings out of scope? Pin
Richard MacCutchan24-Nov-16 2:10
mveRichard MacCutchan24-Nov-16 2:10 
Answer[Resolved] Re: My.Settings out of scope? Pin
Sonhospa24-Nov-16 2:32
Sonhospa24-Nov-16 2:32 
Questionvb.net using string and custom objects Pin
dcof18-Nov-16 17:10
dcof18-Nov-16 17:10 
AnswerRe: vb.net using string and custom objects Pin
Richard MacCutchan18-Nov-16 22:02
mveRichard MacCutchan18-Nov-16 22:02 
GeneralRe: vb.net using string and custom objects Pin
dcof21-Nov-16 5:31
dcof21-Nov-16 5:31 
GeneralRe: vb.net using string and custom objects Pin
Richard MacCutchan21-Nov-16 6:59
mveRichard MacCutchan21-Nov-16 6:59 
GeneralRe: vb.net using string and custom objects Pin
Dave Kreskowiak21-Nov-16 9:28
mveDave Kreskowiak21-Nov-16 9:28 
AnswerRe: vb.net using string and custom objects Pin
David Mujica21-Nov-16 10:56
David Mujica21-Nov-16 10:56 
Questionissue in vb script while using MSXML2.ServerXMLHTTP.6.0 object Pin
praveenvb17-Nov-16 0:17
praveenvb17-Nov-16 0:17 
AnswerRe: issue in vb script while using MSXML2.ServerXMLHTTP.6.0 object Pin
Member 1032934426-Jul-17 17:23
Member 1032934426-Jul-17 17:23 
QuestionSet Focus on a textbox after showing form.showdialog() Pin
Hermawan2611-Nov-16 19:46
Hermawan2611-Nov-16 19:46 
AnswerRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard MacCutchan11-Nov-16 23:20
mveRichard MacCutchan11-Nov-16 23:20 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard Deeming12-Nov-16 3:55
mveRichard Deeming12-Nov-16 3:55 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard MacCutchan12-Nov-16 4:33
mveRichard MacCutchan12-Nov-16 4:33 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard Deeming12-Nov-16 4:37
mveRichard Deeming12-Nov-16 4:37 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard MacCutchan12-Nov-16 4:46
mveRichard MacCutchan12-Nov-16 4:46 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard Deeming12-Nov-16 5:48
mveRichard Deeming12-Nov-16 5: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 21:28
mveRichard MacCutchan12-Nov-16 21:28 

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.