Click here to Skip to main content
Click here to Skip to main content

Star Trek LCARS controls for the Microsoft .NET Framework

, 21 Nov 2006 CPOL
Rate this:
Please Sign up or sign in to vote.
A set of controls to build LCARS computer systems.

Sample Image - lcars_net_controls.gif


To be honest, Star Trek is one of the main reasons why I love technology. Since I was a child, I dreamed about these ships and its talking computers.

Today, in several Star Trek related websites, we can see the look and feel of the ship's computers, named LCARS (Library Computer Access and Retrieval System). But in all of them, the interfaces were developed in Flash or HTML. Searching on the internet, I couldn't find any components for other platforms.

Thinking about that, I developed a simple set of LCARS controls for the Microsoft .NET framework 1.1.


The components included in the "LCARS_Toolbox.DLL" assembly are:

  • LCARS_Elbo: Elbo is the component that splits the screen in different zones.
  • LCARS_Panel: Panel is a single colored rectangle. This component could be finished by round corners.
  • LCARS_Label: Label is a rectangle with a single text on it.
  • LCARS_Button: Button is the component to execute actions and interact with the user.
  • LCARS_Sound: Sound is the component to play sounds. Only plays WAV files. Some cool sounds can be downloaded here.
  • LCARS_Date: Date is the component to display "StarDate" dates. Also offers a regular date display.


All the design, like colors and components, were based on the information available in

All the components that uses text requires the LCARS font that can be downloaded here.

The code to generate StarDate dates was based over the free JavaScript source code available from

Using the Code

All the properties required are grouped in the "LCARS" category.

To build a LCARS terminal, you must drag and drop the different controls over the form and adjust them using your own style (all the design is visual). Then, you can add some interaction like sounds and clicks.


To add sounds, you must drag a LCARS_Sound component. Then, you must add some code. There are three ways to play a sound:

  • PlayOnce (soundName): In this case, the sound is played only once, with no waits.
  • PlayOnce (soundName, wait): In this case, the sound is played only once, but waits for the sound to terminate.
  • PlayLoop (soundName): In this case, the sound is played continuously in a loop, like background sounds. To stop a looped sound, you can use the "Stop" method.

Important: Because the sounds are played using threads, if you are using a background sound, be sure to stop it before to close the application.


To add some click actions, you must drag a LCARS_Button component. Then, you must implement the "OnClick" event in the usual way.

void LCARS_Button5Click(object sender, System.EventArgs e)
    if (lCARS_Button5.Blink) {
        lCARS_Button5.Caption = "SOUND ON";
        lCARS_Button5.Blink = false;
        lCARS_Button5.BaseColor = lCARS_Button2.BaseColor;
    } else {
        lCARS_Button5.Caption = "SOUND OFF";
        lCARS_Button5.Blink = true;
        lCARS_Button5.BaseColor = "330000";

The LCARS_Button also includes some cool properties like the internal optional sound (SoundFile), the text property (Caption), and the blink feature (Blink).

Points of Interest

In the included sample, you will see a simple LCARS terminal that shows an image viewer with sounds. To compile, execute the c.bat file. Don't forget to install the LCARS font.

If you are a Star Trek fan, I hope that you enjoy this control and builds really awesome 24th century systems.



  • Second release, added new LCARS_Date control.
  • First release.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Marcelo Chavez
Web Developer
Chile Chile
No Biography provided

Comments and Discussions

Questionare you still around? Pinmemberbetterthanalemur5-Jan-10 15:02 
GeneralDate error Pinmemberbil stewart18-Aug-09 7:44 
QuestionRe: Date error PinmemberClaudio de Biasio7-Mar-11 23:19 
GeneralSource code PinmemberChris Lueke7-Aug-08 15:24 
AnswerRe: Source code PinmemberThomas Rickenbach13-Aug-08 8:25 
GeneralRe: Source code PinmemberWilliamSauron4-May-11 22:21 
GeneralSource Code Please Pinmemberophedian22-Feb-08 14:09 
Generalthread issue with sound Pinmembermarcel heeremans6-Jun-07 22:05 
GeneralPoor! Pinmemberalspocky7-Apr-07 17:21 
GeneralHoly Mackrel Pinmembernorm .net20-Mar-07 23:24 
Question** CODE ** project PinmemberJaseNet28-Nov-06 9:01 
Nice but completely useless without source. Why post it here if we can not learn anything from it?
Confused | :confused:
AnswerRe: ** CODE ** project PinmemberMatthew Hazlett28-Nov-06 12:04 
GeneralTypo Pinmembervocaro22-Nov-06 21:18 
AnswerRe: Typo PinmemberMarcelo Chavez23-Nov-06 4:59 
GeneralDifferent Pinmembercyygjwjcstsa122-Nov-06 4:45 
AnswerRe: Different? You certainly SEEM to be! PinmemberGiovannius2-Mar-09 18:51 
QuestionSource Code ? PinmemberIvan Mladenovic21-Nov-06 22:51 
AnswerRe: Source Code ? PinmemberSteffen Lange22-Nov-06 10:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150327.1 | Last Updated 21 Nov 2006
Article Copyright 2006 by Marcelo Chavez
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid