VistaVue 4.0 DDE Commands

Application : VISTA
Topic: SYSTEM
Topic Item: VISTACMD
Topic Item: VISTADATA


For most commands, theVISTACMD and the VISTADATA topic items are used as a team.  The VISTACMD must always be sent first, followed by the VISTADATA command that usually passes a filename or parameter to VistaVue.


Note: All examples are shown in MS Access code format:
Note: A program called VistaVue 4.0 DDE Experimenter is included that can be used as a tool for testing and trying the following DDE commands on VistaVue.  More information on this program is included at the end of this document.


Initiate Contact with VistaVue:

Dim Chan, I   ' Declare variables.
    On Error Resume Next
    Chan = DDEInitiate("VISTA", "System")   ' Establish  link.
    If Err Then             ' If error occurs, VistaVue
        Err = 0                 ' isn't running. Reset error
        I = Shell("c:\vista\vista.exe ", 1)   ' and start VistaVue
        If Err Then Exit Sub    ' If another error, exit.
        Chan = DDEInitiate("VISTA", "System")   ' Establish  link.
    End If


LoadFile	Loads a file into VistaVue, picks the first open window available
LoadFile1	Loads a file into VistaVue directly into Window #1
LoadFile2	Loads a file into VistaVue directly into Window #2
LoadFile3	Loads a file into VistaVue directly into Window #3
LoadFile4	Loads a file into VistaVue directly into Window #4

	Syntax:  1. Send LOADFILE via Topic Item: VISTACMD
		2. Send Filename via Topic Item: VISTADATA

TopicList = DDERequest(Chan, "VistaCmd")   'Send Profile command to VistaVue.
    DDEPoke Chan, "VistaCmd", "LOADFILE"
    TopicList = DDERequest(Chan, "VistaData")   'Send full filename with volume and path
    DDEPoke Chan, "VistaData", "C:\mydir\myfile.jpg"



maximize	Maximizes VistaVue back from minimized state
minimize	Minimizes VistaVue, stores window setting
	Syntax:  1. Send maximize or ,inimize via Topic Item: 
		    VISTACMD (VISTADATA is not used)


OffMain		Resets main window back to current profile format
OffWin1	Resets Image window #1 back to current profile format
OffWin2	Resets Image window #2 back to current profile format
OffWin3	Resets Image window #3 back to current profile format
OffWin4	Resets Image window #4 back to current profile format

	Syntax:  1. Send Offmain via Topic Item: VISTACMD	(VISTADATA is not used)


Print		Sends a image to the printer in its original size (automatic, no user dialog).
Print2Fit 	Sends a image to the printer Fit to Page (automatic, no user dialog).
		Note: The above print commands automatically print all pages of a file (DCX,TIFF).
		Note: When printing a multi-page image, a page is ejected before the session

	Syntax:  1. Send PRINT via Topic Item: VISTACMD
		2. Send Filename via Topic Item: VISTADATA


Profile		Loads one of 10 user defined profiles into memory.
		Profile names are: Vista0.dat (Default), Vista1.dat to Vista9.dat

	Syntax:  1. Send PROFILE via Topic Item: VISTACMD
		2. Send Filename via Topic Item: VISTADATA


SetMain		Set the Main Windows upper X & Y position, width & height
SetWin1		Set Image Window #1 upper X & Y position, width & height
SetWin2		Set Image Window #1 upper X & Y position, width & height
SetWin3		Set Image Window #1 upper X & Y position, width & height
SetWin4		Set Image Window #1 upper X & Y position, width & height

	Syntax:  1. Send SETWIN1 via Topic Item: VISTACMD
		2. Send  x, y, width, height   (all units in screen pixels, seperated by comma's)
		i.e. 10,10,300,300	(Minimum height and width are 10 pixels)


TbarFile		Turn on or off the File Toolbar  (VISTADATA : 0 = on, 1 = 0ff)
TbarView	Turn on or off the View Toolbar  (VISTADATA : 0 = on, 1 = 0ff)
TbarEdit	Turn on or off the Edit Toolbar  (VISTADATA : 0 = on, 1 = 0ff)

	Syntax:  1. Send TBARFILE via Topic Item: VISTACMD
		2. Send  0 to turn on the toolbar, 1 to turn off


ShutDown	Terminates VistaVue without saving changes or modifications to the profile file.

	Syntax:  1. Send SHUTDOWN via Topic Item: VISTACMD (VISTADATA is not used)



VistaVue 4.0 DDE Experimenter:

The Experimenter program includes all available DDE commands loaded into the pull down menu.  Before sending a command you must have VistaVue loaded in memory.  If you would like to start VistaVue in a minimized state, regardless of any profiles then pressing the "Load VistaVue" button issues the following:

ie. C:\Vista\Vista.exe /DDE	The /DDE after Vista.exe causes VistaVue to load and minimize.

Once you select a command, press OK.  A new dialog will appear with the VISTACMD located at the top and for most commands a blank entry for the VISTADATA.  Enter your data string on the VISTADATA line and press POKE to send all DDE commands to VistaVue.




DDE REQUEST COMMANDS:

- applications can now retrieve the filename(via DDE) of a VistaVue window.
   Window #1	VistaWIN1
   Window #2	VistaWIN2
   Window #3	VistaWIN3
   Window #4	VistaWIN4
   The VistaWIN(#) variable can be read by using the DDE request command.