自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(41)
  • 资源 (1)
  • 收藏
  • 关注

转载 delphi frame 重载onshow

type  Tframe1 = class(TFrame)     ...  private    { Private declarations }    procedure CMShowingChanged(var Message: TMessage); message CM_SHOWINGCHANGED;  ...procedure Tframe1.CMSh

2015-11-08 20:00:12 777

原创 CDS模糊过滤

with ClientDataSet1 do             //edit1.text  begin    Filtered  := false;    Filter :=  'orderno like ''%'+edit1.text + '%''' ;     Filtered  := true;  end;

2015-11-05 23:00:48 462

原创 SQL生成按月的自动编号

CREATE PROCEDURE [dbo].[Select_NO](   @UserId char(12) )ASSET NOCOUNT ONdeclare @maxNOchar(6),@newNo int,@yearMonth char(6),@resultNo char(12)--取当前年月YYYYMM select @year

2015-07-09 16:44:49 1483

转载 cxgrid全选

procedure TWebOrder.SelectAll;var  iSelected: Integer;begin  iSelected := 0;  if DataSet.RecordCount = 0 then    Exit;  try    DataSet.DisableControls;    DataSet.First;    case Da

2015-06-12 12:57:32 846

转载 delphi身份证验证

uses DateUtils;const  IntMultiplication: Array[1..17] Of Integer=(7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2);//函数名:IsRightID//参数:sID,身份证号码 (输入)//返回值:sID是标准身份证号,返回OK,否则返回相应信息function IsRi

2015-06-04 13:44:31 697

转载 excel导入导出操作comobj;

procedure TForm1.N1Click(Sender: TObject);var  ExcelApp:Variant;  expath,str:String;  ExCountRow,ExCountCol,i,j:integer;begin  if dlgOpen1.Execute then  begin    expath:=dlgOpen1.FileN

2014-10-08 16:26:28 697

转载 复制表A到表B

select * into jhdnr from JsInfo.dbo.jhdnr

2014-07-26 08:59:34 460

翻译 SQL A表数据更新到B表

update A set A.orgid=B.organization from SH_STOCK_product_out_stock A, JsInfo.dbo.shsp_out_stock B where A.autonum=B.autonumupdate A set A.orgname= B.name from SH_STOCK_product_in_stoc

2014-07-24 16:47:17 1839

转载 Delphi ListView基本用法大全

Delphi ListView基本用法大全//增加项或列(字段)ListView1.Clear;ListView1.Columns.Clear;ListView1.Columns.Add;ListView1.Columns.Add;ListView1.Columns.Add;ListView1.Columns.Items[0].Caption:='id';

2014-06-26 16:58:18 578

转载 Cxgrid根据列条件改变行颜色

procedure TFrm_ListBaseForm4InStock.cxGridListCustomDrawCell(  Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;  AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);var  i : Intege

2014-06-05 11:10:53 1298

原创 SQL 本地数据库数据插入到服务器数据库

insert into opendatasource('sqloledb','server=192.168.168.168;uid=xz;pwd=xz;database=erp').erp.dbo.autoface_second (    autonum,symbol,employee_id,last_employee_id,version,state,  checked,start_da

2014-05-13 14:54:37 564

原创 TCXDBImage属性设置

DataBindingproperties->graphicClass->JPG

2014-04-30 09:21:25 534

原创 遍历窗体中的组件checkbox

var  i: Integer;begin  for i := 0 to Self.ComponentCount - 1 do  begin    if Self.Components[i] is TCheckBox then    begin      TCheckBox(Self.Components[i]).Checked := False;    end;

2014-04-22 11:39:24 1134

转载 delphi身份证验证

function ValidatePID(const APID: string): string;  {内部函数,取身份证号校验位,最后一位,对18位有效}  function GetVerifyBit(sIdentityNum: string): Char;  var    nNum: Integer;  begin    Result := #0;    nNum

2014-04-15 10:57:19 1970

原创 advstringgrid排序

advsg.SortSettings.Column := 1;//可在属性中设置    advsg.SortSettings.Show := True;//可在属性中设置    advsg.SortSettings.Direction := sdDescending; //sdAscending    advsg.QSort;

2014-03-29 10:03:41 1279

原创 格式化成财务类型数字

Format('%12.2n',[1234563327.226]) = 1,234,563,327.23

2014-03-10 11:45:51 914

转载 delphi添加{$R WindowsXP},控件具有系统主题风格

delphi添加{$R WindowsXP},控件具有系统主题风格

2014-02-08 16:10:45 820

原创 delphi随机数生成

Randomize;  ShowMessage(IntToStr(Random(100)));

2013-12-28 10:43:24 1494

原创 delphi中sql语句like

'select ''全部'' as 所属公司, ''111'' as 机构号 union all select organization_name as 所属公司, symbol as 机构号 from organization  where '''+userinfo.PersonOrgGroup+''' like ''%'' +symbol+ ''%'' '

2013-12-06 10:49:06 754

转载 发布delphi程序(build with runtime package)要带哪些文件?

使用包,你可以使用如下方法设置:项目选项(菜单project-options-Packages页),在Runtimes packages中勾选Build with runtime packages。这样你就能够使用包来编译了。但不是这里所有的包都是你需要,这里包含了Delphi中安装的所有的包。如果环境改变了,可能你的程序就执行不了,那么你可以在这里调整你所包含的包。在IDE中运行程序,打

2013-11-07 16:08:06 522

转载 delphi程序全局快捷键

private    { Private declarations }    HotKeyId1:   Integer;    procedure HotKeyDown(var Msg: Tmessage); message WM_HOTKEY;procedure TForm1.FormCreate(Sender: TObject);begin  HotKeyId1

2013-10-29 16:24:45 1090

原创 js设置<select>中的默认值

var sel=document.getElementById("symbol");for(var i=0;iif(sel.options[i].value==) {  sel.selectedIndex=i;  break; }}

2013-10-24 10:36:06 2606

原创 JAVA判断session是否连接

String pid = "";try{   if(request.getSession(false)==null){   response.sendRedirect("./../error_session.jsp");    }      pid  = (String)session.getAttribute("personid"); if(pid == null){

2013-10-23 11:55:43 1454

原创 dxBarManager中添加edit、combobox、lookupcombobox的设置

TcxComboBoxProperties(cxbrdtm1.Properties).Items.Add('ddddd');设置dxBarManager属性alwaysSaveText为ture,可解决每次输入edit推动焦点时自动为空的问题

2013-10-16 15:14:38 1612

转载 MMC不能打开文件SQL Server企业管理器问题解决方法

平时使用正常的SQL Server企业管理器今天早上突然出现问题,错误如下:"MMC不能打开文件C:/Program Files/Microsoft SQL Server/80/Tools/Binn/SQL Server Enterprise Manager.MSC这可能是由于文件不存在,不是一个MMC 控制台,或者用后来版本的MMC 创建。也可能是由于您没有访问此文件的足够权限。

2013-10-10 09:09:01 592

转载 cxgrid合计小结

<br />1.你先放一个cxGrid,设置好View,设置View.DataController连接的DataSource <br />2.激活DataSource连接的DataSet,双击cxGrid,点击Retrieve   Fields,取得所有的Column <br />3.设置View的OptionsView.Footer=True,OptionsView.GroupFooters=gfVisibleWhenExpanded,这是为了把分组小计和总计面板显示出来 <br />4.将“订单号”字段

2010-12-23 15:56:00 3110

原创 stringgrid to file(TStringList)

procedure TForm1.Button1Click(Sender: TObject);var  I,J : Integer;  TempList : TStringList;  Temp : string;begin  TempList := TStringList.Create;  try  for I := 0 to advStringGrid1.RowCount -1 do  beg

2010-02-04 13:36:00 498

原创 TClipBoard剪贴板观察器响应系统消息

unit Unit1;interfaceuses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs, Clipbrd, StdCtrls, Buttons, ExtCtrls;type  TForm1 = class(TForm)    Panel1: TPanel;

2010-01-22 17:43:00 501

原创 TClipBoard剪贴板示例

//拷贝端unit Unit1;interfaceuses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs, StdCtrls, Clipbrd, ExtCtrls;type  TForm1 = class(TForm)    Button1: TButton;

2010-01-22 16:00:00 911

原创 返回用户没有操作键盘和鼠标事件的时间

function StopTime: integer; //返回用户没有操作键盘和鼠标事件的时间var  LInput: TLastInputInfo;begin  LInput.cbSize := SizeOf(TLastInputInfo);  GetLastInputInfo(LInput);  Result := (GetTickCount() - LInput.dwTime) div

2010-01-08 12:56:00 378

原创 MySQL大全

启动:net start mySql; 进入:mysql -u root -p/mysql -h localhost -u root -p databaseName; 列出数据库:show databases; 选择数据库:use databaseName; 列出表格:show tables; 显示表格列的属性:show columns from tableName;

2009-12-03 16:29:00 301

原创 delphi控制鼠标在程序界面范围内

 procedure TMainForm.LockMachine;var    r:TRect;begin    r:=rect(MainForm.Left,MainForm.Top,MainForm.Left+MainForm.Width,MainForm.Top+MainForm.Height);    clipCursor(@r);end;

2009-11-27 15:48:00 443

原创 delphi开机自动启动程序

 var       Reg: TRegistry;begin  Reg := TRegistry.Create;  try    Reg.RootKey := HKEY_CURRENT_USER;    if Reg.OpenKey(/Software/Microsoft/Windows/CurrentVersion/Run,   True)   then    begin      Reg

2009-11-27 15:44:00 440

原创 indy文件传输功能

//Server端 unit Unit1;interfaceuses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs, IdBaseComponent, IdComponent, IdTCPServer, StdCtrls;type  TForm1 = clas

2009-11-24 12:41:00 901

原创 oracle学习笔记(四)高级特性

 set serveroutput on;//可以输出,原来是关闭的,环境变量begin dbms_output.put_line(helloworld!);end;/变量声明规则1、 变量名不能使用保留字2、 第一个字符必须是字母 默认变量要以v_开头3、 变量名最多包含30个字符4、 不要与数据库的表或者列同名5、 第一行只能声明一个变量常用变量类型1、 binary_inte

2009-11-23 16:02:00 446

原创 oracle学习笔记(三)表的操作

 在oracle中可以用rename修改表名,但是些命令只限于oracle使用rename person to tperson;truncat table tperson;//截断表,直接删除所有的数据,且不能回滚create table person( pid   varchar2(18), name   varchar(200) UNIQUE not null,//非空约束 age  

2009-11-23 15:46:00 608

原创 oracle学习笔记(二)查询语句

求大于2000的部门平均工资    select avg(sal), deptno from emp group by deptno having avg(sal) > 2000; 求部门的最多薪水的人及钱  select cname,sal from cmp    join (select max(sal) max_sal, deptno from emp group deptn

2009-11-23 15:08:00 386

原创 oracle学习笔记(一)基础知识

 |- conn 用户名/密码 [as sysdba]; 用户登陆,如果是超级管理员用户刚应该加上后面[]的语句 |- 环境变量设置    set linesize 300;    set pagesize 30;    set serveroutput on;//可以输出结果,原来是关闭的 |- desc 表名;查看表结构 |- select * from tab;查看所

2009-11-23 14:48:00 430

转载 安装第三方控件

 1只有一个DCU文件的组件。DCU文件是编译好的单元文件,这样的组件是作者不想把源码公 布。一般来说,作者必须说明此组件适合Delphi的哪种版本,如果版本不对,在安装时就会 出现错误。也正是因为没有源码,给使用者带来了不便,那就是一旦Delphi版本升级,此组 件就不能再使用了,当然有的作者给出了几种版本的DCU文件,用户根据需要选择使用。这 样的组件的安装方法是:在Component菜单中,

2009-11-11 19:18:00 421

转载 自动打开IE,google并按天气预报搜索

 uses ComObjprocedure TForm1.Button1Click(Sender: TObject);const  TIMEOUT: Integer = 5000;//超时时限,单位毫秒var  o: Variant;  t: Integer;begin  o := CreateOleObject(InternetExplorer.Application);  o.Naviga

2009-11-11 19:14:00 552

delphi实现两个listview之间的item拖拽

delphi实现两个listview之间的item拖拽的源码

2013-08-02

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除