Contents: This file contains two code fragments that show how to open a DDE conversation with Nova for Windows usin Visual Basic. The first file is by Pablo Garcia and the second is by Dave Lamont. We appreciate their willingness to release this information. /********** CODE FOR INTERFACING WITH NOVA DDE SERVER**************/ /************* by Pablo GARCIA - EA4TX ********************/ Create a New VB Projet In a VB Form Include a TEXT BOX and a BUTTON CONTROL The TEXT BOX is named: Text1 The BUTTON CONTROL is named: CmdOpenNovaDDE When the user clicks on the BUTTON Control, the following code is executed. This is just the necesary code to interface with the Nova DDE Interface Private Sub CmdOpenNovaDDE_Click() Dim Ret As Integer ' if there is any error, the program will jump to this label On Error GoTo DDE_Nova_Error ' I verify the Link is closed Text1.LinkMode = 0 ' I define the Aplication Name and Topic Text1.LinkTopic = "NFW32|NFW_DATA" ' I define the Item Name Text1.LinkItem = "NFW_SERVER" ' I Open the Nova DDE Interface as Automatic Mode Text1.LinkMode = 1 ' I send the "TUNE ON Command to the NOVA DDE Server Text1.Text = "TUNE ON" ' Transmite the previous message to the DDE Server Text1.LinkPoke ' All is Ok so I exit the Sub Procedure Exit Sub DDE_Nova_Error: ' If the DDE Interface failed, maybe Nova is not loaded ' or the AutoTracking Status Box is not displayed in NfW. ' At "Err.description" I get the Error Description and I Display it Ret = MsgBox("Error Opening the Nova DDE interface, Error: " & Err.Description, vbCritical, "Nova DDE Error") ' I clear the Error and exit Sub Err.Clear End Sub /********* CODE FOR INTERFACING WITH NOVA DDE SERVER - END************/ -------------------------------------------------------------------- ------------------ Code below is by Dave Lamont ------------------- -------------------------------------------------------------------- Begin VB.Label lbl_Nova_dde BackColor = &H0000FFFF& Caption = "nova dde" BeginProperty Font Name = "Arial" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 270 Left = 1680 LinkItem = "NFW_SERVER" LinkTopic = "NFW32|NFW_DATA" TabIndex = 62 Top = 420 Visible = 0 'False Width = 645 End Private Sub send_dde_Click() On Error GoTo fixx send_dde.LinkMode = 2 send_dde.Text = "TUNE ON" send_dde.LinkPoke send_dde.LinkMode = 0 Exit Sub fixx: NL$ = Chr$(13) + Chr$(10) msg$ = " The NOVA program called NFW32.EXE" + NL$ msg$ = msg$ + " is not running or installed." + NL$ + NL$ MsgBox (msg$) End End Sub Public Sub lbl_Nova_dde_Click() ' This event is called by the main UNI_TRAC program loop 'on demand by a statement lbl_Nova_dde_Click ' The properties of the event with respect to NOVA in the 'Visual Basic 6 environment are 'LinkItem NFW-SERVER 'LinkTopic NFW32|NFW_DATA Dim novlen As Integer Dim aax(10) lbl_Nova_dde.LinkMode = 2 '2 =manual. i.e. get DDE by program manipulation lbl_Nova_dde.LinkRequest 'ask for latest DDE information from Nova tmp = lbl_Nova_dde.Caption ' DDE from Nova appears as string here novlen = Len(lbl_Nova_dde.Caption) If novlen > 10 Then aax(1) = InStr(1, lbl_Nova_dde.Caption, "AZ") + 3 aax(2) = InStr(1, lbl_Nova_dde.Caption, "EL") + 3 aax(3) = InStr(1, lbl_Nova_dde.Caption, "RR") + 3 satel$ = Trim(Left(lbl_Nova_dde.Caption, (aax(1) - 4))) End If End Sub