IManagementDatabase.SetMacroButton Method

Adds / Defines a macro button and places it in the Automation menu.
Sub SetMacroButton( _ 
ByVal buttonNumber As Integer, _ 
ByVal visible As Integer, _ 
ByVal text As String, _ 
ByVal toolTip As String, _ 
ByVal pngImagePath As String, _ 
ByVal size As Integer
)
This language is not supported or no code example is available.
void SetMacroButton( 
int buttonNumber
int visible
string text
string toolTip
string pngImagePath
int size 
)
This language is not supported or no code example is available.

Parameters

buttonNumber
int

Valid values are 1 - 19.

visible
int

Set to 1 to display the button, any other value to hide it.

text
string

The text which appear below the button.

toolTip
string

The tooltip text associated with the button.

pngImagePath
string

The full path to a .PNG image. A default image is used when left blank. The path may use various placeholders or even refer to an embedded file, see Remarks for more details.

size
int

  • 0 -  Large button with text
  • 1 - Small button without text
  • 2 - Small button with text

Remarks
 
Buttons are dynamically displayed according to the active database. When focus is given to another database, macro buttons may change. This function is typically called by the Events macro in the On_Open_Database event.

The pngImagePath may contain various placeholders or even refer to an embedded file. Recognized placeholders:

  • ..\ refers to the installation folder, e.g.  ..\Samples\Stuff_4_Macros\User_macro_32.png
  • <INTERNAL> followed by a file name means that the file is embedded in the database.
  • <USER_NAME> is replaced with the current user name
  • <PROFILE_PATH> is replaced with the current user profile folder
  • <TEMP_PATH> is replaced with the current temp folder
  • <DESKTOP_PATH> is replaced with the current desktop folder
  • <MY_DOCUMENTS_PATH> is replaced with the current My Document folder
  • <INSTALL_PATH> is replaced with the QDV installation folder 
Version
 
Available since QDV 7.14.525.

.NET Framework

Supported in: 4.8, 4.7, 4.6, 4.5.2

In this article

Definition