Results 1 to 4 of 4
  1. #1

    Default Whats the event for minimizing in vb.net?


    I cant find the form event for minimizing/maximizing. Coz I need to show a msgbox whenever a form is minimized

  2. #2

    Default Re: Whats the event for minimizing in vb.net?

    I think you must override the methods that handles the maxime/minimize event.

    How about linking it with the System.EventHandler?

    I've read this on a C# book. Though I've never tested it yet.

    Put it sa Initialization :
    this.Closed += new System.EventHandler(OnClickButton1);

    Method :

    public void OnClickButton1(object sender, System.EventArgs e) {
    Application.Exit();
    }

  3. #3

    Default Re: Whats the event for minimizing in vb.net?

    Resize event.
    Then check me.WindowState = FormWindowState.Minimized if true.

  4. #4

    Default Re: Whats the event for minimizing in vb.net?

    use deactivate.
    c# code convert to vb.net
    Code:
      public partial class Form1 : Form
      {
        public Form1()
        {
          InitializeComponent();
          this.Deactivate+=new EventHandler(Form1_Deactivate);
        }
    
        public void Form1_Deactivate(object sender, EventArgs e)
        {
          if (this.WindowState == FormWindowState.Minimized)
          {
            MessageBox.Show("test");
          }
        }
      }

  5.    Advertisement

Similar Threads

 
  1. How To use the DLL's in VB.net
    By pitbull147 in forum Programming
    Replies: 3
    Last Post: 09-23-2008, 06:11 PM
  2. Help with events in VB.NET
    By DeathFox in forum Programming
    Replies: 5
    Last Post: 12-17-2007, 08:07 PM
  3. Replies: 1
    Last Post: 08-09-2007, 12:38 PM
  4. Whats the Best Class Build in Rose Online?
    By Chipmunk888 in forum Software & Games (Old)
    Replies: 2
    Last Post: 05-02-2007, 08:32 AM
  5. Whats the cause of crisis in the Philippines?
    By filipinoako2000200 in forum Politics & Current Events
    Replies: 14
    Last Post: 06-05-2006, 02:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top