Εμφάνιση αναρτήσεων με ετικέτα Application. Εμφάνιση όλων των αναρτήσεων
Εμφάνιση αναρτήσεων με ετικέτα Application. Εμφάνιση όλων των αναρτήσεων

Σάββατο 25 Ιανουαρίου 2014

Closing an android XE5 application

Uses FMX.Helpers.Android;


...

Procedure Tform1.Button1Click(Sender: TObject);
Begin
   SharedActivity.finish;
End;

Κυριακή 13 Μαΐου 2012

Calling CreateProcess() the easy way

If you look up the CreateProcess() function in Win32 help, you'll notice that there are more than three dozen parameters that you can optionally setup before calling it. The good news is that you have to setup only a small number of those parameters to make a simple CreateProcess() call.

Animate tray application windows as they open and close

Have you noticed that when you close the window of a tray application it often doesn't actually close the application but simply hides the window and leaves the application running in the tray: it effectively minimizes the application to the tray. There's usually no visual clue that this has happened as there would be if you minimized a normal application.

Παρασκευή 11 Μαΐου 2012

Flash application button on taskbar

If your application is minimized and you still want to alert user, you should flash icon on taksbar instead of bring your application to front. Here is how to do it…

Set priority level of running application (process)

Using SetPriorityClass function, you can set priority level of your running application. Same functionality is in the Task Manager (just rightclick the process in the list and select priority level).

Create autorun registry key (run application with Windows start)

To run your application automatically after Windows starts, you just need to create an entry in autorun registry key.

Animate application icon (on taskbar and apllication window)

This trick is pretty simple. You just need few icons (at least two) for animation and Timer component. The rest is easy…

Just one instance of application

If want to allow users to run just one instance of application, one of possible methods is to use “mutext” (mutual exclusion).

Application version

Using this simple function, you will be able to read version information from any application executable. It’s very useful for example to show your own application version on title bar or “About” dialog.

How to prevent moving of application window

If you want to “lock” your application window position and prevent user from moving it, it’s really simple.

How to detect application associated with file

To get full path to application associated with any file type, we need standard ShellAPI unit and the rest will do the FindExecutable function.

Run application only once per windows-session

Using this simple tip, you can block your application to be executable only once per windows sessions. To run application again, Windows must be restarted before.