Click here to Skip to main content
16,004,927 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralConvert Hex to Decimal Pin
sumiko16-Aug-04 22:02
sumiko16-Aug-04 22:02 
GeneralRe: Convert Hex to Decimal Pin
Dave Kreskowiak17-Aug-04 4:02
mveDave Kreskowiak17-Aug-04 4:02 
GeneralRe: Convert Hex to Decimal Pin
sumiko31-Aug-04 21:15
sumiko31-Aug-04 21:15 
QuestionHow to make a service Pin
Murtuza Husain Miyan Patel16-Aug-04 20:27
professionalMurtuza Husain Miyan Patel16-Aug-04 20:27 
AnswerRe: How to make a service Pin
Dave Kreskowiak17-Aug-04 3:42
mveDave Kreskowiak17-Aug-04 3:42 
GeneralRe: How to make a service Pin
Murtuza Husain Miyan Patel17-Aug-04 6:16
professionalMurtuza Husain Miyan Patel17-Aug-04 6:16 
GeneralRe: How to run Vb app as a service Pin
Murtuza Husain Miyan Patel17-Aug-04 6:18
professionalMurtuza Husain Miyan Patel17-Aug-04 6:18 
GeneralRe: How to run Vb app as a service Pin
Dave Kreskowiak18-Aug-04 12:16
mveDave Kreskowiak18-Aug-04 12:16 
patelmurtuza wrote:
and it is not set for "Allow interaction with the desktop

Since your putting up a form that asks for user input when the "service" starts, you have two problems that will stop you dead in your tracks.

First, is the above quote. This should be a big clue. Without "allow interaction with desktop", you're never going to see your form since the services don't get a desktop. This is what is making your app quit immediately on startup.

Second, your app can't put up a form if there is no user logged in. Your service must be able to handle the service control managers window messages that say when a user is logging on, when the user logs off, when Windows starts and stops...

Your app can't handle these messages because it's a VB app that doesn't expose its message handler to you to override. VB.NET does do this. Once your app starts, normally, you MUST call the Win32 API function RegisterServiceControlHandlerEx with the pointer to another function, that you write, called HandlerEx. This function will receive the messages that notify you when a user if logging on and off and the normal service control messages like, stop, pause, resume. Even if you call this function, you still have the problem where your app must be running code in a loop to keep the app alive so the HandlerEx function does get killed.

SRVANY can't make ANY app a service. Especially ones that require user interaction!

Avoid the headaches with doing this and write the thing in VB.NET, which supports writing services natively. VB6 doesn't and is not a good choice for it at all.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralSearching HD for files of type Pin
Kevnar16-Aug-04 17:50
Kevnar16-Aug-04 17:50 
GeneralRe: Searching HD for files of type Pin
S Sansanwal16-Aug-04 18:19
S Sansanwal16-Aug-04 18:19 
GeneralRe: Searching HD for files of type Pin
Kevnar16-Aug-04 18:27
Kevnar16-Aug-04 18:27 
GeneralRe: Searching HD for files of type Pin
S Sansanwal16-Aug-04 18:36
S Sansanwal16-Aug-04 18:36 
GeneralRe: Searching HD for files of type Pin
Anonymous16-Aug-04 18:31
Anonymous16-Aug-04 18:31 
GeneralRe: Searching HD for files of type Pin
Kevnar16-Aug-04 20:22
Kevnar16-Aug-04 20:22 
QuestionReloading a form? Pin
Glisson16-Aug-04 16:28
Glisson16-Aug-04 16:28 
AnswerRe: Reloading a form? Pin
S Sansanwal16-Aug-04 18:07
S Sansanwal16-Aug-04 18:07 
GeneralTrack user clicks in a menu Pin
and_vb16-Aug-04 15:36
and_vb16-Aug-04 15:36 
GeneralRe: Track user clicks in a menu Pin
Dave Kreskowiak16-Aug-04 18:22
mveDave Kreskowiak16-Aug-04 18:22 
GeneralProtection via registry .. need help Pin
AbuFahed16-Aug-04 14:34
AbuFahed16-Aug-04 14:34 
GeneralRe: Protection via registry .. need help Pin
Dave Kreskowiak16-Aug-04 18:21
mveDave Kreskowiak16-Aug-04 18:21 
GeneralCompact and repair Pin
benjj16-Aug-04 13:19
benjj16-Aug-04 13:19 
GeneralRe: Compact and repair Pin
Anonymous16-Aug-04 14:12
Anonymous16-Aug-04 14:12 
GeneralRe: Compact and repair Pin
Dave Kreskowiak16-Aug-04 18:20
mveDave Kreskowiak16-Aug-04 18:20 
GeneralRe: Compact and repair Pin
benjj17-Aug-04 3:03
benjj17-Aug-04 3:03 
GeneralHelp with Windows Media 9 in VB Pin
Kevnar16-Aug-04 10:07
Kevnar16-Aug-04 10:07 

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.