i forgot how to do this someone help
how do i make this into one
private void mnuTray_Click(object sender, System.EventArgs e)
{
notifyIcon1.Visible = true; WindowState =
FormWindowState.Minimized; Hide();
}
private void lnkTray_LinkClicked(object sender,
System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
notifyIcon1.Visible = true; WindowState =
FormWindowState.Minimized; Hide();
}
I remember I had to change it to something
like --------------------------------
private void mnuTray_Click(object sender,
System.Windows.Forms.LinkLabelLinkClickedEventArgs , System.EventArgs e)
{
notifyIcon1.Visible = true; WindowState =
FormWindowState.Minimized; Hide();
} 3 1407
On Thu, 6 Sep 2007 15:34:12 -0400, "Al Biheiri" <ab******@gmail.com>
wrote:
>i forgot how to do this someone help
how do i make this into one
private void mnuTray_Click(object sender, System.EventArgs e)
{
notifyIcon1.Visible = true; WindowState = FormWindowState.Minimized; Hide();
}
private void lnkTray_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArg s e)
{
notifyIcon1.Visible = true; WindowState = FormWindowState.Minimized; Hide();
}
Have you tried:
private void lnkTray_LinkClicked(object sender,
System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
mnuTray_Click(sender, e);
}
to call the first button click action when the second button is
clicked?
rossum
> I remember I had to change it to something like --------------------------------
private void mnuTray_Click(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArg s , System.EventArgs e)
{
notifyIcon1.Visible = true; WindowState = FormWindowState.Minimized; Hide();
}
The neater way would be to refactor this into a single method, like so:
private void LinkClickedEventHandler()
{
notifyIcon1.Visible = true;
WindowState = FormWindowStateMinimized;
Hide();
}
And then call that from each event handler.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"rossum" <ro******@coldmail.comwrote in message
news:6t********************************@4ax.com...
On Thu, 6 Sep 2007 15:34:12 -0400, "Al Biheiri" <ab******@gmail.com>
wrote:
>>i forgot how to do this someone help
how do i make this into one
private void mnuTray_Click(object sender, System.EventArgs e) { notifyIcon1.Visible = true; WindowState = FormWindowState.Minimized; Hide(); }
private void lnkTray_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventAr gs e) { notifyIcon1.Visible = true; WindowState = FormWindowState.Minimized; Hide(); }
Have you tried:
private void lnkTray_LinkClicked(object sender,
System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
mnuTray_Click(sender, e);
}
to call the first button click action when the second button is
clicked?
rossum
>> I remember I had to change it to something like --------------------------------
private void mnuTray_Click(object sender, System.Windows.Forms.LinkLabelLinkClickedEventAr gs , System.EventArgs e) { notifyIcon1.Visible = true; WindowState = FormWindowState.Minimized; Hide(); }
yea that works...should of thought about that,,,, woops
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:O9**************@TK2MSFTNGP02.phx.gbl...
The neater way would be to refactor this into a single method, like so:
private void LinkClickedEventHandler()
{
notifyIcon1.Visible = true;
WindowState = FormWindowStateMinimized;
Hide();
}
And then call that from each event handler.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"rossum" <ro******@coldmail.comwrote in message
news:6t********************************@4ax.com...
>On Thu, 6 Sep 2007 15:34:12 -0400, "Al Biheiri" <ab******@gmail.com> wrote:
>>>i forgot how to do this someone help
how do i make this into one
private void mnuTray_Click(object sender, System.EventArgs e) { notifyIcon1.Visible = true; WindowState = FormWindowState.Minimized; Hide(); }
private void lnkTray_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventA rgs e) { notifyIcon1.Visible = true; WindowState = FormWindowState.Minimized; Hide(); }
Have you tried:
private void lnkTray_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { mnuTray_Click(sender, e); }
to call the first button click action when the second button is clicked?
rossum
>>> I remember I had to change it to something like --------------------------------
private void mnuTray_Click(object sender, System.Windows.Forms.LinkLabelLinkClickedEventA rgs , System.EventArgs e) { notifyIcon1.Visible = true; WindowState = FormWindowState.Minimized; Hide(); }
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ricardo Santos |
last post by:
Hi,
I have a Python AST, which I have modified slightly (but still a valid
Python AST). How do I go back to its source code representation?
source code -> AST (POSSIBLE)
AST -> source code ...
|
by: Keith R |
last post by:
I have VB6, and eventually plan to upgrade to dotnet.
I will soon start writing an application that will be mostly local
(client?) but will interface with a server a few times, to authenticate...
|
by: Jon Rea |
last post by:
is there a c# -> c++ code converter out there ?
Hi people,
I was just wondering if there is a C# to C++ converter out there. I have
some working c# code and need to integrate it into a...
|
by: Henry Johnson |
last post by:
Okay - I'm spinning my wheels on this one... can someone help me figure out
how to programmatically populate a table cell as follows (from C#
code-behind)? I've tried using a Literal control in the...
|
by: David Thielen |
last post by:
Hi;
Almost all of the Quick Starts show the code in the .aspx file inside a
<script> instead of in a seperate .aspx.cs file. My instinct is that the code
should be in a seperate file to keep the...
|
by: Schraalhans Keukenmeester |
last post by:
I am building a default sheet for my linux-related pages.
Since many linux users still rely on/prefer viewing textmode and
unstyled content I try to stick to the correct html tags to pertain good...
|
by: Alex Maghen |
last post by:
Hi. I'm a little confused about the code that resides in the code-behind of a
MasterPage and the code that resides in the code-behind of the actual pages
that USE that MasterPage.
I'm noticing,...
|
by: Mich |
last post by:
Hi,
1)
i defined a html line in the aspx file like this but it's still visible::
<hr id="hr1" visible="false" />
So i defined it like this and now it's hidden:
<hr id="hr1"...
|
by: Andreas Prilop |
last post by:
I've come along a strange behaviour (bug?) in the Mozilla/Firefox
browsers. It does not happen in Internet Explorer.
When I have *disabled* the option "Allow pages to choose
their own fonts" and...
|
by: jty0734 |
last post by:
if you have mips cross compiler, please convert this c code to mips
code.
i'm try to install mips compiler 3 days, but some error fail to that.
so if you have something cross compiler c code...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |