|
|
导航: |
论坛 -> DELPHI技术
斑竹:liumazi,sephil |
|
作者: |
|
2003/5/31 21:46:40 |
标题: |
|
加入我的收藏 |
楼主: |
我想让FORM在启动后,上面的一个PANEL上自动画上方格子(就象那个编辑图标的软件一样),怎样实现?
----------------------------------------------
新手,想得到您的帮助! |
作者: |
|
2003/5/31 23:34:57 |
1楼: |
canvas.
点什么我忘记了,就是画矩形的一个命令,range什么的,看看帮助吧
----------------------------------------------
-
|
作者: |
|
2003/6/1 15:54:58 |
2楼: |
以下代码可能有帮助! var Myc ; TCanvas ; begin Myc := TCanvas.Create ; With Myc Do begin Brush.Style := bsSolid ; Brush.color := clBlue ; Pen.Style := psSolid ; Pen.Color := clRed ; Pen.Width := 1 ; rectangle(10,10,100,100);
Free ; end ;
//试试一下以上的代码吧/ 你就偷着乐去吧?
----------------------------------------------
|
作者: |
boy (阿門) |
★☆☆☆☆ |
-
|
盒子活跃会员 |
|
2003/6/1 23:37:43 |
3楼: |
試試看
unit Unit1;
interface
uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls;
type TForm1 = class(TForm) Shape1: TShape; Memo1: TMemo; private { Private declarations } public { Public declarations } end;
var Form1: TForm1;
implementation
{$R *.DFM}
end.
========================= object Form1: TForm1 Left = 192 Top = 107 Width = 544 Height = 375 Caption = 'Form1' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 object Shape1: TShape Left = 138 Top = 56 Width = 195 Height = 233 Brush.Color = clBlack end object Memo1: TMemo Left = 132 Top = 48 Width = 189 Height = 227 Lines.Strings = ( 'Memo1') TabOrder = 0 end end
----------------------------------------------
|
|