DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: cuiqingbo
今日帖子: 20
在线用户: 13
导航: 论坛 -> DELPHI技术 斑竹:liumazi,sephil  
作者:
男 lqlayy (lqlayy) ★☆☆☆☆ -
禁用账号
2003/7/28 20:58:11
标题:
被禁用帐号,仅在管理模式可见! 浏览:2703
加入我的收藏
楼主: ……
被禁用帐号,帖子内容自动屏蔽!
……

----------------------------------------------
发布广告,账号被禁用!
作者:
男 boy (阿門) ★☆☆☆☆ -
盒子活跃会员
2003/7/28 22:52:55
1楼: procedure TForm1.FormCreate(Sender: TObject);
var
  V: Variant;
  I,J: Integer;
begin
  OW := TForm(Sender).Width;
  OH := TForm(Sender).Height;
  OP := TForm(Sender).PixelsPerInch;
  J := 0;
  // 記錄屬於 TControl 的元件總數
  for I := 0 to ComponentCount-1 do
      if (Components[I] is TControl) then Inc(J);
  if J > 0 then begin
     SetLength(aName,J);
     SetLength(aLeft,J);   SetLength(aTop,J);    SetLength(aWidth,J);
     SetLength(aHeight,J); SetLength(aFWidth,J); SetLength(aFHeight,J);
     for I := Low(aName) to High(aName) do begin
         aName[I] := ';
         aLeft[I] := 0; aTop[I] := 0; aWidth[I] := 0;
         aHeight[I] := 0; aFWidth[I] := 0; aFHeight[I] := 0;
     end;
  end;
  J := -1;
  for I := 0 to ComponentCount-1 do begin
      if not (Components[I] is TControl) then Continue;
      Inc(J);
      aName[J] := TControl(Components[I]).Name;
      aLeft[J] := TControl(Components[I]).Left;
      aTop[J] := TControl(Components[I]).Top;
      aWidth[J] := TControl(Components[I]).Width;
      aHeight[J] := TControl(Components[I]).Height;
      // 檢查是否有 font property
      V := GetPropValue (Components[I], 'Font');
      if not VarIsNull(V) then begin
         aFWidth[J] := TEdit(Components[I]).Font.Size;
         aFHeight[J] := TEdit(Components[I]).Font.Height;
      end;
  end;
end;

procedure TForm1.FormResize(Sender: TObject);
var
  V: Variant;
  I,J: Integer;
  L,W,H,T,FS,FH: Longint;
  NW,NH,NP: Longint;
begin
  // TStatusBar 的 Panel 要特別處理 
  NW := TForm(Sender).Width;
  NH := TForm(Sender).Height;
  NP := TForm(Sender).PixelsPerInch;
  J := -1;
  for I := 0 to ComponentCount-1 do begin
      if not (Components[I] is TControl) then Continue;
      Inc(J);
      L := aLeft[J];
      W := aWidth[J];
      H := aHeight[J];
      T := aTop[J];
      if OW <> 0 then TControl(Components[I]).Left   := Longint(L*NW div OW);
      if OH <> 0 then TControl(Components[I]).Top    := Longint(T*NH div OH);
      if OW <> 0 then TControl(Components[I]).Width  := Longint(W*NW div OW);
      if OH <> 0 then TControl(Components[I]).Height := Longint(H*NH div OH);
      // 檢查是否有 font property
      V := GetPropValue (Components[I], 'Font');
      if not VarIsNull(V) then begin
         FS := aFWidth[J];
         FH := aFHeight[J];
         if (OP <> 0) and (OW <> 0) then begin
            TEdit(Components[I]).Font.Size := Longint((FS * NP div OP) * NW div OW);
            TEdit(Components[I]).Font.Height := Longint((FH * NP div OP) * NH div OH);
         end;
      end;
  end;
end;

----------------------------------------------
Delphi開發◆伺服器架設◆免安裝APACHE,PHP,CGI Perl, MYSQL ★
作者:
男 lqlayy (lqlayy) ★☆☆☆☆ -
禁用账号
2003/7/29 9:09:01
2楼: ……
被禁用帐号,帖子内容自动屏蔽!
……

----------------------------------------------
发布广告,账号被禁用!
作者:
男 supermay (supermay) ★☆☆☆☆ -
盒子活跃会员
2003/7/29 11:01:08
3楼: 每一个组件都有一个相对于父组件的停泊属性,A开头的我不识EN
----------------------------------------------
链接:https://pan.baidu.com/s/12jzmECYKhGCsHBxz8tmB6w 提取码:pelr --来自百度网盘超级会员V9的分享
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行70.3125毫秒 RSS