Windows Declare Book updated (Xojo API2)

The book “I WIsh I Knew How To…Implement API2 Declares with Xojo on Windows” has been updated to version 4.3. This is a free update for those who have purchased previous 4.x version of this book. Here are a list of the updates:

New to Version 4.3 — July 2021

  • Explained Stucture Union in Chapter 33
  • Add SendInput for a keyboard Virtual Key (Example 33-1)
  • Add SendInput for a Mouse key (Example 33-2)
  • Added Virtual Key Code constants (Appendix CR)
  • Added MouseFlag Code constants (Appendix CS)
  • Added tagINPUT structure description and MB equivalent for 32-bit and 64-bit compatibility
  • Added SendInput function for completeness and 32-bit and 64-bit compatibility

The purpose of this update is to add a functioning SendInput declare that can send key strokes and mouse commands to the program. An example would be to press combined keys (such as Alt+S+A at the same time). A keyboard example to minimize/maximize desktop windows by pressing the Win+D key is added which uses Windows Virtual Keys (VK_).

A custom Xojo method (SendInputKeyboard) was created to make it easier to work with this declare x86 and x64 systems. Below is a snippet of example code:

This above code shows: 1) pressing down the Win key, 2) pressing down the D key, 3) Lift the D key up, and 4) lift the Win key to perform the Win+D minimize/maximize action.

The book is over 1100 pages and has more than 150 working examples using Windows API Declares with Xojo.



Is there a link for this book?

Hello @Greg_O,

I just received your response (12 Mar 2022), sorry for the delay.

The link to the book is either at: Implement Windows Declares in Xojo - Xojo API 2, or at


Thank you. I always struggle with Windows declares for some reason while macOS is a breeze for me.

1 Like