How to make it so that the application randomly chooses which part of the screen to spawn through the c # -pa code?

    1 answer 1

    Something like this (he wrote in the answer window, he could have made a mess of something):

    var rand = new Random(); var area = Screen.PrimaryScreen.WorkingArea; this.Left = rand.Next(area.Left, area.Right - this.Width); this.Top = rand.Next(area.Top, area.Bottom - this.Height);