fork download
  1. using System;
  2. using System.Drawing;
  3. using System.Windows.Forms;
  4. namespace ScrClick
  5. {
  6. static class Program
  7. {
  8. [STAThread]
  9. static void Main()
  10. {
  11. Application.EnableVisualStyles();
  12. Application.SetCompatibleTextRenderingDefault(false);
  13. Application.Run(new FormS());
  14. }
  15. }
  16. public class FormS : Form
  17. {
  18. public FormS()
  19. {
  20. this.ClientSize = new Size(800, 600);
  21. this.MouseDown += _MouseDown;
  22. }
  23. void _MouseDown(object sender, MouseEventArgs e)
  24. {
  25. if (e.Button == MouseButtons.Left)
  26. {
  27. Point p = e.Location;
  28. this.Text = "Screen Clicked " + p;
  29. }
  30. }
  31. }
  32. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(3,22): error CS0234: The type or namespace name `Forms' does not exist in the namespace `System.Windows'. Are you missing `System.Windows.Forms' assembly reference?
prog.cs(16,26): error CS0246: The type or namespace name `Form' could not be found. Are you missing an assembly reference?
prog.cs(23,40): error CS0246: The type or namespace name `MouseEventArgs' could not be found. Are you missing an assembly reference?
Compilation failed: 3 error(s), 0 warnings
stdout
Standard output is empty