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
Saravanan

RE: how to mimimize an application by ManishBafna

ManishBafna
Wed Feb 28 02:48:28 CST 2007

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.



"Saravanan" wrote:

> 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
> Saravanan

RE: how to mimimize an application by Saravanan

Saravanan
Wed Feb 28 03:18:28 CST 2007

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




"Manish Bafna" wrote:

> 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.
>
>
>
> "Saravanan" wrote:
>
> > 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
> > Saravanan

RE: how to mimimize an application by ManishBafna

ManishBafna
Wed Feb 28 04:06:10 CST 2007

Hi,
try this code in the click event of the button:
myForm.WindowState = FormWindowState.Minimized;
--
Thanks and Regards.
Manish Bafna.
MCP and MCTS.



"Saravanan" wrote:

> 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
> Saravanan

RE: how to mimimize an application by Saravanan

Saravanan
Wed Feb 28 04:41:51 CST 2007

I am using UserControl, that property is not there


"Manish Bafna" wrote:

> Hi,
> try this code in the click event of the button:
> myForm.WindowState = FormWindowState.Minimized;
> --
> Thanks and Regards.
> Manish Bafna.
> MCP and MCTS.
>
>
>
> "Saravanan" wrote:
>
> > 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
> > Saravanan

RE: how to mimimize an application by ManishBafna

ManishBafna
Wed Feb 28 07:56:29 CST 2007

Hi,
you can get reference to parent form by this code:
this.ParentForm.WindowState = FormWindowState.Minimized;
--
Thanks and Regards.
Manish Bafna.
MCP and MCTS.



"Saravanan" wrote:

> 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
> Saravanan

RE: how to mimimize an application by Saravanan

Saravanan
Wed Feb 28 08:02:52 CST 2007


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

"Manish Bafna" wrote:

> Hi,
> you can get reference to parent form by this code:
> this.ParentForm.WindowState = FormWindowState.Minimized;
> --
> Thanks and Regards.
> Manish Bafna.
> MCP and MCTS.
>
>
>
> "Saravanan" wrote:
>
> > 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
> > Saravanan

RE: how to mimimize an application by ManishBafna

ManishBafna
Wed Feb 28 08:34:15 CST 2007

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.



"Saravanan" wrote:

> 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
> Saravanan

Re: how to mimimize an application by Herfried

Herfried
Wed Feb 28 09:34:51 CST 2007

"Saravanan" <Saravanan@discussions.microsoft.com> schrieb:
>I am using UserControl, that property is not there

\\\
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/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Re: how to mimimize an application by Herfried

Herfried
Wed Feb 28 09:35:37 CST 2007

"Saravanan" <Saravanan@discussions.microsoft.com> schrieb:
> Thanks its working, How can i do it with Sendkeys.Send() method..

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/>