上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页

2010年12月23日

摘要: //加边框 try { Bitmap Backbmp = new Bitmap(@"" + Path); float w = (float)(Backbmp.Width * 0.2); using (Graphics g = Graphics.FromImage(Backbmp)) { using (Brush brush = new SolidBrush(Color.FromArgb(0, 156, 255))) { using (Pen pen = new Pen(brush, w)) { pen.DashStyle = DashStyle.Custom; g.Draw 阅读全文

posted @ 2010-12-23 15:24 严武 阅读(556) 评论(0) 推荐(0) 编辑

摘要: // 该调用是 Windows.Forms 窗体设计器所必需的。 InitializeComponent(); // TODO: 在 InitComponent 调用后添加任何初始化 this.SetStyle(ControlStyles.AllPaintingInWmPaint,true); //开启双缓冲this.SetStyle(ControlStyles.DoubleBuffer,true); this.SetStyle(ControlStyles.UserPaint,true); this.SetStyle(ControlStyles.ResizeRedraw,true... 阅读全文

posted @ 2010-12-23 13:19 严武 阅读(2684) 评论(0) 推荐(0) 编辑

摘要: #region 圆角界面 public void SetWindowRegion() { System.Drawing.Drawing2D.GraphicsPath FormPath; FormPath = new System.Drawing.Drawing2D.GraphicsPath(); Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);//this.Left-10,this.Top-10,this.Width-10,this.Height-10); FormPath = GetRoundedRectPath(r 阅读全文

posted @ 2010-12-23 12:38 严武 阅读(528) 评论(0) 推荐(0) 编辑

摘要: 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 test{ public partial class Form3 : Form { public Form3() { InitializeComponen 阅读全文

posted @ 2010-12-23 12:33 严武 阅读(3064) 评论(1) 推荐(0) 编辑


2010年12月22日

摘要: (1)NULLnull 关键字是表示不引用任何对象的空引用的文字值。null 是引用类型变量的默认值。那么也只有引用型的变量可以为NULL,如果int i=null,的话,是不可以的,因为Int是值类型的。(2)""和String.Empty 这两个都是表示空字符串。只不过""理论上重新开辟内存空间,而String.Empty指向一处。不过优化器会优化的! string.Empty不分配存储空间, ""分配一个长度为空的存储空间,所以一般用string.Empty,为了以后跨平台,还是用string.empty。在C# 中,大多数情况 阅读全文

posted @ 2010-12-22 11:29 严武 阅读(15821) 评论(0) 推荐(2) 编辑

摘要: http://www.zsqn.com/Msg/ViewMsg.aspx?id=18571http://hi.baidu.com/bleat312/blog/item/0b482b29fbd75ff699250ae7.html 阅读全文

posted @ 2010-12-22 11:21 严武 阅读(114) 评论(0) 推荐(0) 编辑

摘要: 一、用TCriticalSection类来阻塞。(ps:这里的咚咚都涉及Win32编程,我对这些不了解,先掌握如何运用吧。)这个有点类似临界区。要Uses SyncObjs单元。1、声明一个全局的TCriticalSection类的实例。2、建立TCriticalSection.Create,最好是在程序onCreate里面,这样才能保证对所有线程进行控制。3、在全局变量访问前用TCriticalSection.Acquire或TCriticalSection.Enter来阻塞。4、访问完毕,用TCriticalSection.Release或TCriticalSection.Leave来解除 阅读全文

posted @ 2010-12-22 11:15 严武 阅读(2310) 评论(0) 推荐(1) 编辑

摘要: 三层架构指的是界面,业务逻辑和数据存储分离,不是指物理上是否分离。 这样做的好处是层次分明,维护好做,系统资源也好分布式处理。 数据库层哪就不说了,用MSSQL、Orcale随你了,就是数据服务层 业务逻辑的话要分析清楚,就是中间层 界面,也叫客户端。这里就是得到数据和显示数据的部分了,不做其它处理。但是数据有效性分析最好放在界面层,以充分利用客户端的性能。不然的话业务逻辑层的负担太大也会形成瓶劲。 数据库的建立不说了。 三层体系的建立 一 数据库层的建立 使用sqlserver或orale建立数据库。 二 中间层的建立 ... 阅读全文

posted @ 2010-12-22 11:13 严武 阅读(367) 评论(0) 推荐(0) 编辑

摘要: 1. MOUSEHOOKSTRUCT 鼠标钩子结构体 当WH_MOUSE钩子处理的鼠标事件时,该结构包含鼠标信息。 typedef struct { POINT pt; HWND hwnd; UINT wHitTestCode; ULONG_PTR dwExtraInfo; } MOUSEHOOKSTRUCT, *PMOUSEHOOKSTRUCT; 参数: pt : POINT结构对象,保存鼠标在屏幕上的x,y坐标 hwnd: 接收到鼠标消息的窗口的句柄 wHitTestCode: hit-test值,详细描述参见WM_NCHITTEST消息 dwEx... 阅读全文

posted @ 2010-12-22 10:58 严武 阅读(841) 评论(0) 推荐(0) 编辑


2010年12月10日

摘要: /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { System.Diagnostics.Process[] ps = System.Diagnostics.Process.GetProcessesByName(System.Diagnostics.Process.GetCurrentProcess().ProcessName); if (ps.Length <= 1) ... 阅读全文

posted @ 2010-12-10 22:12 严武 阅读(296) 评论(0) 推荐(0) 编辑


上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页

Copyright © 2024 严武
Powered by .NET 8.0 on Kubernetes