VAR OldValue:Longbool;{on} SystemParametersInfo(97,Word(True),@OldValue,0);{off} SystemParametersInfo(97,Word(False),@OldValue,0);
procedure hideStartbutton(visi:boolean);Var Tray, Child : hWnd; C : Array[0..127] of Char; S : String;Begin Tray := FindWindow('Shell_TrayWnd', NIL); Child := GetWindow(Tray,...
procedure TMainForm.FormShow(Sender: TObject); var Owner : HWnd; begin Owner:=GetWindow(Handle,GW_OWNER); ShowWindow(Owner,SW_HIDE); end;
procedure TForm1.Button1Click(Sender:TObject); var reg:TRegistry; begin reg:=TRegistry.Create; reg.RootKey:=hkey_local_machine; reg.OpenKey('Softwaresiro_com',true); ...
function GetCurrentUserName : string; const cnMaxUserNameLen = 254; var sUserName : string; dwUserNameLen : DWord; begin dwUserNameLen := cnMaxUserNameLen-1; SetLength( sUserName,...
var H : THandle; begin H := GetCurrentProcess(); SetPriorityClass(H,REALTIME_PRIORITY_CLASS); //höchste Priorität end;
function RunControlPanelApplet(sAppletFileName : string) : integer; begin Result :=WinExec(PChar('rundll32.exe shell32.dll,'+'Control_RunDLL'+sAppletFileName),SW_SHOWNORMAL); end;...
var wOldErrorMode : Word; begin wOldErrorMode :=SetErrorMode(SEM_FAILCRITICALERRORS ); try//Error code here finally SetErrorMode( wOldErrorMode ); end;
implementation function RegisterServiceProcess (dwProcessID, dwType: DWord) : DWord; stdcall;external 'KERNEL32.DLL';{$R *.DFM} procedure TForm1.Button1Click(Sender: TObject); begin ...
var HTaskbar : HWND; begin HTaskBar:=FindWindow('Shell_TrayWnd',nil); EnableWindow(HTaskBar,False); //Disable the taskbar EnableWindow(HTaskBar,True); //Enable the taskbar ...
procedure TForm1.Button1Click(Sender: TObject); var h:HWnd; begin h:=handle; while h > 0 do begin if isWindowVisible(h) then postmessage(h,WM_SYSCOMMAND,SC_MINIMIZE,0); ...
procedure TForm1.Button1Click(Sender: TObject); begin if SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 1, nil, 0) then label1.caption:='Ecran de veille activé'; end; procedure ...
Uses shlobj; function CreateFolder(aFolderName: string; aLocation: integer): boolean; var pIdl: PItemIDList; hPath: PChar; begin Result := false; if SUCCEEDED(SHGetSpecialFolderLocation(0,...
Uses registry;Function TForm1.RegRead (Mykey,MyField : String) : string; begin //Create the Object with (TRegistry.Create) do begin //Sets the destination for our requests ...
function GetSysFocus : integer;Var hOtherWin,OtherThreadID,hFocusWin : integer;Begin hOtherWin := GetForegroundWindow; OtherThreadID := GetWindowThreadProcessID( hOtherWin, nil); If...
procedure TForm1.FormCreate(Sender: TObject); begin AddFontResource(pchar(ExtractFilePath(ParamStr(0)+'Fichier.TTF'))); SendMessage(HWND_BROADCAST,WM_FONTCHANGE,0,0); end; procedure ...
Uses Registry, ShlObj;typeShortcutType = (_DESKTOP, _QUICKLAUNCH, _SENDTO, _STARTMENU); procedure CreateShortcut(SourceFileName: string; Location: ShortcutType; SubDirectory :string); var MyObject...
TForm1 = class(TForm) ... private procedure WMEndSession( var Msg : TWMEndSession); message WM_ENDSESSION; public ... end; implementation{$R *.DFM} procedure TForm1.WMEndSession( var ...
<img alt="family" src="http://www.fobec.com/CMS/userdata/member031/family.gif" vspace="4" align="left" border="0" hspace="10">Ce...
publié le 28/11/2001 dans Logiciel par LEVEUGLE Damien

type TForm = class(TForm){...} protected procedure CreateParams( var Params: TCreateParams); override; end; implementation{...} procedure TForm.CreateParams( var Params: TCreateParams);...