复制代码uses FileCtrl; procedure TForm1.BitBtn1Click(Sender: TObject);begin with OpenDialog1 do if Execute then if FileSetAttr(filename, faArchive)=0 then Caption:='attribute was changed' else Caption:='attribute was not changed';end;复制代码 请在interface下的us
procedure TForm1.Button1Click(Sender: TObject); var i:Integer; begin i:=SendMessage(Richedit1.handle,EM_LINEFROMCHAR,Richedit1.selstart,)+; ShowMessage(IntToStr(i)); end;
//poScreenCenter时,窗体会显示到主显示器的中央 MainForm.Position := poScreenCenter; function TGAEAMainForm.GetWorkArea(var R : TRect) : Boolean;var I : Integer;begin Result := False; for I := 0 to Screen.MonitorCount -1 do if Screen.Monitors[I].Primary then begin R