Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


problem in minimize form in c#


problem in minimize form in c#

Author
Message
john_zakaria
john_zakaria
Forum God
Forum God (4K reputation)Forum God (4K reputation)Forum God (4K reputation)Forum God (4K reputation)Forum God (4K reputation)Forum God (4K reputation)Forum God (4K reputation)Forum God (4K reputation)Forum God (4K reputation)

Group: Forum Members
Posts: 10, Visits: 17
hi everyone



i want to minimize my form to system tray in my C# windows application and hide it from taskbar



my main problem is that when i click on minimize it goes to system tray and hide from taskbar



but it goes to the top of start menu



please find the attached what i mean.



1- i want to know where is the minimize button action in my application



my code is as follow



private void Form1_Resize(object sender, EventArgs e)

{

if (WindowState == FormWindowState.Minimized)

{

this.Hide();

this.Visible = false;

this.ShowInTaskbar = false;

this.Opacity = 0;





}

}









so how to disable viewing my form in top of start menu button?
Attachments
error.jpg (2.5K views, 9.00 KB)
AmrMohallel
AmrMohallel
Forum God
Forum God (3.3K reputation)Forum God (3.3K reputation)Forum God (3.3K reputation)Forum God (3.3K reputation)Forum God (3.3K reputation)Forum God (3.3K reputation)Forum God (3.3K reputation)Forum God (3.3K reputation)Forum God (3.3K reputation)

Group: Forum Members
Posts: 7, Visits: 5
Hello John,



Why are u hiding, disabling visibility, decreasing opacity?



What you need to do can be done by just minimizing the form and removing it from the taskbar.



Try just doing the following:



------------------------------------------------------

private void Form1_Resize(object sender, EventArgs e)

{

if (WindowState == FormWindowState.Minimized)

this.ShowInTaskbar = false;

}



------------------------------------------------------





Regards.


Amr Mohallel

University of Sunderland

Faculty of Applied Sciences - Applied Business Computing
Edited
3/7/2012 by AmrMohallel
annaharris
annaharris
Forum God
Forum God (9.6K reputation)Forum God (9.6K reputation)Forum God (9.6K reputation)Forum God (9.6K reputation)Forum God (9.6K reputation)Forum God (9.6K reputation)Forum God (9.6K reputation)Forum God (9.6K reputation)Forum God (9.6K reputation)

Group: Forum Members
Posts: 20, Visits: 21
I don't think that this is going to work as the form will still be visible within the start menu.
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search