示例#1
0
        static void TransformProcessToForeground()
        {
            ProcessSerialNumber psn = new ProcessSerialNumber();

            Debug.Print("Setting process to be foreground application.");

            API.GetCurrentProcess(ref psn);
            API.TransformProcessType(ref psn, ProcessApplicationTransformState.kProcessTransformToForegroundApplication);
            API.SetFrontProcess(ref psn);
        }
示例#2
0
 public static extern int GetCurrentProcess(ref ProcessSerialNumber psn);
示例#3
0
 public static extern int SetFrontProcess(ref ProcessSerialNumber psn);
示例#4
0
 public static extern int TransformProcessType(ref ProcessSerialNumber psn, ProcessApplicationTransformState type);