Okay Im making a network diagnostics tool with my friend, and I need to know if it's at all possible to make, little help bubbles in Delphi like you see in windows(the little yellow squares that appears over buttons when you do mouse_over's. And he's also gone and added in a feature that allows you to log into the program to use the functions, it only reads them from a text file though so I was wondering if there was a way to have some sort of easy encrypter we could use or maybe a program where you can save files, but change the format so that it can no longer be viewed in it's initial program. e.g save a .txt but change so, nobody can read whats in it, even if you go to 'open with' Bump.
No need to bump, it's only been six hours.
Those yellow boxes are called Tooltips, and yes I'm pretty sure Delphi has a form function that uses them - I think you'll find it in the Object Inspector.
As for encryption, the easiest way would be to store the records in a file that uses a hashing function to encrypt and unencrypt the data - the ORD and CHR commands are your friend. ;)
As for preventing people opening the file, that's pretty simple - just tell Delphi to use an unknown extension such as recordstore.xyz, instead of .txt. This can be changed within a single line of code. (Or more, depending on how many times the program openes and closes the file.)
Example, writing data to a file:
AssignFile(recordfile, fileofrecords.xyz); Rewrite(recordfile);
But even changing the file extension names, won't exactly prevent them from opening the file....will it? They will still be able to open it in notepad anyway.....bah, all of that stuff isn't really important, its just luxary stuff we can add in if we have the time. The tooltips however are an important commodity. And when you said change the extension when you are declaring the record, won't it only do that if you change the file extension in windows? edit: any good online tutorials would be good too.
OverwatchBut even changing the file extension names, won't exactly prevent them from opening the file....will it?[/QUOTE] No. It will make it harder for inexperienced users to open the contents externally, though. Enycryption is your best bet; in which case even if someone does get it open they won't be able to understand it anyway.OverwatchThey will still be able to open it in notepad anyway.....bah, all of that stuff isn't really important, its just luxary stuff we can add in if we have the time. The tooltips however are an important commodity. And when you said change the extension when you are declaring the record, won't it only do that if you change the file extension in windows?Nope. Delphi (and indeed many other command-based applications) takes a very literal approach to file handling, if you tell it to save a file called testing.lol to your desktop, it will save the file to the desktop and use the .lol extension. No need to rename anything from Windows. [QUOTE=Overwatch]edit: any good online tutorials would be good too.
Unfortunately I can't seem to find these tooltips, I searched for them in help and indeed there is information about them, but it has proven difficult to find. If you could point me in a direction that would be great thanx.
Delphi refers to Tooltips as 'Hints', according to the almighty reference manual.
From what I've read you have to set the ControlX.Hint (what the hint box actually says) and ControlX.ShowHint (boolean; specifies whether the hint is displayed or not) properties for each control you want to display a hint box. I've never had time to add such frivolities to any of my programs though, they're submitted for marking late enough as it is. :p
so say I had a button titled 'show Hints' would the code be the following(assuming the button I want the hints to be shown for is titled exit) btn_exit.showhint:=true; or does it have to include visible, like btn_exit.showhint.visible:=true; aaaaah confusing.
okay I just tried btn_logout.showhint:=true; and it come up bug free, but after clicking on the button that implemented this code, it didn't actually do anything.
Technically those two properties should be all you need, but since I've never used them before I don't know the correct syntax etc. Perhaps you should ask someone on a Delphi forum.
Yeah sorry about all of that double posting, but I have got it fixed. It is the following code "btn_logout.showhint:=true". It is mouse over code, so if you enter in the hint in the object inspector it should work, just gotta figure out this hash program now.
I didn't make it!
You have to check this out, It will help you now and when you get more advanced AND it has other things too, Don't forget to Register Link>>> CLICKY!