If you are trying to auto logon on Windows 7, just change registry entry settings as bellow:Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon]"AutoAdminLogon"="1""DefaultUserName"="super_user""DefaultP...
In the program's Main method, call ProcessUtils.ThisProcessIsAlreadyRunning() to determine if another instance of the program is already running. ThisProcessIsAlreadyRunning attempts to create a Mutex object with the same name as the program (Application.P...
Notes: If you want to run this sample,you should copy the Ip address to driver c:. Using the codePart 1.using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows....
Flashing a window means changing the appearance of its caption bar as if the window were changing from inactive to active status, or vice versa.Typically, a window is flashed to inform the user that the window requires attention but that it does not curren...
Suppose you have a data-critical type of application where you would not want a non-authored user to work with the data. Such an application could automatically log out the current user if no user activity has taken place in a lengthy time.To track a user'...
This form has 3 labels and a timer component:unit unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Timer1: TTimer;  ...
To programmatically close another application, send to the application a WM_QUIT message. "Window caption" is the caption of the window that you are sending the message to. Usage: if not KillApp('Window caption') then ShowMessage('App not closed') ;Here's ...
Put a TColorDialog (ColorDialog1), a TLabel (Label1) and a TButton (Button1) in your form, and assign the Button1.OnClick procedure as follows:procedure TForm1.Button1Click(Sender: TObject) ; function ColorToHtml(DColor:TColor):string; var ...
This function is useful to get file attribute.Usage:label1.Caption:=FileLastModified('c:autoexec.bat') ;In addition, below function must be included in order to use above function.function FileLastModified(const TheFile: string): string;var FileH : T...
Universal/Uniform Naming Convention. A UNC path describes the location of a volume, directory, or file.The format for a UNC path is \servervolumedirectoryfile and is not case-sensitive. For example: \Shared1_svrShared1WGroupsNetworkOrders.xlsR...