Tech Note 35: Issues and Workarounds

April 3, 2006

© NSB Corporation. All rights reserved.

Notes and Warnings

  1. EmCE: This is an emulator for VBScript that runs on the desktop, which
  2. Programs created using the desktop IDE can be opened in the device IDE (and vice versa). However, the device Visual Designer cannot be used to edit programs created using the desktop IDE.
  3. Under Windows 98SE, opening a project by double clicking on it can have inconsistant results. Open it from NS Basic's file dialog if you are having problems.

Known Problems that are Microsoft's

  1. INPUTBOX does not size properly on Palm-size PC screen and does not work on Pocket PC and HPC 2000. This command is built into Microsoft's software. You can use the InputBox function that is part of the DialogX control to do the same thing. Putting this in your program will override the faulty InputBox function. (DialogX also provides additional functionality not contained in InputBox.)
    	FUNCTION INPUTBOX(prompt, title, default)
    	  IF ISEMPTY(NSBIB) THEN
    	    ADDOBJECT "DialogX", "NSBIB_Dlg", 0, 0, 0, 0
    	    SET NSBIB=NSBIB_Dlg
    	  END IF  
    	  INPUTBOX = NSBIB.InputBox(prompt, title, default)
    	END FUNCTION  'INPUTBOX
    
    	X=InputBox("Message area", "INPUTBOX Example", "Default Text")
  2. CommonDialog ActiveX Control on Palm-size PC: the showColor method is not supported and the showFont method not resized for Palm-size screen. Microsoft has admitted this is a result of working to get that product out quickly.
  3. On HP 680 devices, the INPUTBOX function causes an Out of Memory error. The cause appears to be HP using a bad build of VBScript.dll in their ROM. Use the Script68 install module to fix this.
  4. On Palm-size devices, concatenating a string to a boolean causes an error.
  5. The EVAL statement doen't work on some devices. This appears to be a problem in Microsoft's compiler. Workaround: use Execute instead.
  6. Date Object: Do not use a MSGBOX statement inside the Change event: it goes into a click event loop as MSGBOX generates its own events.
  7. FormatNumber and FormatCurrency functions on Pocket PC yield incorrect results. Here is some code to correct this (thanks to Charl Van Schoick )
    Function formatNum(n,d,l,p,g)
      formatNum=fixformat(formatnumber(abs(n),d,l),n,d,l,p,g,0)
    End Function
    
    Function formatCur(n,d,l,p,g)
      formatCur=fixformat(formatcurrency(abs(n),d,l),n,d,l,p,g,1)
    End Function
      
    Function fixformat(fn,n,d,l,p,g,a)
      If g Then
         g=mid(",.",instr(".,",mid(cstr(1/10),2,1)),1)
         l=Len(fn)
         If d Then l=l-d-1
         While l>3+a
            l=l-3
            fn=mid(fn,1,l) & g & mid(fn,l+1)
         Wend
      End If
      If n<0 Then
           If p Then
           fn="(" & fn & ")"
       Else
           fn="-" & fn
        End If
       End If
      fixformat=fn
    End Function