ReBoot
[code lang=”delphi”]var hToken : THandle; tkp, ptkp : TTokenPrivileges; i : dword; begin //* Get a token for this process. */ OpenProcessToken(GetCurrentProcess,TOKEN_ADJUST_PRIVILEGES or…
Running EXE file from within own Application
> How can i run an exe File inside code Delphi? > What is the commen or method or object to run an…
SHGetSpecialFolderLocation
[code lang=”delphi”]Var SFolder : pItemIDList; SpecialPath : Array[0..MAX_PATH] Of Char; begin SHGetSpecialFolderLocation(Form1.Handle, CSIDL_STARTUP, SFolder); SHGetPathFromIDList(SFolder, SpecialPath); Label1.Caption := StrPas(SpecialPath); Other folders : CSIDL_BITBUCKET…
Show Or Hide TaskBar
[code lang=”delphi”]procedure TForm1.btnHideTaskBarClick(Sender: TObject); Var TaskBarHandle : Integer; Begin TaskBarHandle := FindWindow(‘Shell_TrayWnd’,Nil); ShowWindow(TaskBarHandle, SW_HIDE); End; procedure TForm1.btnShowTaskBarClick(Sender: TObject); Var TaskBarHandle : Integer; Begin…
System Images
[code lang=”delphi”]Procedure CreateImages; var SysIL: HImageList; SFI: TSHFileInfo; begin // Create an image list component MyTreeView.Images := TImageList.Create(Self); // This gets the small…
System Image Usage
[code lang=”delphi”]function GetIconIndex(const AFile: string; Attrs: DWORD): integer; var SFI: TSHFileInfo; begin SHGetFileInfo(PChar(AFile), Attrs, SFI, SizeOf(TSHFileInfo), SHGFI_SYSICONINDEX or SHGFI_USEFILEATTRIBUTES); Result := SFI.iIcon; end;[/code]…
Database: D5/D6 Error with DB-Access
Q: —- I have two query connect to DBDemos. Query1.sql select name from country Query2.sql (connect to query1) select * from country where…
Graphic: TImage flickering
i’ve found this in a Newsgroup: —–8 0) then SetBounds(Left, Top, Picture.Width, Picture.Height); G := Picture.Graphic; if G nil then begin if not…
Bugs? How to let Borland know?
> What email address should be used to report helpfile errors and > suggestions (e.g., Help entry for “message handlers” should mention >…
Graphic: RLE Bitmaps
An FYI, and also wondering who has run into the same problems with possibly a better resolution/fix: Some changes were made in the…