Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Process p1 = Process.Start(@"1.pptx");
  2. Process p2 = Process.Start(@"2.pptx");
  3.  
  4. SetWindowPos(p1.MainWindowHandle, -1,
  5. 0,
  6. 0,
  7. 100,
  8. 100,
  9. SWP_SHOWWINDOW);
  10. SetWindowPos(p2.MainWindowHandle, -1,
  11. 200,
  12. 200,
  13. 100,
  14. 100,
  15. SWP_SHOWWINDOW);
  16.  
  17. Process[] processlist = Process.GetProcesses();
  18.  
  19. foreach (Process process in processlist)
  20. {
  21. if (!String.IsNullOrEmpty(process.MainWindowTitle))
  22. {
  23. Console.WriteLine("Process: {0} ID: {1} Window title: {2}", process.ProcessName, process.Id, process.MainWindowTitle);
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement