|
-
Nov 17th, 2011, 08:38 AM
#1
Thread Starter
Lively Member
Working in background
I want to create a program working in background that:
I open program and he is invisible (not appear on desktop and in taskbar).
How I can do this ?
-
Nov 17th, 2011, 08:43 AM
#2
Re: Working in background
Depending on exactly what you want, you could create a Windows service, a Console application or you could create a Windows Forms app with no form. The latter would generally only make sense if the user was going to interact with it in some way, e.g. a system tray icon. If you want the third option then follow the CodeBank link in my signature and check out my Formless Tray App thread. If you'd like us to provide more information then you'll have to do the same for us first.
-
Nov 17th, 2011, 08:51 AM
#3
Thread Starter
Lively Member
Re: Working in background
-
Nov 17th, 2011, 09:13 AM
#4
Thread Starter
Lively Member
Re: Working in background
I have a new question:
I want if I press f1 then music1 play end if ... where I can write this code ? in a windows form app I write this code in form.load ....
-
Nov 17th, 2011, 09:24 AM
#5
Re: Working in background
 Originally Posted by Stunt3r
I have a new question:
I want if I press f1 then music1 play end if ... where I can write this code ? in a windows form app I write this code in form.load ....
F1 is a very poor choice for that functionality because it is the Windows standard for Help. You should choose some other, more unusual key combination, including at least one modifier key.
You definitely wouldn't put such code in the Load event handler of a form because that would simply play the sound when the form loaded. It sounds like you do want a WinForms app without a form and you'll need to use the RegisterHotKey API to catch specific key combinations when your app does not have focus. There are plenty of examples around, including in the CodeBank forum on this very site.
-
Nov 17th, 2011, 10:03 AM
#6
Thread Starter
Lively Member
Re: Working in background
Can you give me a link or a code to call RegisterHotKey ?
-
Nov 17th, 2011, 07:25 PM
#7
Re: Working in background
 Originally Posted by Stunt3r
Can you give me a link or a code to call RegisterHotKey ?
I don't have one sitting in my pocket. To get one I would have to use Google or, as I suggested, search the CodeBank forum. Is there some reason that you're less capable of doing that than I am?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|