随笔分类 - C# -vs2012 WinForm编程
C# -Visual Studio 2012 WinForm编程 从入门到精通
摘要:屏幕绘图的原理是,启动一个全屏窗体,将当前屏幕的截图作为背景图片,在窗体上进行绘制。选择要绘制的屏幕:[code lang="csharp"]Screen screen = Screen.PrimaryScreen;[/code]全屏窗体要启动全屏窗口,设置窗体如下属性:[code lang="csharp"]this.FormBorderStyle = FormBorderStyle.None;//无边框 this.ShowInTaskbar = false; this.TopMost = true;//保持在最前面 this.Bounds = scr
阅读全文
摘要:通过Button打开一个对话框,选择一个文件,在TextBox中显示文件的绝对路径private void btnOpen_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); if (ofd.ShowDialog() == DialogResult.OK) { txtPath.Text = ofd.FileName; } }窗体中通过代码添加按钮的背景颜色pu...
阅读全文

浙公网安备 33010602011771号