AnsweredAssumed Answered


Question asked by VRFuser on Feb 21, 1996
from: Greg Goebel / HP-MXD / 970-679-2305 / FAX 970-679-5971
to:   Alberto Schroth / VRf
date: Thursday, 22 February 1996 1317 MST

> My company purchased HP VEE (v3.12) in December, and I have been
> learning to program in this visual language since beginning of January.
> I have a question regarding panel views.
> This is what I'm trying to do:  I'm writing a program to control a
> HP3852 Data acquisition Unit to scan temperatures and voltages. 
> However, I have more data that can be shown on one screen.  I was
> hoping to be able to create another panel view(user-function or object)
> to display the rest of my data that isn't shown on my primary panel
> view.
> The problem is: when a panel is brought up, the program halts until I
> close that panel.  This is no good since I'm am also controlling
> temperatures using power supplies off my program, therefore i need the
> data logger to continuously scan data while these different panels are
> viewed.
> Has anyone had any luck accomplishing this?  I was able to solve this
> problem in HP Basic.
> Background Info:  I'm running HP Vee (v3.12) on a Pentium 90 computer,
> 32Mb RAM.  I have the HP82335 card with HP-IB bus port.
> Alberto Schroth
> Hughes Aircraft Company
> 818-776-9334 Home
> 310-616-4212 Work

As one responder quite correctly said, you can use "showpanel()" and
"hidepanel()" to do this quite neatly.  This is a little obscure so I will
send you some notes.  Note that some of the games shipped with VEE, like Wheel
of Fortune, use this trick all over the place.  (I keep buggin' the lab guy
who does these things to leave a bigger trail of breadcrumbs behind him so
the rest of us can figure out what he's done, but he just likes putting
together those games anyway.)

[%%] regards -- gvg


* VEE 3.X introduced four functions to control the appearance and
disappearance of a UserFunction pop-up panel:

   showPanel( UFname )
   showPanel( UFname, x, y )
   showPanel( UFname, x, y, width, height )
   hidePanel( UFname )

(UserFunctions are described in detail in later chapters.)  These functions
allow displays to be created "dynamically" instead of having to rely on a
fixed VEE user interface.

The game programs that are shipped with VEE 3.X illustrate some of the
interesting things that can be done with dynamic displays, but are rather
complicated to explain here.  As a simpler example, consider the use of these
functions to build a "nonmodal" popup.

The Dialog boxes introduced in VEE 3.X have proven popular, but some people
are upset that they are strictly "modal" -- that is, when the program pops
one up, everything stops running until the user makes it go away or it times
out.  Some people need to be able to display a pop-up while the program is
doing something (to tell the user to wait, for instance) and the standard
dialogs can't do that.

You can do this with "showPanel()" and "hidePanel()', however.  To show how
this is done, I created a User Function named "PopUp" that consisted solely of
a Label object containing the text "Please Wait ... " in nice big black
letters, glued to the Panel View of the User Function.  Then I wrote the
following program:

           | Start |
   | showPanel( "PopUp" ) |
   +-----------+----------+     +---------------+
               |                | AlphaNumeric  |
   +-----------+----------+     +---------------+
   | For Count [ 5 0 -1 ] +---->|               |
   +-----------+----------+     +-------+-------+
               |                        |
   +-----------+----------+       +-----+-----+
   | hidePanel( "PopUp" ) |       | Delay (1) |
   +----------------------+       +-----------+

I put the Start button and the AlphaNumeric display on the Panel View; when
I hit Start, the popup came up and told me to "Please Wait ... " while the
count went down to 0, and then obediently vanished.

Note how you can provide optional parameters to "showPanel()" to specify
the placement (and size) of the pop-up; it comes up centered if they are not