NI Home
Cart Cart | Help
Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Currently Being Moderated

Teasing Homer Simpson

VERSION 5

Created on: Jun 9, 2009 4:28 AM by RER - Last Modified:  Jan 19, 2010 7:47 AM by RER

A light hearted aside or full-blown procrastination?? You decide!

Functional Description

A simple little application which allows you to tease one the greatest TV characters of all time. When you run the vi, the mouse cursor will become a donut and Homer Simpson’s eyes will follow the cursor around the screen.

 

HomerApp Block Diagram.JPG

 

 

For a simple, fun, little application, this one does show a number of interesting design features, including…

      -      Custom Controls (Strict Type Defs), allowing a simple Dial Control to mimic Matt Groening's distinctive eye design.

-      Relative File Paths, which allows the application to locate the .cur file correctly when running on machines other than the development PC.

-      Event Driven Programming, for efficient non-polling applications

-      Windows DLL interaction, to programmatically change the cursor object.

-      LabVIEW’s Maths and Trigonometry functions to determine the cursor position from the central (0,0) front panel position.

 

 

 

HomerApp FrontPanel.JPG

 

 

Caveats and Additional Notes

 

To completely unclutter the user interface I have hidden the front panel controls and indictors from view. This includes a few numeric indicators that I used for debugging and a Boolean stop button. However, I have associated the F10 keyboard button with the stop control (done via the properties menu for the stop button), so you can stop programmatically stop the application by hitting the F10 button.

 

 

If you terminate the application by aborting execution, the mouse cursor would not revert back to the original LabVIEW cursor. Therefore, I have prevented user accessing the abort button by setting the application’s “window appearance” as “dialog box”. You can do this through the vi property menu.

 

 

The application does break one cardinal rule of good front panel design – I have placed controls on top of an image. This means that every time the control changes, LabVIEW has to redraw the “background” image also. In this particular case, the application is not particularly processor intensive (and the image is fairly low res) so it does not matter – just please be aware that it is not generally good design practice.

 

 

 

Required Software

 

To run this application you will require nothing but LabVIEW 8.6 (full or above).

 

Downloads:
Average User Rating
(10 ratings)




TylerC TylerC  says:

Love this... ha ha

Dr.Doiron Dr.Doiron  says:

What a cool program and great explanation! You even noted the controls on picture issue, wow I am impressed, you rock!

VincentCarpentier VincentCarpentier  says:

Nice App.

 

On a side note, you would need LV Full or Pro because there is the Event structure in the VI.

 

Vincent

pallen pallen  says:

Fun app.

 

....I'm kinda hungry for a donut now though.

More Like This

  • Retrieving data ...