Hi,
I am using the following C# program .NET Micro Framework to print “Hello” on a different line once a second on the G400-D dev board LCD (which has 480 by 272 pixel). It is fine.
After I change the LCD hardware to 800 by 480 pixel (a large size), then it only prints out “Hel” and only print in a 480 by 272 pixel area.
Then I changed statement to “static Bitmap LCD = new Bitmap(800, 480);” to match the new LCD size, then nothing prints out.
What is the problem?
I attached code here:
public class Program
{
static Bitmap LCD = new Bitmap(480, 272);
//static Bitmap LCD = new Bitmap(800, 480);
static int count = 0;
static int y = 5;
static Font MyFont = Resources.GetFont(Resources.FontResources.NinaB);
public static void Main()
{
int tot_hight = 0;
tot_hight = 272; //800 by 480
while (true)
{
LCD.Clear();
LCD.DrawText("Hello!", MyFont, ColorUtility.ColorFromRGB(250, 0, 0), 5, y);
y += 15;
LCD.Flush();
if (y >= tot_hight)
{
y = 5;
}
Thread.Sleep(1000); // 1.2s
}
}
}