专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅
HWNDhwnd; while((hwnd=::FindWindow(\"IEFrame\",NULL))!=NULL) ...{ //::SendMessage(hwnd,WM_CLOSE,0,0); ::PostMessage(NULL,WM_CLOSE,0,0); } 用到3个api,第一是findwindow HWNDFindWindow LPCTSTRlpClassName, LPCTSTRlpWindowName ); 第一个参数就是CreateWindow时的参数,比如记事本的ClassName是notepad,ie的classname是 [阅读全文] [PDF]
现在主流的控件模板和样式是引用XAML资源,不过感觉没有C#代码实现那么灵活,现介绍一下代码实现ControlTemplate的方法: 以下是引用片段: //控件呈现的显示内容1(这里为Image) FrameworkElementFactoryfe=newFrameworkElementFactory(typeof(Image),\"Image\"); BitmapImagebi=newBitmapImage(); bi.BeginInit(); bi.UriSource=newUri(@\"E:ChartControlHanYangChartContr [阅读全文] [PDF]
     实际需要实现在C#中使窗体显示SplitContainer或Panel中下面是实现代码: private void menuStepAdd_Click(object sender, EventArgs e)        {          & [阅读全文] [PDF]
C#绘制圆角窗体代码如下: public   void   SetWindowRegion       {       .Drawing.Drawing2D.GraphicsPath   FormPath;       FormPath   =     .Drawing.Drawing2D.GraphicsPat [阅读全文] [PDF]
现在主流的控件模板和样式是引用XAML资源,不过感觉没有c#代码实现那么灵活,现介绍一下代码实现 ControlTemplate的方法: 参考:[http://www.crazycoder.cn/] 以下是引用片段://控件呈现的显示内容1(这里为Image) FrameworkElementFactoryfe=newFrameworkElementFactory(typeof(Image),"Image"); BitmapImagebi=newBitmapImage(); bi.BeginInit(); bi.UriSource=newUri(@ [阅读全文] [PDF]
其实Anchor和Dock属性也可以实现,但好象只对容器效果理想,而且字体大小也没有变化.最近论坛上有好多这样的贴子,具体实现代码如下: private void setTag(Control cons) { foreach (Control con in cons.Controls) { con.Tag = con.Width +":" + con.Height + ":" + con.Lef [阅读全文] [PDF]
JavsScript 实现 StringBuilder 类, 增强字符串连接的性能. function StringBuilder() { this.__strings__ = new Array(); } StringBuilder.prototype.append = function (_string) { this.__strings__.push(_string); } StringBuilder.prototype.toString = function() { return this.__strings__.join("" [阅读全文] [PDF]
1 共7条 分1页