Windows ce 5.0 random keypress generator

Dec 19 2007 10:47 AM
hi all,

I was wondering what would be the best way to simulate random keystrokes on a timer to test an application I am developing (something to leave on at night). It doesn't have to be smart at all. I tried using Sendkeys, however that does not work for CE edition of c#.

thusfar I have do the following to create (using a 1 second timer interval):

randomkey++;
            if (randomkey == 15)
            {
                randomkey = 0;
                int random = randomclass.Next(0, 1);
                switch (random)
                {
                    case 0:
                        e = new KeyEventArgs(Keys.F1);
                        break;
                    case 1:
                        e = new KeyEventArgs(Keys.F2);
                        break;
                }

any help would be appreciated,
Christopher Williams