Note that Application.ProcessMessages is called by the LCL automatically after every message (eg after every event like OnClick). Any other sleep is almost always bad programming. This has a special meaning and means relinquish time slice. Application.ProcessMessages handles all waiting system messages in an application's message queue. You have to give the OS the time to process its message queue. In such a case use Application.ProcessMessages instead of sleep(n) which is blocking. Windows has a messaging system (see ) and uses messages to "talk" to all running applications. See Daemons and Services Using sleep(n) and Application.ProcessMessages Lazarus and FPC make writing Windows services easy. You can use ActiveX controls in recent Lazarus versions. See possible Windows implementation ActiveX controls Importtl.exe C:\Windows\system32\oleacc.dllĪnd it will generate the type library pascal unit Accessibility_1_1_TLB.pas in the folder where it is.Ĭreating a library which exports a COM objectĪvailable since Windows 7. You can call it, for example for MSAA like this: A pre-compiled binary of this program can be found here: Use the program importtl which is located in Free Pascal in fpc/utils/importtl. The first step to import and use a COM library is generating the interface definitions from it. See Windows specific issues for more details.ĬOM Programming Importing and using a COM library While you can use Windows-only code (such as the windows unit), with a little care you can often prepare for cross-platform use (e.g. Writing cross-platform code that works on Windows Omitting this option creates a console application (same as passing -WC). No console is shown, writeln and readln are not possible, you will get File not open errors. See Project Options / Compiler Options / Linking / Target OS Specific options / Win32 GUI application. The most prominent options are the -W flags. Inno Setup Usage - How to create setup files with File Association support.Windows Icon - How to design your icon with the right sizes.Aero Glass - How to apply Aero Glass effect in a Lazarus Form on Windows 7.High DPI - How to make your application DPI-aware on Windows 7.10.3 FPC 2.6.x/Lazarus warning (Missing support for SEH).10.2 Lazarus 32 bit: External SIGSEGV exception when running with debugging.10.1 A referral was returned from the server.9.16 Retrieving hard disk serial number etc.9.15 Task bar icon not showing on secondary monitor.9.9 Getting special folders (My documents, Desktop, local application data, etc).9.4 Using Windows native wininet for web retrieval.9.3 Showing Memory, Disk Space Information.9.2 Ensure only a single instance can run.7 Using sleep(n) and Application.ProcessMessages.4.2 Creating a library which exports a COM object.3 Writing cross-platform code that works on Windows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |