Main Site Documentation

Window instaniation Issue?


I have noticed an issuewith the use of the parameterless construction for Window.

Illustrated below:

using System;
using System.Threading;
using Microsoft.SPOT;

using GHIElectronics.NETMF.Hardware;

using GHIElectronics.NETMF.Glide;
using GHIElectronics.NETMF.Glide.Display;
using GHIElectronics.NETMF.Glide.UI;

namespace BasicTesting
    public class Program
        //static Window window;           
        public static void Main()         
            Window window; 
 #if true
            // this works
            window = new Window("main", 320, 240);
            // this results in a NullException when 
            // Glide.MainWindow = window; is executed
            window = new Window();
            window.Name = "main";
            window.Width = 320;
            window.Height = 240;
            window.BackColor = Microsoft.SPOT.Presentation.Media.Color.White;

            TextBlock tb = new TextBlock("tb1", 255, 50, 50, 50, 24);
            tb.Text = "Testing";


            Glide.MainWindow = window;


Shot in the dark, having only Pandas here: does it still explode if you set it up in portrait mode?


It an issue with two ways of creating the same object. One way works and the other does not.

I don’t thnk Glide has the concept of portrait and landscape modes.


Glide can run on any resolution and in portrait mode but glide needs devices with over 8mb of ram so panda is not an option

Please use new posts for new question in future.


I had weird things with feztouch with switching between those modes… Like I said, it was a bitofa shot in the dark.

window.Graphics = new Bitmap(320, 240);