Preparing Visual Basic programs in Windows

Information to consider when using Microsoft Visual Basic programs on Windows.

From Version 9.0, IBM MQ support for Microsoft Visual Basic 6.0 is deprecated. IBM MQ classes for .NET are the recommended replacement technology. For more information, see Developing .NET applications.

Note: 64-bit versions of the Visual Basic module files are not supplied. To prepare Visual Basic programs on Windows:
  1. Create a new project.
  2. Add the supplied module file, CMQB.BAS, to the project.
  3. Add other supplied module files if you need them:

    • CMQBB.BAS: MQAI support
    • CMQCFB.BAS: PCF support
    • CMQXB.BAS: Channel exits support
    • CMQPSB.BAS: Publish/subscribe

See Coding in Visual Basic for information about using the MQCONNXAny call from within Visual Basic.

Call the procedure MQ_SETDEFAULTS before making any MQI calls in the project code. This procedure sets up default structures that the MQI calls require.

Specify whether you are creating an IBM MQ server or client, before you compile or run the project, by setting the conditional compilation variable MqType. Set MqType in a Visual Basic project to 1 for a server or 2 for a client as follows:
  1. Select the Project menu.
  2. Select Name Properties (where Name is the name of the current project).
  3. Select the Make tab in the dialog box.
  4. In the Conditional Compilation Arguments field, enter this for a server:
    MqType=1
    
    or this for a client:
    MqType=2