全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1125
推到 Plurk!
推到 Facebook!

錯誤訊息

答題得分者是:william
nick899
一般會員


發表:16
回覆:22
積分:12
註冊:2002-12-09

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-02-11 14:34:28 IP:61.228.xxx.xxx 未訂閱
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, Menus, Grids, Calendar, TeeProcs, TeEngine, Chart; type TMainForm1 = class(TForm) Image1: TImage; MainLabel1: TLabel; MainLabel2: TLabel; MainMenu1: TMainMenu; MainT: TMenuItem; MainD: TMenuItem; MainR: TMenuItem; MainP: TMenuItem; MainH: TMenuItem; MainQ: TMenuItem; MainTb: TMenuItem; MainTc: TMenuItem; MainRa: TMenuItem; MainRb: TMenuItem; MainPa: TMenuItem; MainPb: TMenuItem; MainDb: TMenuItem; MainDc: TMenuItem; MainDd: TMenuItem; MainHa: TMenuItem; MainLabel3: TLabel; Calendar1: TCalendar; MainLabel4: TLabel; MainLabel5: TLabel; MainTd: TMenuItem; MainTa: TMenuItem; MainTe: TMenuItem; MainDa: TMenuItem; procedure MainQClick(Sender: TObject); procedure MainTdClick(Sender: TObject); procedure FormActivate(Sender: TObject); procedure MainDaClick(Sender: TObject); private { Private declarations } public { Public declarations } end; var MainForm1: TMainForm1; implementation uses D1frm1; {$R *.dfm} procedure OpenForm(FormClass:TFormClass;var fm;AOwner:TComponent); {58行} var i: integer; Child:TForm; begin for i := 0 to Screen.FormCount -1 do if Screen.Forms[i].ClassType = FormClass then begin Child:=Screen.Forms[i]; if Child.WindowState=wsMinimized then ShowWindow(Child.handle,SW_SHOWNORMAL) else ShowWindow(Child.handle,SW_SHOWNA); if (not Child.Visible) then Child.Visible:=True; Child.BringToFront; Child.Setfocus; TForm(fm):=Child; {73行} exit; end; Child:=TForm(FormClass.NewInstance); TForm(fm):=Child; {77行} Child.Create(AOwner); end; procedure TMainForm1.MainDaClick(Sender: TObject); begin OpenForm(TMDaFrm2,MDaFrm2,self); end; 會出線下列錯誤訊息不知為何謝謝 [Warning] Unit1.pas(58): Unsafe type 'procedure, untyped pointer or untyped parameter' [Warning] Unit1.pas(73): Unsafe typecast of 'procedure, untyped pointer or untyped parameter' to 'TForm' [Warning] Unit1.pas(77): Unsafe typecast of 'procedure, untyped pointer or untyped parameter' to 'TForm'
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-02-11 14:43:31 IP:147.8.xxx.xxx 未訂閱
They are new features in Delphi 7 for .NET. Try to disable the warning using Project|Options|Compiler Messages: Unsafe type, Unsafe code, Unsafe typecast
系統時間:2024-05-04 18:53:58
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!