Click here to Skip to main content
15,888,610 members
Home / Discussions / C#
   

C#

 
GeneralPainting one control's graphics onto another ctrl Pin
sortamusic17-Aug-04 10:37
sortamusic17-Aug-04 10:37 
GeneralRe: Painting one control's graphics onto another ctrl Pin
Stanciu Vlad18-Aug-04 1:05
Stanciu Vlad18-Aug-04 1:05 
GeneralRe: Painting one control's graphics onto another ctrl Pin
sortamusic18-Aug-04 7:38
sortamusic18-Aug-04 7:38 
GeneralRe: Painting one control's graphics onto another ctrl Pin
Stanciu Vlad27-Aug-04 3:21
Stanciu Vlad27-Aug-04 3:21 
GeneralTransparencyKey not working correctly Pin
3Dizard17-Aug-04 9:04
3Dizard17-Aug-04 9:04 
GeneralRe: TransparencyKey not working correctly Pin
Stanciu Vlad18-Aug-04 0:47
Stanciu Vlad18-Aug-04 0:47 
GeneralRe: TransparencyKey not working correctly Pin
leppie18-Aug-04 4:00
leppie18-Aug-04 4:00 
GeneralError while deploying with the emulator Pin
mathon17-Aug-04 7:50
mathon17-Aug-04 7:50 
hello,

here i have a code fragment i want to execute with the Pocket PC Emulator or my real Pocket Pc Device:

using System;
using System.Runtime.InteropServices;
using System.Threading;
using System.IO;

namespace SmartDeviceApplication1
{

class Test
{


static AutoResetEvent evt;
static int count = 5;

static void Main(string[] args)
{
if (args.Length > 0)
{
try
{
count = int.Parse(args[0]);
}
catch (Exception e)
{
e.ToString();
}
}

evt = new AutoResetEvent(false);
Timer t = new Timer(new TimerCallback(TimerCallback), null, 0, 5000);
evt.WaitOne();
}

static void TimerCallback(object state)
{
Console.WriteLine("Enumerating windows at {0:t}...", DateTime.Now);
string title = new string('\0', 260);

int ret = GetWindowText(GetForegroundWindow(), title, 260);
if (ret != 0)
System.Console.WriteLine(title.Substring(0, ret));


}

[DllImport("user32.dll")]
static extern bool EnumWindows(EnumWindowsProc proc, IntPtr lParam);

delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);

[DllImport("user32.dll", CharSet=CharSet.Auto)]
static extern int GetWindowText(IntPtr hWnd, [Out] string title,
int maxCount);

[DllImport("user32.dll")]
private static extern IntPtr GetForegroundWindow();

}
}
But when i want to deploy the foolowing error occurs:

A managed MissingMethodException
occured at
Test:TimerCallback+0x25

Test:TimerCallback+0x25
Timer:ring+0x59

Ok to terminate.

I do not know why this error occurs?? - Hopefully somebody is able to explain me what i do wrong?? I know that is something that a dll does not exist, but i do not know what exactly went wrong and how can i correct it??

thanks in advance.

pat
Questionz-order equivalent for windows? Pin
ddelapasse17-Aug-04 7:34
ddelapasse17-Aug-04 7:34 
AnswerRe: z-order equivalent for windows? Pin
Stefan Troschuetz18-Aug-04 0:18
Stefan Troschuetz18-Aug-04 0:18 
GeneralExcel CSV Problems Pin
Member 120485117-Aug-04 7:12
Member 120485117-Aug-04 7:12 
Generalcommand line compiling Pin
Martin Marvinski17-Aug-04 7:06
Martin Marvinski17-Aug-04 7:06 
GeneralRe: command line compiling Pin
Nick Parker17-Aug-04 7:25
protectorNick Parker17-Aug-04 7:25 
GeneralCurious focus problem. Pin
MrEyes17-Aug-04 6:48
MrEyes17-Aug-04 6:48 
GeneralDropDown Button Pin
Anonymous17-Aug-04 6:10
Anonymous17-Aug-04 6:10 
GeneralRe: DropDown Button Pin
Syed Abdul Khader17-Aug-04 6:33
Syed Abdul Khader17-Aug-04 6:33 
GeneralRe: DropDown Button Pin
cjengler18-Aug-04 1:24
cjengler18-Aug-04 1:24 
GeneralSending XML file as a parameter Pin
sacoskun17-Aug-04 5:52
sacoskun17-Aug-04 5:52 
GeneralRe: Sending XML file as a parameter Pin
Stanciu Vlad17-Aug-04 6:52
Stanciu Vlad17-Aug-04 6:52 
GeneralRe: Sending XML file as a parameter Pin
leppie17-Aug-04 8:19
leppie17-Aug-04 8:19 
GeneralDataGrid not update Pin
Fule17-Aug-04 5:21
Fule17-Aug-04 5:21 
GeneralRe: DataGrid not update Pin
leppie17-Aug-04 5:54
leppie17-Aug-04 5:54 
GeneralRe: DataGrid not update Pin
dekhle17-Aug-04 5:56
dekhle17-Aug-04 5:56 
GeneralRe: DataGrid not update Pin
Heath Stewart18-Aug-04 11:02
protectorHeath Stewart18-Aug-04 11:02 
Generalclosing forms Pin
steve_rm17-Aug-04 5:20
steve_rm17-Aug-04 5:20 

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

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