all groups > dotnet windows forms > february 2007 >
You're in the

dotnet windows forms

group:

how to mimimize an application



how to mimimize an application Saravanan
2/27/2007 10:54:12 PM
dotnet windows forms: Hi

I am using C#, i dont know to know how to minimize the application in
Taskbar when i click the button(its not minimizebox button), that means how
to handle it?? normally if u click the minimize button on the form it will
minimize the form, how can i do it in a simple button click event

Regards
RE: how to mimimize an application Manish Bafna
2/28/2007 12:48:28 AM
Hi,
This link should help you:

http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_20947279.html

Search for NotifyIcon on that page.

--
Thanks and Regards.
Manish Bafna.
MCP and MCTS.



[quoted text, click to view]
RE: how to mimimize an application Saravanan
2/28/2007 1:18:28 AM
Hi iam planning to handle this in some different way.
using sendkeys.send() method to minimize the application, for that i have to
pass the argument of (LWin+M). Lwin is for windows logo key and M, these
combination will minimize the application, but the problem is how to pass
this combination to sendkeys.Send(), i searched in the net but so far nothing
i got regarding this, Can u please help so that i can implement this feature

Regards




[quoted text, click to view]
RE: how to mimimize an application Manish Bafna
2/28/2007 2:06:10 AM
Hi,
try this code in the click event of the button:
myForm.WindowState = FormWindowState.Minimized;
--
Thanks and Regards.
Manish Bafna.
MCP and MCTS.



[quoted text, click to view]
RE: how to mimimize an application Saravanan
2/28/2007 2:41:51 AM
I am using UserControl, that property is not there


[quoted text, click to view]
RE: how to mimimize an application Manish Bafna
2/28/2007 5:56:29 AM
Hi,
you can get reference to parent form by this code:
this.ParentForm.WindowState = FormWindowState.Minimized;
--
Thanks and Regards.
Manish Bafna.
MCP and MCTS.



[quoted text, click to view]
RE: how to mimimize an application Saravanan
2/28/2007 6:02:52 AM

Thanks its working, How can i do it with Sendkeys.Send() method..

[quoted text, click to view]
RE: how to mimimize an application Manish Bafna
2/28/2007 6:34:15 AM
Hi,
I think senkeys is not appropriate in this scenario.By that it will become
unnecessarily complex.I have one request is that if you have found my post
helpful then please do click "Yes" at "Was this post helpful to you?"
--
Thanks and Regards.
Manish Bafna.
MCP and MCTS.



[quoted text, click to view]
Re: how to mimimize an application Herfried K. Wagner [MVP]
2/28/2007 4:34:51 PM
"Saravanan" <Saravanan@discussions.microsoft.com> schrieb:
[quoted text, click to view]

\\\
Dim ParentForm As Form = Me.FindForm()
If ParentForm IsNot Nothing Then
ParentForm.WindowState = FormWindowState.Minimized
End If
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
Re: how to mimimize an application Herfried K. Wagner [MVP]
2/28/2007 4:35:37 PM
"Saravanan" <Saravanan@discussions.microsoft.com> schrieb:
[quoted text, click to view]

Why would you want to do that? 'SendKeys.Send' is always problematic
because there is no guarantee the input is directed to the expected window.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
AddThis Social Bookmark Button