Operation tab file and Tstringgrid assignment;

Source: Internet
Author: User

Unit unit1;interfaceuses Windows, Messages, sysutils, variants, Classes, Graphics, Controls, Forms, Dialogs, Stdctrls,in    Ifiles, Grids, extctrls, Buttons;type TForm1 = Class (Tform) Btn1:tbutton;    Btn2:tbutton;    Bvl1:tbevel;    Strngrd:tstringgrid;    BTN3:TBITBTN;    Procedure Btn1click (Sender:tobject);    Procedure Btn2click (Sender:tobject);    Procedure Formcreate (Sender:tobject); Procedure Strngrdgeteditmask (Sender:tobject;      Acol, Arow:integer;    var value:string);  Procedure Btn3click (Sender:tobject);    Private {Private declarations} public {public declarations} path:string;    Function Readonepara (sinifile,sct,idt:string): String;  Procedure Writeonepara (sinifile,sct,idt,value:string); End;var form1:tform1;implementation{$R *.dfm}procedure tform1.btn1click (sender:tobject); begin WriteOnePara (path+ ' Basic configuration.  TAB ', ' SHUTDOWN ', ' chkhintmusic ', ' ddalf '); Writeonepara (path+ ' basic configuration.  TAB ', ' Shutdown Time ', ' Music ', ' 1313 '); Writeonepara (path+ ' basic configuration. TAB ', ' Desktop video ', ' CHktmusic ', ' fdasf455 '); Writeonepara (path+ ' basic configuration. TAB ', ' service config ', ' chk ', ' Is it true '); end;procedure Tform1.btn2click (Sender:tobject); var s:string;begin s:=readonepara (path+ ' Basic configuration.  TAB ', ' SHUTDOWN ', ' chkhintmusic ');  ShowMessage (s); S:=readonepara (path+ ' basic configuration.  TAB ', ' Shut down time ', ' Music ');  ShowMessage (s); S:=readonepara (path+ ' basic configuration.  TAB ', ' Desktop video ', ' Chktmusic ');  ShowMessage (s); S:=readonepara (path+ ' basic configuration.  TAB ', ' service configuration ', ' chk '); ShowMessage (s); End;function Tform1.readonepara (Sinifile, SCT, idt:string): String;  Var ainifile:tinifile;begin result:= ';  Ainifile:=tinifile.create (Sinifile);  Try Result:=ainifile.readstring (Sct,idt, ");  Finally Ainifile.free; End;end;procedure Tform1.writeonepara (Sinifile, Sct, Idt, value:string);  Var ainifile:tinifile;begin ainifile:=tinifile.create (sinifile);  Try Ainifile.writestring (Sct,idt,value);  Finally Ainifile.free; End;end;procedure tform1.formcreate (sender:tobject); begin Path:=extractfilepath (application.exename); end; Procedure Tform1.strngrdgeteditmask (SendEr:tobject; Acol, Arow:integer; value:string var); begin value:= ' 00:00:00 '; end;procedure Tform1.btn3click (sender:tobject); Begin STRNGRD.  cells[0,0]:= ' serial number '; Strngrd.  cells[1,0]:= ' Shutdown time '; Strngrd.  cells[2,0]:= ' boot time '; Strngrd. Cells[3,0]:= ' give '; end;end.

  

Operation tab file and Tstringgrid assignment;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.