User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » VB.NET Windows Service won't launch SysTray Icon Page [1]  
TJB627
All American
2110 Posts
user info
edit post

Okay, so I'm working on my first Windows Service app and right now I'm just trying to get the service to show an icon in the system tray when the service starts. Apparently, I'm missing something because I cannot get it to work for anything. Here is what I think is my load event for my service.

Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
RemindMeIcon.Visible = True
End Sub

In the design view I have a NotifyIcon object named RemindMeIcon and I can't get that icon to show up at all. Somebody please inform me of what I'm doing wrong.

BTW I have been Googling a ton and can't seem to find anything that helps

[Edited on June 24, 2008 at 10:21 PM. Reason : google]

6/24/2008 10:20:08 PM

evan
All American
27701 Posts
user info
edit post

make sure you allow the service to interact with the desktop in the windows services mmc snapin

6/24/2008 10:24:57 PM

TJB627
All American
2110 Posts
user info
edit post

^Can you explain how I would check that?

6/24/2008 10:27:45 PM

evan
All American
27701 Posts
user info
edit post

start > run > services.msc

right-click your service, go to properties

click the Log On tab

check the box that says "allow service to interact with desktop"



honestly, if you didn't know this, what are you doing writing apps?

6/24/2008 10:30:41 PM

TJB627
All American
2110 Posts
user info
edit post

Hey I said it was my first one, dang. Anyway, that box wasn't checked but that didn't fix it. Any other suggestions?

Actually let me clarify, I knew about services.msc I didn't know it was called the windows services mmc snapin

[Edited on June 24, 2008 at 10:37 PM. Reason : .]

6/24/2008 10:34:02 PM

evan
All American
27701 Posts
user info
edit post

it would help if we could see your code

what type of object is RemindMeIcon?

6/25/2008 12:07:15 AM

Fry
The Stubby
7781 Posts
user info
edit post

just to clarify, i'm going to probably be working with tjb on this app... the idea was to build something so that we can learn from the basics, up. we're not rookies with coding or anything like that, we're just not heavily experienced with .NET and building windows services/apps. thanks ahead of time for any help.

6/25/2008 12:31:16 AM

TJB627
All American
2110 Posts
user info
edit post

NM, I think I got it. My ProjectInstaller class wasn't correct.

[Edited on June 25, 2008 at 7:39 AM. Reason : Thanks]

6/25/2008 7:36:20 AM

 Message Boards » Tech Talk » VB.NET Windows Service won't launch SysTray Icon Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.