上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 33 下一页
  2010年3月29日
摘要: 基本介绍:showModalDialog() (IE 4+ 支持)showModelessDialog() (IE 5+ 支持)window.showModalDialog()方法用来创建一个显示HTML内容的模态对话框。window.showModelessDialog()方法用来创建一个显示HTML内容的非模态对话框。使用方法:vReturnValue = window.showModalDi... 阅读全文
posted @ 2010-03-29 18:29 一路前行 阅读(457) 评论(0) 推荐(0) 编辑
摘要: 自己的第一个DX程序,开始学习的第一步#include<d3d9.h>LPDIRECT3D9 g_pD3D ;LPDIRECT3DDEVICE9 g_pd3dDevice ;HRESULT InitD3D(HWND hWnd){ if(NULL == (g_pD3D = Direct3DCreate9(D3D_SDK_VERSION))) { return E_FAIL; } D3DP... 阅读全文
posted @ 2010-03-29 18:24 一路前行 阅读(600) 评论(0) 推荐(0) 编辑
摘要: 下面是在重载了MFC中的线程操作类,这样的操作是线程安全的#include <afxwin.h>#include <iostream.h>class CUserThread : public CWinThread{public: CUserThread(AFX_THREADPROC ThreadProc); static UINT ThreadFunc(LPVOID lpa... 阅读全文
posted @ 2010-03-29 18:22 一路前行 阅读(319) 评论(0) 推荐(0) 编辑
摘要: /* 文件名:lib.h */#ifndef LIB_H#define LIB_Hextern "C" int __declspec(dllexport) add(int x, int y);#endif/* 文件名:lib.cpp */#include "lib.h"int add(int x, int y){return x + y;} 阅读全文
posted @ 2010-03-29 18:21 一路前行 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 在.Net Framework SDK文档中,关于调用Windows API的指示比较零散,并且其中稍全面一点的是针对Visual Basic .net讲述的。本文将C#中调用API的要点汇集如下,希望给未在C#中使用过API的朋友一点帮助。另外如果安装了Visual Studio .net的话,在C:\Program Files\Microsoft Visual Studio .NET\Fram... 阅读全文
posted @ 2010-03-29 18:20 一路前行 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 二部分组成,一个线程管理类ThreadManager,一个线程类MyThreadTest类是用来测试的 1.ThreadManager.cs using System;using System.Threading;using System.Collections;namespace CustomThreadPool{/// <summary>/// 线程管理器,会开启或唤醒一个线程去执... 阅读全文
posted @ 2010-03-29 18:20 一路前行 阅读(693) 评论(0) 推荐(0) 编辑
摘要: WM_NULL 0 0 WM_CREATE 1 1 应用程序创建一个窗口WM_DESTROY? 2 2 一个窗口被销毁WM_MOVE 3 3 移动一个窗口WM_SIZE 5 5 改变一个窗口的大小WM_ACTIVATE 6 6 一个窗口被激活或失去激活状态WM_SETFOCUS 7 7 获得焦点后WM_KILLFOCUS 8 8 失去焦点WM_ENABLE A 10 改变enable状态WM_SE... 阅读全文
posted @ 2010-03-29 18:19 一路前行 阅读(696) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Runtime.InteropServices;names... 阅读全文
posted @ 2010-03-29 18:18 一路前行 阅读(309) 评论(0) 推荐(0) 编辑
摘要: using System;namespace MyCollections { using System.Collections; public delegate void ChangedEventHandler(object sender, EventArgs e); public class ListWithChangedEvent: ArrayList { public event Chan... 阅读全文
posted @ 2010-03-29 18:18 一路前行 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 1.如何创建一个可改变大小没有标题栏的窗体?(Howtocreateaformwithresizingbordersandnotitlebar?)form1.Text=string.Empty;form1.ControlBox=false;2.如何在.NET的Windows窗体上启用XP主题集?(HowtouseXPThemeswithWindowsFormsusingthe.NET?)确认你的控... 阅读全文
posted @ 2010-03-29 18:17 一路前行 阅读(378) 评论(0) 推荐(0) 编辑
摘要: Api函数是构筑Windws应用程序的基石,每一种Windows应用程序开发工具,它提供的底层函数都间接或直接地调用了Windows API函数,同时为了实现功能扩展,一般也都提供了调用WindowsAPI函数的接口, 也就是说具备调用动态连接库的能力。Visual C#和其它开发工具一样也能够调用动态链接库的API函数。.NET框架本身提供了这样一种服务,允许受管辖的代码调用动态链接库中实现的非... 阅读全文
posted @ 2010-03-29 18:16 一路前行 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 1.启动子进程,不等待子进程结束private void simpleRun_Click(object sender, System.EventArgs e){ System.Diagnostics.Process.Start(@"C:/listfiles.bat");}2.启动子进程,等待子进程结束,并获得输出private void runSyncAndGetResults_Click(ob... 阅读全文
posted @ 2010-03-29 18:16 一路前行 阅读(891) 评论(0) 推荐(0) 编辑
摘要: XPButton.cs代码 using System; using System.Windows; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows .Forms ; namespace XPCtrl { /// <summary> /// XPButton 的摘要说明。 /// <... 阅读全文
posted @ 2010-03-29 18:15 一路前行 阅读(330) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Xml; using System.Text; using System.Net; using System.IO; using System.Collections; using System.Text.RegularExpressions; public class App { public static void Main() { str... 阅读全文
posted @ 2010-03-29 18:14 一路前行 阅读(429) 评论(0) 推荐(0) 编辑
摘要: "^\d+$"  //非负整数(正整数 + 0) "^[0-9]*[1-9][0-9]*$"  //正整数"^((-\d+)|(0+))$"  //非正整数(负整数 + 0)"^-[0-9]*[1-9][0-9]*$"  //负整数"^-?\d+$"    //整数"^\d+(\.\d+)?$"  //非负浮点数(正浮点数 + 0)"^(([0-9]+\.[0-9]*[1-9][0-9]*)|([... 阅读全文
posted @ 2010-03-29 18:13 一路前行 阅读(148) 评论(0) 推荐(0) 编辑
摘要: //--需要引用usingSystem.Net以及usingSystem.IO;privatestringGetContentFromUrll(string_requestUrl){string_StrResponse="";HttpWebRequest_WebRequest=(HttpWebRequest)WebRequest.Create(_requestUrl);_WebRequest.Me... 阅读全文
posted @ 2010-03-29 18:13 一路前行 阅读(317) 评论(0) 推荐(0) 编辑
摘要: test.cs 信息using System;using System.Collections.Generic;using System.Text;namespace testclass{ public class Class1 { public string GetName1() { return "Get the name!"; } public string GetName2(string ... 阅读全文
posted @ 2010-03-29 18:12 一路前行 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 下面是我根据网络上的应用程序改编的一个简单的托盘程序的DEMO,实现了一般托盘程序的基本功能using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Fo... 阅读全文
posted @ 2010-03-29 18:09 一路前行 阅读(878) 评论(0) 推荐(0) 编辑
摘要: 加载DLL Assembly controlAssembly = Assembly.LoadFrom(DLLName); 获取加载对象的类型Type controlType = controlAssembly.GetType(ClassName); 加类型对象强制转换 _isoAdapter = (IRFIDISO180006BControlAdapter)Activator.CreateInst... 阅读全文
posted @ 2010-03-29 18:09 一路前行 阅读(338) 评论(0) 推荐(0) 编辑
摘要: (一)写入 1.建立文件 建立一个注册表格式文件: *.reg,内容如下: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Test] "server"="192.168.66.22" "database"="NorthWind" "user"="XiaoWang" "Password"="123456" 其中: ... 阅读全文
posted @ 2010-03-29 18:08 一路前行 阅读(256) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 33 下一页