Pascal/Delphi 9 replies

Please wait...

Overwatch

Woot!

50 XP

6th June 2005

0 Uploads

1,189 Posts

0 Threads

#1 12 years ago

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.




Rookie VIP Member

128,030 XP

3rd May 2005

0 Uploads

11,953 Posts

0 Threads

#2 12 years ago

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);

<>




Overwatch

Woot!

50 XP

6th June 2005

0 Uploads

1,189 Posts

0 Threads

#3 12 years ago

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.




Rookie VIP Member

128,030 XP

3rd May 2005

0 Uploads

11,953 Posts

0 Threads

#4 12 years ago
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.

:google:




Overwatch

Woot!

50 XP

6th June 2005

0 Uploads

1,189 Posts

0 Threads

#5 11 years ago

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.




Rookie VIP Member

128,030 XP

3rd May 2005

0 Uploads

11,953 Posts

0 Threads

#6 11 years ago

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




Overwatch

Woot!

50 XP

6th June 2005

0 Uploads

1,189 Posts

0 Threads

#7 11 years ago

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.




Rookie VIP Member

128,030 XP

3rd May 2005

0 Uploads

11,953 Posts

0 Threads

#8 11 years ago

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.




Overwatch

Woot!

50 XP

6th June 2005

0 Uploads

1,189 Posts

0 Threads

#9 11 years ago

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.




Guest

I didn't make it!

0 XP

 
#10 11 years ago

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!