上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 49 下一页
摘要: 有问题 //ListBox选中的项目移动到第1位 Listbox1.Items.Move(ListBox1.ItemIndex,0); //ListView选中的项目移动到第1位 procedure TForm1.Button5Click(Sender: TObject);varsel:String;beginwith ListView... 阅读全文
posted @ 2014-07-29 18:53 XE2011 阅读(664) 评论(0) 推荐(0) 编辑
摘要: ListView返回选中的多项目 procedure TForm1.Button3Click(Sender: TObject);vars: string;I: Integer;beginfor i := 0 to listview1.items.count - 1 dobeginif listview1.items[i].selected then... 阅读全文
posted @ 2014-07-29 18:52 XE2011 阅读(155) 评论(0) 推荐(0) 编辑
摘要: unitUnit1; interface uses Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms, Dialogs,ComCtrls,StdCtrls; type TForm1=class(TForm) ListView1:TListView; ... 阅读全文
posted @ 2014-07-29 18:51 XE2011 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 为TListBox添加水平滚动条 实例说明 TListBox组件是一个较为常用的列表组件,在默认情况下该组件是没有水平滚动条的,所以文字过长会显示不完全,在文字较短的情况下还可以,但是如果一行的文字很长的话也不行。本例为TListBox添加了一个水平的滚动条,运行本程序单击【添加滚动条】按钮在TListBox组件中就会增加一个水平滚动条,运行效果如图1所示。 图1 为TListBox... 阅读全文
posted @ 2014-07-29 18:49 XE2011 阅读(396) 评论(0) 推荐(0) 编辑
摘要: ComboBox1.Perform(CB_SETDROPPEDWIDTH, 200, 0); 下拉高度 ComboBox1.DropDownCount:=20; {$externalsym cb_geteditsel}cb_geteditsel= $0140;{$externalsym cb_limittext... 阅读全文
posted @ 2014-07-29 18:46 XE2011 阅读(256) 评论(0) 推荐(0) 编辑
摘要: //返回ListBox选中的多项目 procedure TForm1.Button2Click(Sender: TObject);vari:Integer;s:string;beginfor i:=0 to ListBox1.Items.Count-1 doif ListBox1.Selected[i] thens:=s+ListBox1.Items[i]+#... 阅读全文
posted @ 2014-07-29 18:44 XE2011 阅读(261) 评论(0) 推荐(0) 编辑
摘要: //动态创建组件TEditprocedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;Shift: TShiftState; X, Y: Integer);varEdit:TEdit;beginEdit:=Tedit.Create(nil);Edit.parent :=Self;Edit.Show... 阅读全文
posted @ 2014-07-29 18:43 XE2011 阅读(229) 评论(0) 推荐(0) 编辑
摘要: //限制字符的输入{ 只能输入以下字符 }procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);begin If (Key in ['\', '/', ':', '*', '?', '', '|']) then Key := #0; If not(Key in ['0' .. '9', 'a' .. 'z', 'A... 阅读全文
posted @ 2014-07-29 18:42 XE2011 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 停留在窗体下面 处于 force my form to stay on the bottom?unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs;typeTForm1 = class(TForm)private... 阅读全文
posted @ 2014-07-29 18:39 XE2011 阅读(120) 评论(0) 推荐(0) 编辑
摘要: VCL BitMap Style Proceject Options->Application->Appearance 选择几个样式 使用代码设置 uses Vcl.Themes;procedure TForm1.Button1Click(Sender: TObject);beginTStyleManager.TrySetStyle('Amakrits');end; ... 阅读全文
posted @ 2014-07-29 18:38 XE2011 阅读(913) 评论(0) 推荐(0) 编辑
摘要: delphi 判断是否出现滚动条 if (GetWindowlong(Stringgrid1.Handle, GWL_STYLE) and WS_VSCROLL) 0 then ShowMessage('Vertical scrollbar is visible!'); if (GetWindowlong(Stringgrid1.Handle, GWL_STYLE) ... 阅读全文
posted @ 2014-07-29 18:26 XE2011 阅读(430) 评论(0) 推荐(0) 编辑
摘要: 在运行时移动控件 procedure TForm1.Button1MouseDown(Sender: TObject; Button: TMouseButton;Shift: TShiftState; X, Y: Integer);constSC_DragMove = $F012;beginBeginReleaseCapture;Button1.pe... 阅读全文
posted @ 2014-07-29 18:23 XE2011 阅读(113) 评论(0) 推荐(0) 编辑
摘要: //function GetUser: string; //获取本机当前用户名varBuffer: array[0..255] of Char;Size: cardinal;beginSize := 256;if GetUserName(Buffer, Size) thenbeginResult := BufferendelsebeginResul... 阅读全文
posted @ 2014-07-29 18:22 XE2011 阅读(322) 评论(0) 推荐(0) 编辑
摘要: unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ShellAPI;type TForm1 = class(TForm) Memo1: TMemo; procedure FormCreate(S... 阅读全文
posted @ 2014-07-29 18:20 XE2011 阅读(377) 评论(0) 推荐(0) 编辑
摘要: (*功能:IniFormState1 保存和读取 窗体的大小2 保存和读取 窗体在屏幕上的位置//让程序第1次出现在屏幕的中心点获取屏幕的中心点POSITION:poScreenCenter //不行*)//implementation//{$R *.dfm}uses IniFiles;//引用IniFiles///写入信息到ini文件 procedureWriteformStat... 阅读全文
posted @ 2014-07-29 18:19 XE2011 阅读(342) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 49 下一页