How to stop app from closing and minimize it instead..

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
7 posts Page 1 of 1
Contributors
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

If you have skype, when you click x button app minimizes insted..

So how to do it?

1. You need FormClosing event and put this:
Code: Select all
 Private Sub FormClosing(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Me.Closing

        e.Cancel = True
        Me.WindowState = FormWindowState.Minimized

    End Sub
That's all Hope u like it :)
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Very interesting :D

Thanks :D
User avatar
Acem
VIP - Donator
VIP - Donator
Posts: 19
Joined: Wed Oct 19, 2011 6:49 pm

Very Good Keep Up The Good Work
From,
Acem
User avatar
Usman55
VIP - Site Partner
VIP - Site Partner
Posts: 2821
Joined: Thu Dec 24, 2009 7:52 pm

In the FormClosing event, write this code:

e.Cancel = True
Me.WindowState = FormWindowState.Minimized

That'll stop the form from closing and minimize it instead. Hope this helps...
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

The tutorial works fine.
User avatar
M1z23R
VIP - Donator
VIP - Donator
Posts: 622
Joined: Tue Sep 28, 2010 4:55 pm

Maybe you should use Me.Hide() instead minimize, you could add a notify icon - minimize it to system tray :)
User avatar
applezoom
New Member
New Member
Posts: 10
Joined: Thu Apr 12, 2012 12:31 am

Good Job +Rep
Image
:3
ROBLOX
7 posts Page 1 of 1
Return to “Tutorials”