摘要: 操作系统: win95 编程工具: vb6.0 问题: 请教 SendMessage() API 函数如何使用? 回答: 以下内容节选自我的书《Visual Basic编程晋级:ActiveX控件》: 要发送消息,我们就需要使用API函数SendMessage。这个函数的定义如下: Declare Function SendMessage Lib "user32" _ Alias "SendMessageA" (ByVal hwnd As Long, _ ByVal wMsg As Long, ByVal wParam As ... 阅读全文
posted @ 2012-11-07 21:06 斗天! 阅读(462) 评论(0) 推荐(0) 编辑
摘要: Delphi中取得和设置硬盘上文件的创建日期、修改日期、访问日期、文件属性function FileAge(const FileName: string): Integer; $[SysUtils.pas 功能 返回文件创建的时间 说明 文件不存在则返回-1 参考 function Windows.FindFirstFile 例子 ///////Begin FileAge,DateTimeToStr,FileDateToDateTime procedure TForm1.Button1Click(Sender: TObject); begin SpinEdit1.Value := FileAg 阅读全文
posted @ 2012-10-29 21:34 斗天! 阅读(855) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Windows.Forms;class form_move{ Form f1; bool beginMove = false; int currentXPosition = 0; int currentYPosition = 0; public form_move(Form f) { f1 = f; f.MouseDown += new MouseEventHandler(f_MouseDown); f.MouseMove += new MouseEventHandler(f_MouseMove); f.MouseUp += new Mous 阅读全文
posted @ 2012-10-28 14:40 斗天! 阅读(153) 评论(0) 推荐(0) 编辑
摘要: void pai(out DataSet dt, DataSet dd, out bool chk, bool ch) { chk = ch; dt = dd; DataTable dt1 = dd.Tables[0].Clone(); for (int j = 0; j < dd.Tables[0].Rows.Count; j++) { DataRow dr=dt1.NewRow();//复制表dt1的行结构 for (int i = 0; i < dd.Tables[0].Columns.Count; i++) { if (chk) { dr[i] = dd.Tables[0] 阅读全文
posted @ 2012-10-28 14:37 斗天! 阅读(581) 评论(0) 推荐(0) 编辑
摘要: using System.Data;using System.Data.SqlClient;class connect{ public string cmdstr { get; set; } public string soure { get; set; } public connect(string strcmd,string database,out int i,params string[] arry) { cmdstr = strcmd; soure = "server=(local);database="+database+";trusted_conne 阅读全文
posted @ 2012-10-25 02:19 斗天! 阅读(143) 评论(0) 推荐(0) 编辑
摘要: using System;class Order{ public Order(string a,params double[] arry) { if (a == "正序") { for (int i = 0; i < arry.Length - 1; i++) { for (int j = 0; j < arry.Length - i - 1; j++) { if (arry[j] > arry[j + 1]) { double b; b = arry[j]; arry[j] = arry[j + 1]; arry[j + 1] =b; } } } } e 阅读全文
posted @ 2012-10-25 02:16 斗天! 阅读(152) 评论(0) 推荐(0) 编辑
摘要: function geticon(path:string):Integer;vari:Integer;extion:string;strlist:TStrings;begin i:=path.LastIndexOf('.'); extion:=path.Substring(i); extion:=extion.ToLower; strlist:=TStringList.Create; strlist.Add('.txt'); strlist.Add('.zip'); strlist.Add('.rar'); strlist.Add 阅读全文
posted @ 2012-10-25 02:09 斗天! 阅读(534) 评论(0) 推荐(0) 编辑
摘要: 正确的方法是 1. 进入 C:\Program Files\Borland 2. 鼠标放到 delphi7目录上面 3. 右键菜单----属性----安全----点Users----编辑----点Users----所有能勾的权限勾上 4. 点 应用 5. 点 确定 打开delphi7或者要打开Project1.dpr均必须用鼠标右键菜单中的"以管理员身份运行"转自:<a href='http://sws.yuloo.com/'>国际商务师考试网</a> 阅读全文
posted @ 2012-10-25 02:06 斗天! 阅读(267) 评论(0) 推荐(0) 编辑
摘要: protected void ImageButton1_Click(object sender, ImageClickEventArgs e)//搜索 { Panel1.Visible = false; DateTime t = DateTime.Now; double d = 0; int n=0; string[] ss = new string[] {"oname","tel","address","pay","omoney","number","otime& 阅读全文
posted @ 2012-10-11 21:52 斗天! 阅读(186) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections;using System.Configuration;using System.Data;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Data.SqlClient;using SqlConnect;pub 阅读全文
posted @ 2012-10-11 21:48 斗天! 阅读(398) 评论(0) 推荐(0) 编辑