Click here to Skip to main content
15,919,749 members
Home / Discussions / C#
   

C#

 
GeneralRe: ASP.NET C# Mifare Reader Web System Pin
Tyrone Boon12-Feb-08 5:35
Tyrone Boon12-Feb-08 5:35 
QuestionNotifyIcon does not respond Pin
danielhasdibs11-Feb-08 3:55
danielhasdibs11-Feb-08 3:55 
Ok, hopefully, this will be an easier problem to solve. I have a program that has a NotifyIcon control. When the user completes the MainFrame form, the window minimizes and then hides. I want to be able to double-click the notifyicon to make the window reappear. I also want to be able to right-click the n-icon and have my context menu strip show.

Now this works perfectly well when the window (MainFrame) is minimized, but once the user completes the MF form and the window hides, the n-icon does not respond. Here's my code:

<br />
private void MainFrm_Resize(object sender, EventArgs e)<br />
        {<br />
            if (this.WindowState == FormWindowState.Minimized)<br />
                Hide();<br />
        }<br />
...<br />
private void TB_Icon_DoubleClick(object sender, EventArgs e)<br />
        {<br />
            Show();<br />
            WindowState = FormWindowState.Normal;<br />
        }<br />
...<br />
private void TB_Icon_MouseUp(object sender, MouseEventArgs e)<br />
        {<br />
            if (e.Button == MouseButtons.Right)<br />
            {<br />
                ContMenuStrip.Show();<br />
            }<br />
        }<br />
...<br />
private void ContMenuStrip_Click(object sender, EventArgs e)<br />
        {<br />
            Show();<br />
            WindowState = FormWindowState.Normal;<br />
        }<br />
<br />
<br />


Now, keep in mind that after the user completes the MainFrame form (clicks the "OK" button), a loop is constantly running. Nothing happens when I double-click or right-click on the notifyicon. Thanks for the help.
GeneralRe: NotifyIcon does not respond Pin
DaveyM6911-Feb-08 4:16
professionalDaveyM6911-Feb-08 4:16 
GeneralRe: NotifyIcon does not respond Pin
danielhasdibs11-Feb-08 4:32
danielhasdibs11-Feb-08 4:32 
GeneralRe: NotifyIcon does not respond Pin
DaveyM6911-Feb-08 5:06
professionalDaveyM6911-Feb-08 5:06 
GeneralRe: NotifyIcon does not respond Pin
Luc Pattyn11-Feb-08 10:52
sitebuilderLuc Pattyn11-Feb-08 10:52 
GeneralRe: NotifyIcon does not respond Pin
danielhasdibs11-Feb-08 11:04
danielhasdibs11-Feb-08 11:04 
GeneralRe: NotifyIcon does not respond Pin
DaveyM6911-Feb-08 12:02
professionalDaveyM6911-Feb-08 12:02 
QuestionRe: NotifyIcon does not respond Pin
danielhasdibs12-Feb-08 2:11
danielhasdibs12-Feb-08 2:11 
QuestionRe: NotifyIcon does not respond Pin
danielhasdibs12-Feb-08 2:57
danielhasdibs12-Feb-08 2:57 
GeneralRe: NotifyIcon does not respond Pin
Aurelius166412-Feb-08 3:13
Aurelius166412-Feb-08 3:13 
QuestionRe: NotifyIcon does not respond Pin
danielhasdibs12-Feb-08 5:14
danielhasdibs12-Feb-08 5:14 
GeneralRe: NotifyIcon does not respond Pin
DaveyM6912-Feb-08 5:53
professionalDaveyM6912-Feb-08 5:53 
AnswerNotifyIcon does not respond (solution) Pin
danielhasdibs12-Feb-08 6:11
danielhasdibs12-Feb-08 6:11 
GeneralDistributed Computing Pin
Christopher Stratmann11-Feb-08 3:43
Christopher Stratmann11-Feb-08 3:43 
GeneralRe: Distributed Computing Pin
Expert Coming11-Feb-08 4:29
Expert Coming11-Feb-08 4:29 
GeneralRe: Distributed Computing Pin
led mike11-Feb-08 4:52
led mike11-Feb-08 4:52 
GeneralRe: Distributed Computing Pin
Christopher Stratmann11-Feb-08 5:20
Christopher Stratmann11-Feb-08 5:20 
GeneralRe: Distributed Computing Pin
led mike11-Feb-08 5:43
led mike11-Feb-08 5:43 
GeneralRe: Distributed Computing Pin
Christopher Stratmann11-Feb-08 6:41
Christopher Stratmann11-Feb-08 6:41 
GeneralRe: Distributed Computing Pin
led mike11-Feb-08 6:51
led mike11-Feb-08 6:51 
GeneralRe: Distributed Computing Pin
Dan Neely11-Feb-08 9:04
Dan Neely11-Feb-08 9:04 
GeneralRe: Distributed Computing Pin
emiaj11-Feb-08 6:58
emiaj11-Feb-08 6:58 
GeneralAdd Blank Line to dropdownlist Pin
minniemooo11-Feb-08 2:33
minniemooo11-Feb-08 2:33 
GeneralRe: Add Blank Line to dropdownlist Pin
Mark Churchill11-Feb-08 2:44
Mark Churchill11-Feb-08 2:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.