hi all
i have a module for keylogging. it works fine, but i have a simple problem.
i want the program log every thing until i press a specific sequence of keys (alt+ctrl+shift+F10 for example). i create a windows form application and create a class netlogger. in main function i create a new instance of class. but when program reachs end of main it exits from program. i want program to be run as hidden process, so i dont want to add a windows form on application. how should i overcome this problem?
thanks

[STAThread]
    static void Main(string[] args)
    {
        ....
        ....
        NetKeyLogger.Keylogger kl = new NetKeyLogger.Keylogger();
        ??????
    }

You must first learn to crawl before you start to walk.
Start to learn the difference between a Console application and a Windows Forms application. The code you posted is console code, you talk about form code?!?
Besides: your spyware works fine (your own words)

hi all
i am programming for at least 5 years and i work on .net at least 3 years, so i know enough about programming.
i have found a solution for my problem, but i am searching for maybe better way.
i can create a new project and add following code to solve the problem:

private static Process pcsMain;

pcsMain = new System.Diagnostics.Process();
pcsMain.StartInfo.CreateNoWindow = true;
pcsMain.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
pcsMain.StartInfo.FileName = "NetLogger.exe";
pcsMain.StartInfo.Arguments = "WHATEVER ARGS NEEDED";
pcsMain.Start();
pcsMain.WaitForExit();

Edited 7 Years Ago by hnp2500: n/a

Sounds like you are trying to create a keyboard sniffer program?

Yes, you are true.

This article has been dead for over six months. Start a new discussion instead.