Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hello,

How to create red dot at center screen? It's not clickable, always top on.

(For counter-strike cross) :)
Posted
Comments
Sandeep Mewara 20-Jul-10 9:28am    
Elaborate! what screen?

C#
using System;
using System.Drawing;
using System.Windows.Forms;

static class Program
{
    static Form RedDot;

    [STAThread]
    static void Main()
    {
        RedDot = new Form();
        RedDot.AutoSize = false;
        RedDot.BackColor = Color.Red;
        RedDot.FormBorderStyle = FormBorderStyle.None;
        RedDot.ShowInTaskbar = false;
        RedDot.Size = new Size(1, 1);
        RedDot.StartPosition = FormStartPosition.CenterScreen;
        RedDot.TopMost = true;
        RedDot.Shown += new EventHandler(RedDot_Shown);
        Application.Run(RedDot);
    }

    static void RedDot_Shown(object sender, EventArgs e)
    {
        RedDot.Size = new Size(1, 1);
    }
}
 
Share this answer
 
Comments
Khaniya 26-Jul-10 4:39am    
hi good
answer but still click able
You can take a form with following property

BackColor=Color.Red
ControlBox=false
FormBorderStyle=FixedToolWindows
MaximizeBox=false
MinimazeBox=false
size=1,1
StartPosition=CenterScreen
TopMost=True

and Load Same Form
If you face any issue tell me
I have done and checked practically
Thanks

:)
 
Share this answer
 
Comments
Toli Cuturicu 20-Jul-10 10:32am    
Reason for my vote of 1
does not work as expected
Khaniya 21-Jul-10 1:38am    
Toli Cuturicu
What is the issue with above information?
can you tell me please?
Thanks
Toli Cuturicu 26-Jul-10 13:52pm    
You did not try your code. It simply does not produce a red dot.
Don't lie anymore.
Khaniya 27-Jul-10 2:47am    
Toli I have not provided entire code. I just want to show that this can be solve on this way. It was just basic information.
It is good to give answer with code but it is necessary to provide entire code as you did.
And most important thing that hurt me "I am not lire"

I am really very sorry if I hurts you anyway.

Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900