#1 Roulette Forum & Message Board | www.RouletteForum.cc

Roulette-focused => General Discussion => Topic started by: ThomasGrant on Jul 06, 10:04 AM 2011

Title: Handy Procedures...
Post by: ThomasGrant on Jul 06, 10:04 AM 2011
In this post and in follow up posts.
I will show some very handy and very useful Procedures that I have used.
Note: These procedures are for any version of RSS Pro.

Here are my first favourite two procedures.
Load and Save window position.
So glad that Silver was able to help me solve this.


var F : Text;
    S : String; 
var i;
var x:TForm;

procedure close_me;{This procedure can save the current window position}
begin
    AssignFile(F,'c:\winpos');
    Rewrite(F);             
    Writeln(F,x.Top);{0}
    Writeln(F,x.Left);{1}
end;


procedure load_winpos;{This will load the window position}
begin
    AssignFile(F,'c:\winpos');{If no file exist. Then you will get an error message}
    Reset(F);{open the file for reading}
    I := 0;
    while not eof(F) do {loop that will repeat until the end of file will be not found}
    begin
        S:=ReadLn(F); {read the first line into "s" variable}
        if i=0 then Self.Top:=s;
        if i=1 then Self.Left:=s;
   end;
end;