473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Code Question -Second Post

I am trying to creat an notification icon that will bring my form to
the foreground. Why does this code not work

Private Sub frmExample_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
NotifyIcon1.Icon = Me.Icon
NotifyIcon1.Visible = True
End Sub
Private Sub NotifyIcon1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles NotifyIcon1.DoubleClick, NotifyIcon1.Click
Me.BringToFront()
End Sub

But this code work

Private Sub frmExample_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
NotifyIcon1.Icon = Me.Icon
NotifyIcon1.Visible = True
End Sub
Private Sub NotifyIcon1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles NotifyIcon1.DoubleClick, NotifyIcon1.Click
Stop
Me.BringToFront()
End Sub

(Note all I did was add a stop to verify that the event was firing
Dec 15 '06 #1
1 1461
Rick,

I did not try it, but with your stop you give in my idea focus to the IDE.

Cor

<Ri**@aol.comschreef in bericht
news:5l********************************@4ax.com...
>I am trying to creat an notification icon that will bring my form to
the foreground. Why does this code not work

Private Sub frmExample_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
NotifyIcon1.Icon = Me.Icon
NotifyIcon1.Visible = True
End Sub
Private Sub NotifyIcon1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles NotifyIcon1.DoubleClick, NotifyIcon1.Click
Me.BringToFront()
End Sub

But this code work

Private Sub frmExample_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
NotifyIcon1.Icon = Me.Icon
NotifyIcon1.Visible = True
End Sub
Private Sub NotifyIcon1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles NotifyIcon1.DoubleClick, NotifyIcon1.Click
Stop
Me.BringToFront()
End Sub

(Note all I did was add a stop to verify that the event was firing

Dec 16 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
by: Mudge | last post by:
Please, someone, tell me why OO in PHP is better than procedural.
9
by: bigoxygen | last post by:
Hi. I'm using a 3 tier FrontController Design for my web application right now. The problem is that I'm finding to have to duplicate a lot of code for similar functions; for example, listing...
4
by: jason | last post by:
Hello. Newbie on SQL and suffering through this. I have two tables created as such: drop table table1; go drop table table2; go
16
by: Dario de Judicibus | last post by:
I'm getting crazy. Look at this code: #include <string.h> #include <stdio.h> #include <iostream.h> using namespace std ; char ini_code = {0xFF, 0xFE} ; char line_sep = {0x20, 0x28} ;
109
by: Andrew Thompson | last post by:
It seems most people get there JS off web sites, which is entirely logical. But it is also a great pity since most of that code is of such poor quality. I was looking through the JS FAQ for any...
5
by: ED | last post by:
I currently have vba code that ranks employees based on their average job time ordered by their region, zone, and job code. I currently have vba code that will cycle through a query and ranks each...
37
by: Alan Silver | last post by:
Hello, Newbie here, so please forgive what is probably a basic question ... I see a lot of discussion about "code behind", which if I have understood correctly, means that the script code goes...
171
by: tshad | last post by:
I am just trying to decide whether to split my code and uses code behind. I did it with one of my pages and found it was quite a bit of trouble. I know that most people (and books and articles)...
29
by: John Rivers | last post by:
Hello, What good reason there is for not allowing methods in ASPX pages I can't imagine, but here is how to get around that limitation: (START) <body MS_POSITIONING="FlowLayout"> <form...
4
by: KenFehling | last post by:
Hello. I am wondering if there exists a piece of software that takes multiple .js files that are nicely indented and commented and create one big tightly packed .js file. I'm hoping the one file...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.