我想用C#在电脑屏幕上划个瞄准器出来

tianyi89123 2009-12-13 09:40:29
我最近在玩CF,所以想用程序划个瞄准器出来!说白乐就是在屏幕上画个十字。。。玩狙方便点。。但是小弟还是个初学者还不知道怎么画。。。请大哥们指点下。。。
...全文
636 19 打赏 收藏 转发到动态 举报
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
allinvip 2010-04-13
  • 打赏
  • 举报
回复
[Quote=引用 13 楼 zl194 的回复:]
不要破坏屏幕,买个眼镜,在上面画个X.
[/Quote]
这也是个强人!!
zl194 2009-12-15
  • 打赏
  • 举报
回复
不要破坏屏幕,买个眼镜,在上面画个X.
Deathsign 2009-12-15
  • 打赏
  • 举报
回复
CF底层是 DX
你要在游戏里面画出来 只有HOOK DX函数 自己绘制一个出来,没有其他办法
kolosi 2009-12-15
  • 打赏
  • 举报
回复
透过窗体虽然能做,但是个人认为还是用水彩笔自己画一个好些。。。
only_lonely 2009-12-15
  • 打赏
  • 举报
回复
玩过外挂的路过~据说要不断的刷新~才能显示出来~~~~
ali4130000 2009-12-15
  • 打赏
  • 举报
回复
我记得有个软件是搞这个的,大众软件介绍过
jin20000 2009-12-15
  • 打赏
  • 举报
回复
[Quote=引用 16 楼 alifriend 的回复:]
哈哈哈哈哈哈哈哈,我突然想起我一个大学室友,以前打CS,用纸在屏幕中间贴了个准星练盲狙
[/Quote]
^_^逝去的青春
波导终结者 2009-12-15
  • 打赏
  • 举报
回复
哈哈哈哈哈哈哈哈,我突然想起我一个大学室友,以前打CS,用纸在屏幕中间贴了个准星练盲狙
tianyi89123 2009-12-15
  • 打赏
  • 举报
回复
希望大哥们告诉我怎么将方块改成十字型就好乐。。。
tianyi89123 2009-12-15
  • 打赏
  • 举报
回复
我用乐个狠笨的方法画出了个小方块(但是我想要的是十字型的)。。。这是我在网上东逛逛西逛逛。。。逛出来的一点点。。。希望大哥们给点意见。。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication6
{
public partial class from : Form
{
int i = 0;
public from()
{
InitializeComponent();
}
public void show()
{
int height = (System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height)/2;
int width = (System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width)/2;
ControlPaint.DrawReversibleFrame(new Rectangle(width, height, 5, 5), Color.FromArgb(0, 255, 255), FrameStyle.Thick);

}

private void button1_Click(object sender, EventArgs e)
{
i++;
if (i % 2 != 0)
{
timer1.Enabled = true;
btn.Text = "关 闭";
}
else
{
timer1.Enabled = false;
btn.Text = "开 始";
}



}

private void timer1_Tick(object sender, EventArgs e)
{
show();
}

private void from_Load(object sender, EventArgs e)
{
timer1.Enabled = false;
}
}
}
cymandhxl 2009-12-14
  • 打赏
  • 举报
回复
ding
cntnts 2009-12-14
  • 打赏
  • 举报
回复
楼上的楼上真是有材,其实CS中狙是用了准星也不准的,他的打法应该是点甩——就是鼠标点击下的那一个时间段,准星扫过的地区人都是中枪的,而不是一个点
hotit 2009-12-14
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 houyizhinv 的回复:]
我草 和我以前想法一样 但是我解决的没有你那么麻烦
我是直接用钢笔在屏幕上画的!
[/Quote]


真强
houyizhinv 2009-12-14
  • 打赏
  • 举报
回复
我草 和我以前想法一样 但是我解决的没有你那么麻烦
我是直接用钢笔在屏幕上画的!
amoeet 2009-12-14
  • 打赏
  • 举报
回复

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace 准心
{
public partial class Form1 : Form
{
bool mousemove = true;
private Point mouseOffset;
Color col = Color.FromArgb(0, 255, 255, 255);

   
private bool isMouseDown = false;

[DllImport("user32.dll", EntryPoint = "SetWindowPos")]
public static extern int SetWindowPos(
IntPtr hwnd,
int hWndInsertAfter,
int x,
int y,
int cx,
int cy,
int wFlags
);
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
pictureBox1.BackColor = col;
pictureBox1.BackgroundImage = imageList1.Images[0];
SetWindowPos(this.Handle, -1, Screen.PrimaryScreen.Bounds.Width / 2, Screen.PrimaryScreen.Bounds.Height / 2, this.Width, this.Height, 0);
}

private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
{
int xOffset;
int yOffset;

if (e.Button == MouseButtons.Left)
{
xOffset =-e.X ;

yOffset = -e.Y -

SystemInformation.FrameBorderSize.Height;


mouseOffset = new Point(xOffset, yOffset);

isMouseDown = true;
}
}

private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
if (isMouseDown)
{
Point mousePos = Control.MousePosition;
mousePos.Offset(mouseOffset.X, mouseOffset.Y);
if (mousemove )
Location = mousePos;

}

}

private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isMouseDown = false;
}

}

private void 移动ToolStripMenuItem_Click(object sender, EventArgs e)
{
mousemove = true;
锁定ToolStripMenuItem.Visible = true;
移动ToolStripMenuItem.Visible = false;
}

private void 锁定ToolStripMenuItem_Click(object sender, EventArgs e)
{
mousemove = false;
锁定ToolStripMenuItem.Visible = false;
移动ToolStripMenuItem.Visible = true ;
}

private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}

}
}


我做好的:试试?
下载:
http://www.jsharer.com/blog/339525.htm
aimeast 2009-12-14
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 dylike 的回复:]
你可以反编译DYLIKE准星.可得到全部源码.
[/Quote]
想说这样不行吧。
lz是想画个准心同时也不影响玩游戏。

屏幕内容是不停变化的,肯定不能直接用gdi画图。

只有窗体穿透才是最佳选择了。
dylike 2009-12-13
  • 打赏
  • 举报
回复
你可以反编译DYLIKE准星.可得到全部源码.
aimeast 2009-12-13
  • 打赏
  • 举报
回复
要是你玩游戏的时候这样做,貌似只能用窗体穿透了。
要不然还可以使用不规则窗体。但是有影响。
haiming15820 2009-12-13
  • 打赏
  • 举报
回复
帮顶下

111,120

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧