<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Exit button with yes/no options' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Exit button with yes/no options' posted on the 'VB.NET' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2010 Programmers Heaven</copyright>
    <pubDate>Tue, 16 Mar 2010 10:08:08 -0700</pubDate>
    <lastBuildDate>Tue, 16 Mar 2010 10:08:08 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Exit button with yes/no options</title>
      <link>http://www.programmersheaven.com/mb/VBNET/409247/409247/exit-button-with-yesno-options/</link>
      <description>Hi everyone and thanks for reading my question!&lt;br /&gt;
&lt;br /&gt;
This is my first topic related on vb.net!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I want to implement an exit button with yes/no option in vb.net.&lt;br /&gt;
&lt;br /&gt;
Here's what I've tried:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Dim intrebare As String
        intrebare = MsgBox("Doriti parasirea aplicatiei?", MsgBoxStyle.YesNo)
        If intrebare = "Yes" Then ' if we press yes it quits vb.net
'here is the problem how to say him if he selects yes to quit from 'visual studio 2008?            

'Me.Close() if I select yes I want that it exits my full 'software , so exits visual studio 2008 is it possible?
           
        Else 
          'ok
            Me.Close()&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
No syntax error the problem is that even if I select yes or no it returns to me to the initial form. I want to return me on initial form only if I press No Button of MessageBox.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/409247/409247/exit-button-with-yesno-options/</guid>
      <pubDate>Fri, 13 Nov 2009 10:56:23 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: Exit button with yes/no options</title>
      <link>http://www.programmersheaven.com/mb/VBNET/409247/409374/re-exit-button-with-yesno-options/#409374</link>
      <description>&lt;pre class="sourcecode"&gt;
  Dim intrebare As System.Windows.Forms.DialogResult
  intrebare = MsgBox("Doriti parasirea aplicatiei?", MsgBoxStyle.YesNo)
  If intrebare = MsgBoxResult.Yes  Then 
    Me.Close()
  Else 
  End If
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Hope this helps!</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/409247/409374/re-exit-button-with-yesno-options/#409374</guid>
      <pubDate>Mon, 16 Nov 2009 07:09:44 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: Exit button with yes/no options</title>
      <link>http://www.programmersheaven.com/mb/VBNET/409247/409376/re-exit-button-with-yesno-options/#409376</link>
      <description>Thanks!  It helps very much!&lt;br /&gt;
&lt;br /&gt;
Best wishes Sean,&lt;br /&gt;
&lt;br /&gt;
Michael&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/409247/409376/re-exit-button-with-yesno-options/#409376</guid>
      <pubDate>Mon, 16 Nov 2009 07:42:32 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: Exit button with yes/no options</title>
      <link>http://www.programmersheaven.com/mb/VBNET/409247/409392/re-exit-button-with-yesno-options/#409392</link>
      <description>If you want a form to close as apposed to a full application&lt;br /&gt;
&lt;br /&gt;
You can use:&lt;br /&gt;
&lt;br /&gt;
Me.Close() (This closes the form you call this code from, if that form is set as the startup form, it will close the whole application)&lt;br /&gt;
&lt;br /&gt;
Application.End (This closes the whole application, may or may not call your Form_Closing and Form_Closed routines of open forms, so be careful)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
If you open your application from a Sub Main, and you do not specify a form with Application.Run(), then you have to do a Application.End to end the running process.&lt;br /&gt;
&lt;br /&gt;
Hope this helps!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/409247/409392/re-exit-button-with-yesno-options/#409392</guid>
      <pubDate>Mon, 16 Nov 2009 12:01:16 -0700</pubDate>
      <category>VB.NET</category>
    </item>
  </channel>
</rss>