• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
wjshan0808

Learn from yesterday, Live for today, For a better tomorrow.
 ————wjshan0808

博客园    首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  C#

上一页 1 2 3 4 5 6 下一页
改变图片的对比度

摘要:private void button1_Click(object sender, EventArgs e) { UpdatePicBoxEventHandle UpdatePicBox = new UpdatePicBoxEventHandle(... 阅读全文
posted @ 2015-01-21 15:58 wjshan0808 阅读(241) 评论(0) 推荐(0)
设置/取消桌面背景

摘要:private void Set_Click(object sender, EventArgs e) { //设置壁纸 SystemParametersInfo(SystemParametersInfoAction.SPI_SETDESKW... 阅读全文
posted @ 2015-01-21 11:16 wjshan0808 阅读(517) 评论(0) 推荐(0)
放大镜

摘要:using (Graphics g = pictureBox1.CreateGraphics()) {//画板 Rectangle sourceRec = new Rectangle(e.X - 10, e.Y - 10, 10, ... 阅读全文
posted @ 2015-01-20 16:44 wjshan0808 阅读(118) 评论(0) 推荐(0)
网线帘幕动画

摘要:/* * 黄 * 蓝 红 * 绿 */ private void btnStart_Click(object sender, EventArgs e) { ... 阅读全文
posted @ 2015-01-20 16:21 wjshan0808 阅读(261) 评论(0) 推荐(0)
图片缩放/旋转/平移/设置分辨率

摘要:#region 设置分辨率 using (Graphics g = pictureBox2.CreateGraphics()) { g.Clear(pictureBox2.BackColor);//清空 ... 阅读全文
posted @ 2015-01-20 15:12 wjshan0808 阅读(571) 评论(0) 推荐(0)
贝塞尔样条

摘要:/*贝塞尔样条是由四个点指定的曲线:两个端点(p1 和 p2)和两个控制点(c1 和 c2)。曲线开始于 p1,结束于 p2。 * 该曲线不经过控制点,但是控制点的作用像磁铁一样,在某些方向上拉拽曲线并影响曲线弯曲的方式。 该曲线始于 p1 并向控制点... 阅读全文
posted @ 2015-01-20 15:01 wjshan0808 阅读(316) 评论(0) 推荐(0)
线性梯度画刷

摘要:using (Graphics graphics = this.CreateGraphics()) {// graphics.Clear(Color.White); Pen pen = new Pen(Color.Red, 2); ... 阅读全文
posted @ 2015-01-20 14:25 wjshan0808 阅读(135) 评论(0) 推荐(0)
画七彩五角星

摘要:using (Graphics graphics = this.CreateGraphics()) { graphics.Clear(Color.White); Point[] points = {//顺时针点坐标... 阅读全文
posted @ 2015-01-20 14:21 wjshan0808 阅读(1867) 评论(0) 推荐(0)
画花纹图案

摘要:using (Graphics g = this.CreateGraphics()) {//画板 g.FillRectangle(Brushes.White, this.ClientRectangle);//画板颜色 ... 阅读全文
posted @ 2015-01-20 13:27 wjshan0808 阅读(149) 评论(0) 推荐(0)
画箭头

摘要:using (Pen mypen = new Pen(Color.Black, 6)) { mypen.StartCap = LineCap.DiamondAnchor;//设置起始箭头 mypen.EndCap = ... 阅读全文
posted @ 2015-01-20 13:19 wjshan0808 阅读(121) 评论(0) 推荐(0)
图片填充线条

摘要:Bitmap bitmap = new Bitmap("1.jpg"); TextureBrush b = new TextureBrush(bitmap);//指定纹理图片 Pen p = new Pen(b, 30);//创建画笔 ... 阅读全文
posted @ 2015-01-20 13:14 wjshan0808 阅读(148) 评论(0) 推荐(0)
创建快捷方式

摘要:WshShell shell = new WshShell();//建立对象 //生成快捷方式文件,指定路径及文件名 IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut( Environme... 阅读全文
posted @ 2015-01-20 10:56 wjshan0808 阅读(200) 评论(0) 推荐(0)
接收按键消息

摘要:public const int WM_KEYDOWN = 0x0100;//按键消息 public const int WM_SYSKEYDOWN = 0x0104;//快捷键或系统命令键的消息 protected override bool ProcessCmdKe... 阅读全文
posted @ 2015-01-20 10:38 wjshan0808 阅读(126) 评论(0) 推荐(0)
获取剪贴板中的数据

摘要:/// /// Adds the specified window to the chain of clipboard viewers. Clipboard viewer windows receive a WM_DRAWCLIPBOARD message whenever the... 阅读全文
posted @ 2015-01-20 09:46 wjshan0808 阅读(521) 评论(0) 推荐(0)
程序图标不在任务栏上显示

摘要:this.ShowInTaskbar = false; 阅读全文
posted @ 2015-01-19 17:22 wjshan0808 阅读(184) 评论(0) 推荐(0)
获取鼠标位置的颜色值

摘要:Color c = new Color();//创建颜色对象 Bitmap bitmap = new Bitmap(this.BackgroundImage);//创建BITMAP对象 int x = Cursor.Position.X;//鼠标x坐标 ... 阅读全文
posted @ 2015-01-19 17:17 wjshan0808 阅读(1154) 评论(0) 推荐(0)
接触/限制鼠标活动区域

摘要:this.Cursor = new Cursor(Cursor.Current.Handle); Cursor.Position = new Point(Cursor.Position.X,Cursor.Position.Y);//鼠标位置 Cursor.... 阅读全文
posted @ 2015-01-19 17:16 wjshan0808 阅读(307) 评论(0) 推荐(0)
鼠标左右键互换

摘要:/// /// Reverses or restores the meaning of the left and right mouse buttons. /// /// If this parameter is TRUE, the left button generates right-button messages and the righ... 阅读全文
posted @ 2015-01-19 15:48 wjshan0808 阅读(180) 评论(0) 推荐(0)
c# 隐藏 控制台应用程序

摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;using System.Runtime.InteropServices;namesp... 阅读全文
posted @ 2015-01-17 13:07 wjshan0808 阅读(516) 评论(0) 推荐(0)
Ping

摘要:const int SOCKET_ERROR = -1; const int ICMP_ECHO = 8; public string PingHost(string host) { IPHostEntry server... 阅读全文
posted @ 2015-01-15 16:50 wjshan0808 阅读(208) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3