|
#2
|
||||
|
||||
|
function GetIniBool(const Section, Key: String; const: Boolean; const Filename: String): Boolean;
function GetIniInt(const Section, Key: String; const Default, Min, Max: Longint; const Filename: String): Longint; function GetIniString(const Section, Key, Default, Filename: String): String; Code:
Example:
var
sCaption: string;
iLeft, iTop, iWidth, iHeight: integer;
bChecked: boolean;
sCaption:=GetIniString('chkb', 'Caption', 'Component 1', ExpandConstant('{src}') + '\YourFile.ini');
iLeft:=GetIniInt('chkb', 'Left', '30', ExpandConstant('{src}') + '\YourFile.ini');
iTop:=GetIniInt('chkb', 'Top', '50', ExpandConstant('{src}') + '\YourFile.ini');
iWidth:=GetIniInt('chkb', 'Width', '150', ExpandConstant('{src}') + '\YourFile.ini');
iHeight:=GetIniInt('chkb', 'Height', '20', ExpandConstant('{src}') + '\YourFile.ini');
bChecked=GetIniBool('chkb', 'Checked', 'true', ExpandConstant('{src}') + '\YourFile.ini');
CheckBox1.Caption:=sCaption;
CheckBox1.SetBounds(iLeft, iTop, iWidth, iHeight);
CheckBox1.Checked:=bChecked;
__________________
Practice makes perfect. |
| The Following 2 Users Say Thank You to JRD! For This Useful Post: | ||
EzzEldin16 (28-08-2017), Simorq (28-08-2017) | ||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Anno 1701 won't load, just get a blue screen! | Shadow22 | General Gaming | 5 | 28-08-2012 12:52 |
| Having a nightmare with Iomega USB ZipCD - Help! | Tranced | CD/DVD-Writers | 2 | 03-04-2005 06:00 |
| PMA Update failure....????????? | dannyk | DVD Backup Forum | 1 | 05-01-2005 14:19 |
| Flat Out Protection | t.foster73 | PC Games | 59 | 26-11-2004 01:39 |
| HELP ME PLZ!!!! | Dalvin | DC Games | 0 | 02-01-2001 22:14 |