全部博文(788)
分类:
2009-04-22 11:00:58
用TBevel控件,复制到你的窗体上看看效果
object Label1: TLabel
Left = 72
Top = 192
Width = 32
Height = 13
Caption = 'Label1'
end
object Bevel1: TBevel
Left = 105
Top = 192
Width = 3
Height = 13
end
object Label2: TLabel
Left = 108
Top = 192
Width = 32
Height = 13
Caption = 'Label2'
end
我在复制到unit1.pas 下以后,报错:
[Error] Unit1.pas(52): Declaration expected but 'OBJECT' found
我是放在这地方的;
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, Grids, DBGrids, ExtCtrls, DBCtrls, StdCtrls;
type
TFrmPMLR = class(TForm)
ADOConnection1: TADOConnection;
ADOTable1: TADOTable;
DataSource1: TDataSource;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
Label1: TLabel;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FrmPMLR: TFrmPMLR;
implementation
{$R *.dfm}
procedure TFrmPMLR.Button1Click(Sender: TObject);
var
NewString: string;
begin
InputQuery('输入查询条件','查询品名为', NewString);
ADOTable1.Locate('PM',NewString,[LoPartialkey]);
end;
procedure TFrmPMLR.Button2Click(Sender: TObject);
var
NewString: string;
begin
InputQuery('输入过滤条件','过滤品名为 ', NewString);
ADOTable1.Filter:='PM like '+''''+'%'+NewString+'%'+'''';
ADOTable1.Filtered:=true;
end;
object Label1: TLabel;
Left = 72
Top = 192
Width = 32
Height = 13
Caption = 'Label1'
end
object Bevel1: TBevel
Left = 105
Top = 192
Width = 3
Height = 13
end
object Label2: TLabel
Left = 108
Top = 192
Width = 32
Height = 13
Caption = 'Label2'
end
Left = 72
Top = 192
Width = 32
Height = 13
Caption = 'Label1'
end
object Bevel1: TBevel
Left = 105
Top = 192
Width = 3
Height = 13
end
object Label2: TLabel
Left = 108
Top = 192
Width = 32
Height = 13
Caption = 'Label2'
end
end.
强烈鄙视问题解决后不结贴的人!
强烈鄙视技术问题解决后把贴子转移到非技术区的人!
鄙视你们!
复制到你的窗体上
复制到你的窗体上
复制到你的窗体上
复制到你的窗体上
-_-!!!!!!
不是复制到你的单元中
晕倒
我是新手,原来创建对象的代码可以直接往窗体上粘贴呀!