Attribute VB_Name = "ISO" '---------------------------------------------------------------------------------------- ' ' File: ISO.BAS ' ' Author: Roberto Raso ' Date: 12th April 1995 ' '---------------------------------------------------------------------------------------- ' ' Purpose: Provide functionality to access MassLynx isotope modelling. ' '---------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------- ' ' Constant/Global declarations. ' '---------------------------------------------------------------------------------------- Option Explicit Const MODULE_NAME = "ISO.BAS" Const IDM_SPE_ISOTOPE = 104 Const IDC_FORMULA = 1005 Const IDC_ADD = 116 Const IDC_REPLACE = 117 Const IDC_NEW = 118 Const DLG_CAPTION = "Isotope modelling" Const MSG_ERROR = "Isotope model" '---------------------------------------------------------------------------------------- ' ' Data type declarations. ' '---------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------- ' ' Function declarations. ' '---------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------- ' ' Variable declarations. ' '---------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------- ' ' Process: GetFormPos ' ' Author: Roberto Raso ' Date: 5th September 1994 ' ' Purpose: Gets the VB window position and writes it to ' the RECT parameter lpFormPos. ' ' Parameters: wInt the... ' ' Return: Void. ' '---------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------- ' ' Process: Isotope ' ' Author: Roberto Raso ' Date: 12th April 1995 ' ' Purpose: Drives the MassLynx isotope routine. ' ' Parameters: strFormula is the chemical formula for the compound. ' nMode is either REPLACE, ADD or NEW_WINDOW. ' ' Return: True if successful. ' '---------------------------------------------------------------------------------------- Function Isotope(strFormula As String, nMode As Integer) As Integer Dim hSpec As Long Dim hIso As Long Dim hFormula As Long Dim hError As Long Dim nRadioOn As Integer Dim lMsgRtn As Long Isotope = False hSpec = SpechWnd() If hSpec Then hIso = MnuDlg_Disp(hSpec, IDM_SPE_ISOTOPE, DLG_CAPTION, 5, True) hFormula = GetDlgItem(hIso, IDC_FORMULA) lMsgRtn = SendMessageText(hFormula, strFormula) Select Case nMode Case ADD nRadioOn = IDC_ADD Case REPLACE nRadioOn = IDC_REPLACE Case NEW_WINDOW nRadioOn = IDC_NEW End Select Call CheckRadioButton(hIso, IDC_ADD, IDC_NEW, nRadioOn) lMsgRtn = PostMessage(hIso, WM_COMMAND, IDOK, 0) hError = WaitForChildWindow(hIso, MSG_ERROR, 5) If hError Then lMsgRtn = SendMessage(hError, WM_COMMAND, IDCANCEL, 0) lMsgRtn = PostMessage(hIso, WM_COMMAND, IDCANCEL, 0) Else Isotope = True End If End If End Function Sub TestFunc() Dim nReturn As Integer Dim aChroPt() As CHROMATOGRAM nReturn = ChroReadChromatogram("V50", "TIC", 1, 0, 0, False, aChroPt()) End Sub