Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to make the text moving(Marquee Text) in the Pole Display.
I've used the following code
C#
public Form1()
{
    InitializeComponent();
    myExplorer = new PosExplorer(this);
    device1 = myExplorer.GetDevice("LineDisplay", "POSIFLEX_LINEDISPLAY");

    try
    {
        myDisplay = (LineDisplay)myExplorer.CreateInstance(device1);
        myDisplay.Open();
        myDisplay.Claim(1000);
        myDisplay.DeviceEnabled = true;
        myDisplay.DisplayText("Welcome to the Restaurant");
        myDisplay.MarqueeType = DisplayMarqueeType.Left;
        myDisplay.MarqueeFormat = DisplayMarqueeFormat.Walk;
        ////myDisplay.MarqueeType = DisplayMarqueeType.Left;
        ////myDisplay.MarqueeFormat = DisplayMarqueeFormat.Walk;

        statusLabel.Text = "Line Display Ready";
        myDisplay.Close();
    }
    catch
    {
        statusLabel.Text = "Line Display Not Found!";
    }
}


It is a two line display unit. But the marquee effect(text moving) not working. Can anyone help me on this?

Then I've use following methods to do it, but I'm struggling in the timer control.
C#
private static string GetDisplayStringSplitByIndex(string displayString, int index)
{
    return Form1.GetPaddedStringForDisplay(displayString.Substring(index) + displayString.Substring(0, index));
}

private static string GetPaddedStringForDisplay(string displayString)
{
    if (displayString.Length > Form1.displayLineWidth)
    {
        return displayString.Substring(0, Form1.displayLineWidth);
    }
    else
    {
        return displayString.PadRight(Form1.displayLineWidth);
    }
}


Need help.

Thanks in advance.
Posted
Updated 11-Jun-13 20:24pm
v3

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900