|
Hello,
Is it possible on PocketPc to get noticed when an event occurs? - it is not important what event occurs, but only if an event occurs? also independent of a certain application.
Regards
pat
|
|
|
|
|
What type of events are you looking for? You'll have to clarify a little more.
|
|
|
|
|
when a user presses a button in an application or start a program on the PocketPc. Is it possible to get noticed of such events on the PocketPc's?
regards
patrick
|
|
|
|
|
No, there is no way to get events in an EVENT DRIVEN Windows application.
|
|
|
|
|
Actually, in Windows CE there really isn't an easy way of doing it, and no single way I've seen documented or have used that would work like hooking messages in Windows (the real kind ).
The easiest way is probably to use Control.Capture , which is supported in the .NET CF. Only one window can capture the mouse, however, but you can get mouse events to fire for windows that are not your own. In most cases, you'll need to override WndProc and handle these yourself as windows messages.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Sorry but i do not exactly know how you mean that? I read the API of the System.Windows.Forms.Control class but i do not exactly know how i can use this for my problem?
Regards
patrick
|
|
|
|
|
You simply set the Capture property of any control you want to capture mouse events to true . Look over the Control.Capture property documentation.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
This is a little bit irritating, because i want to implement it in a generic way, and so i cannot set the property of a control to true or false or? - Or do i not understood you in a correct way`?
regards
pat
|
|
|
|
|
You really should read about the Control.Capture property. Setting this on a control causes the control to receive mouse events from anywhere on the desktop regardless of whether or not your control has the focus. This is about as generic as it gets.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Hello
@Mr. Stewart: Are you sure that the solution with the Control.Capture property works for the whole PocketPc? - because i developed a little solution with this, and i only get a solution for a specific application?
Can you please give me a further hint, how you meant that??
thanks in advance
regards
pat
|
|
|
|
|
Have you actually read the documentation for the Control.Capture property? It states that a background window will only receive events for messages passed to its visible client area. Only a foreground window can receive events for the desktop client area.
You need to read the documentation. If this isn't suitable, then you'll need to read through the Windows CE / Pocket PC documentation on http://msdn.microsoft.com/library[^]. Search for APIs that may work. Control.Capture is really your only option in .NET without having to P/Invoke or create an RCW.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Maybe I misunderstood, but I thought he wanted button click events or app load events from a custom built app (your app). In which case they are just easy to retrieve as any Windows app.
|
|
|
|
|
Judging from a previous question, I think he wants when any event happens. But I could be wrong, too. I guess we both need a little more clarification, huh? It definitely helps when we get a problem description that consists of more than "I need X" or "It doesn't work".
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Yes, Mr. Stewart understood me in the right way. I do not need it for a custom application. If an event on the PocketPc arises, doesn't matter if a button is pressed, a program is started or something else, i should get be noticed so i can make a screen shot.
regards
pat
|
|
|
|
|
Anyone know about any .NET profilers (even in alpha or beta) that can profile .NET 2.0 apps?
Judah Himango
|
|
|
|
|
Hello,
I need to generate some reports in C#, l have a text book but it does not cover reports. I want to use crystal reports as that comes with .Net.
Does anyone have any example programs, or is there any good tutorials on the website.
Many thanks in advance,
Steve
|
|
|
|
|
This site - as well as many others - has a search. CodeProject's search bar is located right under the CodeProject logo toward the top of the page.
You could also use google[^] or another search engine of your choice.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Hi everyone,
I'm not sure if the title of this thread is good. This is what I'm trying to achieve: I would like to call a static method of a class in a separate assembly based on a string parameter containing the name of the class and method.
I already figured out the basics, this is the code I'm using.
Type MyType=Type.GetType("TestPlugin.TestPluginClass,TestPlugin");
if(MyType!=null)
{
MethodInfo mi=MyType.GetMethod("PluginMethod");
if(mi!=null)
mi.Invoke(null, null);
}
The problem is that this only works when the calling assembly is compiled with reference to the target assembly (TestPlugin in this case). I guess that I'll have to load the target assembly somehow to make it work this way. How can this be achieved?
Thanks for any ideas!
Rado
Radoslav Bielik
http://www.neomyz.com/poll [^] - Get your own web poll
|
|
|
|
|
Try Assembly.Load( <your_assembly_name> )
|
|
|
|
|
Not necessary if the location of the requested assembly that contains the type can be resolved.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
what you really need to do is implement a plugin framework within your code, identify which plugins are available, and have those loaded and accessible from a plugin manager. This article will help you:
MSDN Plugin Framework Example[^]
This signature left intentionally blank
|
|
|
|
|
Thank you for the link to this great article, I think learned a lot from it!
Although I'll just use what Heath suggested below, because I don't really need a complete plugin framework this time, this article will surely come handy one day.
Thanks again,
Rado
Radoslav Bielik
http://www.neomyz.com/poll [^] - Get your own web poll
|
|
|
|
|
|
Brian Delahunty wrote:
Your talking about "Late Binding" there.
Lol no! Late binding is this:
private object foo = null;
public object Foo
{
get { if (foo == null) foo = new object(); return foo; }
}
top secret xacc-ide 0.0.1
|
|
|
|
|
No, that's not late-binding. Late binding has to do with how members are resolved and invoked. The actually implementation is uknown at compile time. Script wouldn't exist without late-binding, and it's an important part of COM. A good example in .NET of late-binding is:
public interface IFoo
{
void Test();
}
class Foo1 : IFoo
{
void Test() { Console.WriteLine("from Foo1"); }
}
class Foo2 : IFoo
{
void Test() { Console.WriteLine("from Foo2"); }
}
public class FooFactory
{
public static IFoo CreateFoo(string cls)
{
if (cls == "foo1") return new Foo1();
else if (cls == "foo2") return new Foo2();
else return null;
}
} Callers to FooFactory.CreateFoo get back an IFoo without knowing the implementing type. That's late-binding.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|