-
Content Count
75 -
Joined
-
Last visited
Posts posted by toufik
-
-
Just now, David Hoyle said:Have you checked that the INI file exists with the value you have written?
yes the ini file created and index in it just fine in the restore i did not use the ini file at all i think thats problem
-
Just now, David Hoyle said:Besides fixing the INI naming issue are you making sure you are loading the file from the same folder?
well i dont thinks i'm ,,, can you point me in the right direction please
-
i really know the fix is in front of my eyes for some reason i'm stuck for two days with this !!
-
Just now, Lajos Juhász said:Why are you using WrieString / ReadString. It would be better:
Myinifile.WriteInteger('LastDiskSkin', SkinFile, lst1.ItemIndex.ToString);lst1.ItemIndex :=Myinifile.ReadInteger('LastDiskSkin',SkinFile, -1); // or some default index.
i about two days now trying to fix this and yes i did try with ReadInteger and WriteInteger the problem persist
-
Just now, David Hoyle said:The name of your INI files are different... save = my.ini and load = tabibi.ini.
yeah i did change it s not the problem its not restoring the save index
-
help need please .............I'm using Delphi 10.4
I'm having a very silly problem restoring i'm trying to store or save tlistbox index that select by the user (ItemIndex) and restore it later on create event
the save work just fine i think the problem with restore .
save :
var Myinifile := TIniFile; SkinFile := stringMyinifile := TIniFile.Create(ExtractFilePath (application.ExeName)+'my.ini');
Myinifile.WriteString('LastDiskSkin', SkinFile, lst1.ItemIndex.ToString);
restore :
if lst1.ItemIndex < 0 then EXIT;
// Myinifile := TIniFile.Create('tabibi.ini');
try
lst1.ItemIndex :=Myinifile.ReadString('LastDiskSkin',SkinFile,'').ToInteger;
ShowMessage(SkinFile);
finally
Myinifile.Free;
end; -
-
and its start counting all over next time the user lunch the app and so on ...
-
I'm using calculate time not any longer then 8 or 7 hour a day witch is the time the user using the application that's it
is that fine ?i hope i was clear thank you all
@David Heffernan@KenR -
11 hours ago, Foersom said:Delphi Encryption Compendium, version 6.x, can do everything and is free.
https://github.com/MHumm/DelphiEncryptionCompendiumthanks i will give it a try
-
thank you all for help this worked for me
var
Year, Month, Day, Hour, Min, Sec, MSec: Word;
StartTime: ElapsedTime: TDateTime;
EndTime:= Time;
ElapsedTime:= EndTime-StartTime; Day:= trunc(ElapsedTime);
DecodeTime(ElapsedTime, Hour, Min, Sec, MSec); -
@FPiette
sorry for i was bit unclear and thanks for taking from your time ;;;
this what i was trying to do , i'm almost there i just need to remove that 12 start from 00:00:00 not 12:00:00 any idea ? -
7 minutes ago, FPiette said:Is it your homework?
It would be better that you show the code you already wrote so that we can help you with it.
If we give you the solution - which is quite trivial - you won't learn anything.
its not my homework LOL i'm very old for that , I'm Delphi Beginner that all
and this my code
procedure TForm1.Timer1Timer(Sender: TObject);
var StartTime: TDateTime;
EndTime: TDateTime;
ElapsedTime: TDateTime;
Year, Month, Day, Hour, Min, Sec, MSec: Word;
begin
begin
StartTime:= Time; {get the process start time}
{.......do processing..........}
EndTime:= Time; {get the process end time}
ElapsedTime:= EndTime-StartTime; {Total elapsed time}b.Caption :=TimeToStr(ElapsedTime)
{DecodeTime will return total time down to the milliseconds}
DecodeTime(ElapsedTime, Hour, Min, Sec, MSec); -
good morning every one ,,,
i want to count or Calculating Elapsed time of my running Delphi application ,its start when app start .... in hour and minute and second and days
what's the right way to approach i did tried a lot of example no luck yet -
16 hours ago, Kim Madsen said:Here is a blog post about exactly that.
https://components4developers.blog/2017/09/01/encryption-of-a-string/great components ,,not free tho ^^ thanks for reply
-
-
3 minutes ago, David Heffernan said:It doesn't much matter what the thing is that you encrypt. What matters is who encrypts it, and who has knowledge of the key or keys used to encrypt and decrypt. That's what I mean by usage.
As for how you do it, convert the text to binary using a well defined encoding, e.g. UTF8, and encrypt that. Encryption algorithms work with binary data not text.
thanks for replay i will try to get into it thank s again
-
2 minutes ago, David Heffernan said:It depends on what your usage is
i want to encrypt serial number
-
what 's the best way to encrypt a string .?,
and to it password for example -
hello every one ,,
i'm trying to extract a string g lets say i have this long string :
2090Lj32J5Y6Ni6Q2Rt8c538u1X227L340Q8N1....ce4A3z6l96S5v7LZ3OhSVoB538k7wPTn13E2w2D0h104fJ7HP09xo7W71J1o02c088922A3t420697F5431XP91C6JF9w1Ss0Tuk5S669207816gp57pW193BPWL27AZ052nr2S714...30
ps : i added the point(....) to show the palaces i want to split the string.
i want tto be able to get start from 3 string and put it in variable to use it later
2090Lj32J5Y6Ni6Q2Rt8c538u1X227L340Q8N1
and .......ce4A3z6l96S5v7LZ3OhSVoB538k7wPTn13E2w2D0h104fJ7HP09x
o7W71J1o02c088922A3t420697F5431XP91C6JF9w1Ss0Tuk5S669207816gp57pW193BPWL27AZ052nr2S714v
and ......30
..
i did tried to play with this ; Registration_number :=(length(str)).ToString;
no luck yet . -
-
Hello every one , and thank you all for taking a time to try to understand what i have asked ,,,,
this is a video show exactly what i need and sorry for not replying sooner ,, i have a bit problem in my windows i lost all files and did have try to fix ,, all fine now .
@Serge_G yes I'm working with SQLite db and firedac
like i said before this video show what i need to do ,, its paid Component called Rubicon. -
2 hours ago, Dany Marmur said:I'm fine, thanks!
??sorry
-
hello every one how you all doing ,,,i'm looking for advanced search method
wait what ?!!!! ^^^
so i need to search a long text word by word and move to the next one in onther long text in a table field and come back with a result of any match ,,,
is that all .....no ,,, we want to highlight that word ,,,easy right and move to the next one
i found a paid composant called Rubicon
the picture show more detail about it please take a look thanks
save probelm in ini file vcl with tlistbox
in VCL
Posted
Myinifile := TIniFile.Create('tabibi.ini');
(then the restore code )
to restore from the ini file ,??