分享
 
 
 

控件style你知我知.

王朝delphi·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

一般控件我可以通过给于我们的属性设置,但我们不可能满足这些属性

比如我们要edit1.text只能是数字,虽然我可以在edit.change监控,但

其控件style已提供相应的style,下面是代码----还有一些style自己

试一下。

var

defstyle: dWord;

begin

defstyle := GetWindowLong(Edit1.Handle, GWL_STYLE);

SetWindowLong(Edit1.Handle, GWL_STYLE, defstyle or ES_NUMBER)

end;

--------------------------------------------------------

{ Edit Control Styles }

{$EXTERNALSYM ES_LEFT}

ES_LEFT = 0;

{$EXTERNALSYM ES_CENTER}

ES_CENTER = 1;

{$EXTERNALSYM ES_RIGHT}

ES_RIGHT = 2;

{$EXTERNALSYM ES_MULTILINE}

ES_MULTILINE = 4;

{$EXTERNALSYM ES_UPPERCASE}

ES_UPPERCASE = 8;

{$EXTERNALSYM ES_LOWERCASE}

ES_LOWERCASE = $10;

{$EXTERNALSYM ES_PASSWORD}

ES_PASSWORD = $20;

{$EXTERNALSYM ES_AUTOVSCROLL}

ES_AUTOVSCROLL = $40;

{$EXTERNALSYM ES_AUTOHSCROLL}

ES_AUTOHSCROLL = $80;

{$EXTERNALSYM ES_NOHIDESEL}

ES_NOHIDESEL = $100;

{$EXTERNALSYM ES_OEMCONVERT}

ES_OEMCONVERT = $400;

{$EXTERNALSYM ES_READONLY}

ES_READONLY = $800;

{$EXTERNALSYM ES_WANTRETURN}

ES_WANTRETURN = $1000;

{$EXTERNALSYM ES_NUMBER}

ES_NUMBER = $2000;

----------------------------------------------

{ Window Styles }

{$EXTERNALSYM WS_OVERLAPPED}

WS_OVERLAPPED = 0;

{$EXTERNALSYM WS_POPUP}

WS_POPUP = DWORD($80000000);

{$EXTERNALSYM WS_CHILD}

WS_CHILD = $40000000;

{$EXTERNALSYM WS_MINIMIZE}

WS_MINIMIZE = $20000000;

{$EXTERNALSYM WS_VISIBLE}

WS_VISIBLE = $10000000;

{$EXTERNALSYM WS_DISABLED}

WS_DISABLED = $8000000;

{$EXTERNALSYM WS_CLIPSIBLINGS}

WS_CLIPSIBLINGS = $4000000;

{$EXTERNALSYM WS_CLIPCHILDREN}

WS_CLIPCHILDREN = $2000000;

{$EXTERNALSYM WS_MAXIMIZE}

WS_MAXIMIZE = $1000000;

{$EXTERNALSYM WS_CAPTION}

WS_CAPTION = $C00000; { WS_BORDER or WS_DLGFRAME }

{$EXTERNALSYM WS_BORDER}

WS_BORDER = $800000;

{$EXTERNALSYM WS_DLGFRAME}

WS_DLGFRAME = $400000;

{$EXTERNALSYM WS_VSCROLL}

WS_VSCROLL = $200000;

{$EXTERNALSYM WS_HSCROLL}

WS_HSCROLL = $100000;

{$EXTERNALSYM WS_SYSMENU}

WS_SYSMENU = $80000;

{$EXTERNALSYM WS_THICKFRAME}

WS_THICKFRAME = $40000;

{$EXTERNALSYM WS_GROUP}

WS_GROUP = $20000;

{$EXTERNALSYM WS_TABSTOP}

WS_TABSTOP = $10000;

{$EXTERNALSYM WS_MINIMIZEBOX}

WS_MINIMIZEBOX = $20000;

{$EXTERNALSYM WS_MAXIMIZEBOX}

WS_MAXIMIZEBOX = $10000;

{$EXTERNALSYM WS_TILED}

WS_TILED = WS_OVERLAPPED;

{$EXTERNALSYM WS_ICONIC}

WS_ICONIC = WS_MINIMIZE;

{$EXTERNALSYM WS_SIZEBOX}

WS_SIZEBOX = WS_THICKFRAME;

{ Common Window Styles }

{$EXTERNALSYM WS_OVERLAPPEDWINDOW}

WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED or WS_CAPTION or WS_SYSMENU or

WS_THICKFRAME or WS_MINIMIZEBOX or WS_MAXIMIZEBOX);

{$EXTERNALSYM WS_TILEDWINDOW}

WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW;

{$EXTERNALSYM WS_POPUPWINDOW}

WS_POPUPWINDOW = (WS_POPUP or WS_BORDER or WS_SYSMENU);

{$EXTERNALSYM WS_CHILDWINDOW}

WS_CHILDWINDOW = (WS_CHILD);

{ Extended Window Styles }

{$EXTERNALSYM WS_EX_DLGMODALFRAME}

WS_EX_DLGMODALFRAME = 1;

{$EXTERNALSYM WS_EX_NOPARENTNOTIFY}

WS_EX_NOPARENTNOTIFY = 4;

{$EXTERNALSYM WS_EX_TOPMOST}

WS_EX_TOPMOST = 8;

{$EXTERNALSYM WS_EX_ACCEPTFILES}

WS_EX_ACCEPTFILES = $10;

{$EXTERNALSYM WS_EX_TRANSPARENT}

WS_EX_TRANSPARENT = $20;

{$EXTERNALSYM WS_EX_MDICHILD}

WS_EX_MDICHILD = $40;

{$EXTERNALSYM WS_EX_TOOLWINDOW}

WS_EX_TOOLWINDOW = $80;

{$EXTERNALSYM WS_EX_WINDOWEDGE}

WS_EX_WINDOWEDGE = $100;

{$EXTERNALSYM WS_EX_CLIENTEDGE}

WS_EX_CLIENTEDGE = $200;

{$EXTERNALSYM WS_EX_CONTEXTHELP}

WS_EX_CONTEXTHELP = $400;

{$EXTERNALSYM WS_EX_RIGHT}

WS_EX_RIGHT = $1000;

{$EXTERNALSYM WS_EX_LEFT}

WS_EX_LEFT = 0;

{$EXTERNALSYM WS_EX_RTLREADING}

WS_EX_RTLREADING = $2000;

{$EXTERNALSYM WS_EX_LTRREADING}

WS_EX_LTRREADING = 0;

{$EXTERNALSYM WS_EX_LEFTSCROLLBAR}

WS_EX_LEFTSCROLLBAR = $4000;

{$EXTERNALSYM WS_EX_RIGHTSCROLLBAR}

WS_EX_RIGHTSCROLLBAR = 0;

{$EXTERNALSYM WS_EX_CONTROLPARENT}

WS_EX_CONTROLPARENT = $10000;

{$EXTERNALSYM WS_EX_STATICEDGE}

WS_EX_STATICEDGE = $20000;

{$EXTERNALSYM WS_EX_APPWINDOW}

WS_EX_APPWINDOW = $40000;

{$EXTERNALSYM WS_EX_OVERLAPPEDWINDOW}

WS_EX_OVERLAPPEDWINDOW = (WS_EX_WINDOWEDGE or WS_EX_CLIENTEDGE);

{$EXTERNALSYM WS_EX_PALETTEWINDOW}

WS_EX_PALETTEWINDOW = (WS_EX_WINDOWEDGE or WS_EX_TOOLWINDOW or WS_EX_TOPMOST);

{$EXTERNALSYM WS_EX_LAYERED}

WS_EX_LAYERED = $00080000;

{$EXTERNALSYM WS_EX_NOINHERITLAYOUT}

WS_EX_NOINHERITLAYOUT = $00100000; // Disable inheritence of mirroring by children

{$EXTERNALSYM WS_EX_LAYOUTRTL}

WS_EX_LAYOUTRTL = $00400000; // Right to left mirroring

{$EXTERNALSYM WS_EX_COMPOSITED}

WS_EX_COMPOSITED = $02000000;

{$EXTERNALSYM WS_EX_NOACTIVATE}

WS_EX_NOACTIVATE = $08000000;

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有