Strange WebBrowser behaviour - Windows Mobile Development and Hacking General

I created a little application in C# with VS2005 using the latest WM PocketPC SDK. It contains a form with a WebBrowser component which I fill with the help of the DocumentText property. When I put in short HTML segments that don't trigger the scrollbar everything is fine. As soon as I give it a little longer text the scrollbar appears but the component begins refreshing over and over again like I would set the DocumentText property all over again.
I don't have a clue what triggers this behaviour im definetly only setting the DocumentText property once and not in some kind of timer or thread.
I tried to google for it but no solution turned up.
Anybody ever ran into this problem or even better know how to fix it?

Related

How do I stop the PPC from turning off?

Hi guys,
Hope this hasn't been asked before too many times. I did do a search but couldn't find anything.
I've just written a small app for ppc (works on 2002, 2003 and WM5) to act as a countdown timer. However, unless I set my Wizard to never shutdown, it turns off whilst the timer is still going.
I've had a look through the latest SDK's (I'm using Visual Studio 2005 and the latest version of the Compact .NET Framework) but can't figure out how to stop this.
The only way I can think of is to find the reg key that controls this (I assume there is one), copy it, set it to a rediculous or null value and then copy it back again on shutdown. But it seems like a god awful solution and prone to any number of errors where it doesn't get copied back.
Is there a simple ".NET" way to do this?
BTW Although I've been a developer for [cough] years, I've never written anything for PPC before.
Cheers,
Bassey
Hi
take a closer look at HKLM\System\CurrentControlSet\Control\Power. There you will find system and user idle timeouts. To prevent a PocketPC WindowsMobile system from going to sleep, you must reset the System idle timer periodically. This is done by a call to
void WINAPI SystemIdleTimerReset (void);
I think this will be the same for WinCe 3.0 up to WinCe5
If you think about a good programming starter book, I recommend Douglas Boling 'Programming Microsoft Windows CE .NET' (3rd edition). It talks about nearly everything. It is my favourite book.
regards
Josef
Thank you very much indeed. Have just ordered the book as well.
Cheers,
Bassey

"Wrap" a Today plugin

I have a little project in mind, but would like some input from the pros to cut research time:
Is it possible to "wrap" a Today plugin dll with another, providing a "pass through" for operations (such as screen taps, etc)?
What I'm trying to accomplish is this: Add selectability and other one-handed d-pad operation to an older plugin that is not selectable.
What do you think?
it's possible but the problem is that the plugin have to keep track on what plugins it include and which handles it have to pass to them
could end up big and slow
Rudegar said:
it's possible but the problem is that the plugin have to keep track on what plugins it include and which handles it have to pass to them
could end up big and slow
Click to expand...
Click to collapse
This is specific to a single plugin - it would only keep track of one.
Perhaps plan B would be easier - a plugin that manipulates another plugin. Such that it would "appear" the older plugin was selected, etc. I guess I'd better go study some more...
Actually its really simple.
Any plug-in DLL exports a function called InitCustomItem. In this function the plug-in does all its initialization, and creates its window. The return value is the handle to this window which you can subclass to add functionality.
as for selection, there is a value in the registry for each plug-in (HKLM\Software\Microsoft\Today\Items) which controls whether the system passes selection events to the plug-in or not.
it has three settings:
0 - non selectable, item will be skipped by the system.
1 - Automatic, the system will paint the item and handle selection on / off
2 - Manual, the system will pass the selection event to the item and the item will take care of the rest. In this mode the return value of the WM_ACTION determines whether the selection is moving on. This is good for multiline plug-ins that don't want to give up focus when arrow keys are pressed.
levenum said:
Actually its really simple.
Any plug-in DLL exports a function called InitCustomItem. In this function the plug-in does all its initialization, and creates its window. The return value is the handle to this window which you can subclass to add functionality.
as for selection, there is a value in the registry for each plug-in (HKLM\Software\Microsoft\Today\Items) which controls whether the system passes selection events to the plug-in or not.
it has three settings:
0 - non selectable, item will be skipped by the system.
1 - Automatic, the system will paint the item and handle selection on / off
2 - Manual, the system will pass the selection event to the item and the item will take care of the rest. In this mode the return value of the WM_ACTION determines whether the selection is moving on. This is good for multiline plug-ins that don't want to give up focus when arrow keys are pressed.
Click to expand...
Click to collapse
Hey, thanks for the response! I've set the Selectability registry item for the older plugin, and it's ignoring it - that's what started me on this little project.
I'm a software developer by trade, but not with C++, so I don't want to waste people's time here asking a lot of dumb questions. If you could point me in the right direction on a couple of things, I'll go off and learn:
1. If all I have is a dll and nothing else (no .defs, etc), can I determine all of the functions it exports (other than InitCustomItem)?
2. Process check: My custom plugin's InitCustomItem would call old-plugin's InitCustomItem, snagging old-plug's hwnd. New-plugin would then initialize it's own window - transparent(?) and pass that hwnd back to windows. Also, my custom plugin would pass all messages to old-plugin, etc. Theoretically, old-plug would look and operate like normal?
If this is already written, just sent me the code!
Well I am afraid it will be difficult to do all this without C++. As far as WM based devices are concerned you need to use something that translates in to native code to create system components like the plugins son ,no .NET languages, and embedded VB doesn't do well on anything never that WM 2003 (not even SE), plus I am not sure if you can make DLLs with it at all.
To your questions:
1) There is a tool which comes with VS 6 called Dependency Walker. It shows you what functions a given DLL exports, what it imports from other DLLs and what DLLs it is link to. Woks on EXE files as well.
If you can't get that, download a demo of IDA 5. It's the most powerful disassembler for WM devices out there.
2) Not sure, I never tried anything like that. The thing is, the system resizes the plugins, on initialization (it controls height) and when screen rotation changes so if you pass back HWND for a window other than the one visible, it might cause some problems.
I think what you should do is learn about subclassing. It's when you replace the procedure of an existing window with your own (just replace the function, not create new window). You then get all the messages for that window, you can do what you want and call the original function when you done.
By the way, if you want to learn about writing plugins there is an article with code samples on this site: www.pocketpcdn.com and a lot of other interesting stuff.
Good luck.
What plugin is it? It might be easiest just to rewrite the plugin if you've got the code.
V
levenum said:
Well I am afraid it will be difficult to do all this without C++.
Click to expand...
Click to collapse
I should have been more clear - I am using C++, I'm just have to learn how to program with it first!
vijay555 said:
What plugin is it? It might be easiest just to rewrite the plugin if you've got the code.
V
Click to expand...
Click to collapse
I don't have the old-plugin source code. My little project is to add some sort of d-pad operation to the WeatherPanel plugin, which you're probably familiar with.
Progress: I've written and deployed my first little plugin - based on the source code samples available in the internet.
Next step: In my InitializeCustomItem, I thought I'd try to call WeatherPanel's InitializeCustomItem (instead of creating my own window). Thing is, I don't yet know how to properly link the WeatherPanel dll to my project. As expected, it only exports two functions: InitializeCustomItem and CustomItemOptionsDlgProc (I used dumpbin.exe)
I'll keep plugging away - any input would be appreciated.
Thanks for your help!
It's real easy:
Use LoadLibrary and GetProcAddress functions to call functions in other DLLs without linking them.
levenum said:
It's real easy:
Use LoadLibrary and GetProcAddress functions to call functions in other DLLs without linking them.
Click to expand...
Click to collapse
What a coincidence! My studying led me to the same functions.
From within my plugin's InitializeCustomItem, I was able to successfully load the dll with LoadLibrayl, GepProcAddress of its InitializeCustomeItem (at ordinal 240) and call it. But it whacks the Today screen so that none of the plugins load.
Next I thought I'd try FindWindow and EnumChildWindows to find it and all it's children. Then manipulate them by sending messages...
storyr said:
What a coincidence! My studying led me to the same functions.
From within my plugin's InitializeCustomItem, I was able to successfully load the dll with LoadLibrayl, GepProcAddress of its InitializeCustomeItem (at ordinal 240) and call it. But it whacks the Today screen so that none of the plugins load.
Next I thought I'd try FindWindow and EnumChildWindows to find it and all it's children. Then manipulate them by sending messages...
Click to expand...
Click to collapse
Update: So far, so good. As it turns out, EnumChildWindows doesn't work on the PPC, so I used GetWindow to find the plugin's handle. I can successfully send messages to it and initiate various actions.
Question: I'd like to visually indicate (on the old-plugin) what's being clicked (such as drawing a box around it). Is it possible to draw things outside of my own window?
It is, but it's tricky.
You can always use the GetDC function to retrieve the DC for another window and paint on it, but the problem is that unless you subclass the window you have no way of knowing when it repaints it self and all your changes are erased.
levenum said:
It is, but it's tricky.
You can always use the GetDC function to retrieve the DC for another window and paint on it, but the problem is that unless you subclass the window you have no way of knowing when it repaints it self and all your changes are erased.
Click to expand...
Click to collapse
I tried that exact thing (GetDC) and drew a rectangle in it, but it didn't do anything. I realized the reason was the WM_Paint event wasn't firing on old-plugin, and when it did, my stuff was erased (just like you said).
Next idea - open my own dialog window than overlays old-plug. The entire window needs to be transparent - except for the visual indicators that I position where I want. When the user ok's, I close the window and send the click to old-plugin...
Thanks again for keeping tabs on my progress..
No offence, but with all these rather advanced programming tricks you are attempting just to "sup up" an old weather plugin it looks to me like you would be better off just writing the whole thing from scratch.
It you are familiar with WinInet and / or sockets this should be pretty easy and it will look and work much better than the hack you are attempting now.
Plus you can make it exactly the way you like.
levenum said:
No offence, but with all these rather advanced programming tricks you are attempting just to "sup up" an old weather plugin it looks to me like you would be better off just writing the whole thing from scratch.
It you are familiar with WinInet and / or sockets this should be pretty easy and it will look and work much better than the hack you are attempting now.
Plus you can make it exactly the way you like.
Click to expand...
Click to collapse
No offence taken. I thought of that, but I figured this would be a good way to cut my teeth a little. Once I complete this little project, I may pursue that route...
Question: Do you have a favorite forum (or forums) besides this site that you use for your research/programming questions?
This is my favorite forum
But here are couple more sites I found very valuable:
www.pocketpcdn.com - They have tips and tricks with code examples arranged in categories like how to make MFC dialogs not full screen or the one I used in LVMTime to put the clock back on the taskbar.
www.codeproject.com - It's not specific to WM development but has tons of interesting stuff including entire sources.
You should also check out www.buzdev.net If you're not familiar with the great work of buzz_lightyear you should see some of the stuff he did for this forum like grab_it - the invisible ROM dumper.
OT
Just a quick OT question:
If I would move some of the plugin-dll's from \Windows to \Storage Card, would it be enough to change the adress within the corresponding item in the registry entry HKLM/Software/Microsoft/Today/Items ?
Of course I'm not talking about plugins like tasks a.s.o but rather third party plugins
Cheers
hrb
It won't work.
The problem is that the SD card is mounted too late so if you put the plugins on it they will not be loaded when device boots up.
You can move them to the extended ROM this way or to a folder other than windows but there is no way to move start-up stuff to SD.
Thanks for the help with this "little" project. After many hours, the product is out for beta testing. When it's released, I'll post more info...
Finished!
It's finished. The app is called WP-Pilot and it provides one-handed operation of WeatherPanel. If anyone's interested, it can be found here. Here's how it ended up:
There's a plugin (WP-PilotPlugin.dll) with an options dialog, and an executable (WP-Pilot.exe).
When the plugin gets selected, it looks for Weatherpanel. If it finds it, it fires off WP-Pilot.exe
WP-Pilot.exe opens. It does this stuff:
Look for WeatherPanel, and get it's screen coordinates.
Read the registry and determine which layout file WeatherPanel is using.
Open the layout file and read it: Record the coordinates of each "clickable" item found. This was a real PITA because of Unicode.
Sort the coordinates for left-to-right, top-to-bottom order.
Select the first coordinate and position a tiny window (10x10) at that x-y position.
Draw a "pointer" in the window (the type and color depends on what's selected in the options).
Show the window and process input:
[*]Left/right pressed - selected the next/previous coordinate and move the window to that location.
[*]Up/down pressed - close WP-Pilot and tell the plugin we're done.
[*]Center button pushed:
[*]Send a mouse click to the WeatherPanel plugin at the coordinates
[*]Close WP-Pilot and tell the plugin we're done.​
Thanks again for your help!

[New release] Registry display plugin

Ok, most of you may find this totally useless as a plugin, but it was a combination of a request by user Treo_newb and a desire to create a sample plugin project that could be used as a base / example for plugin writers (I plan on doing an article on codeproject.com and this will be the source for it).
What does it do?
This plugin displays a string stored in registry.
The path is:
HKEY_CURRENT_USER\Software\RegDispPlugin
Value name: DisplayString
It checks if this string has changed several times per second when today screen is shown (as the system sends refresh message to all plugins) and displays the updated message if a change occurred.
What is it good for?
First, if you write apps using mortscript or similar like the user who requested this it will let your script display stuff on today screen.
Alternatively it could be used to mark your device today with a string that isn't as easily changed as user info.
The source is basically a skeleton plugin you can use to build your own plugin on (no license / copyright to limit you) and it already has several tricks needed for the plugin to display correctly:
VGA compatibility
Text size matching system settings
Proper header in settings dialog (like on system plugins)
Proper text color when selected (according to theme)
No blinking all today screen on change
Proper resize when switching between landscape and portrait
When I was writing my first plugin I could not find all these little fixes concentrated in a single article so I had to fish for each one as the bug reports came in.
Hope you will find this little project useful.
The plugin:View attachment RegDisplay.CAB
The source (eVC 4 project): View attachment RegDisplay.zip
Thanks for this!
Thank You Lev.
Thanks, Thanks, Thanks,
You are a legend.
I was almost through with my today plugin and was trying to figure out reading registry values and all of a sudden I get a PM from u about the plugin !!!
Very Cool !!!
OK a few questions,
1. I know that WM_TODAYCUSTOM_QUERYREFRESHCACHE is called for refreshing the today plugin, any ideas about when is it called.
I read somewhere that it was 2 seconds. Is it true?
2. I saw ur code and u have exposed CustomItemOptionsDlgProc in RegDisplay.def, but when I installed the cab file the 'options' is not enabled.
I manually changed the resistry and changed options to dword = 1 and saw ur name and email address.
u might want to enable that by default so that people can notice ur work.
I am planing a commercial release of a new project on basis of this.
Thanks again,
Shailesh
First, you're welcome.
shaileshashar:
1) I ran a debug print on this message once on an iPaq 1710 and it seems to be sent several times per second. This could differ from OS to OS or even from device to device, I am not sure.
If you need specifically timed refresh, or you have an event triggered on new data, I suggest using a timer or maybe a thread that will wait on an event. You can refresh your plugin from anywhere in code by calling InvalidateRect with your window handle.
2) I messed up the cab at first, forgetting to add the Options reg value. Then when I went to upload the fix, I couldn't access the site for about an hour (no idea why, I even rebooted the PC to Ubuntu). Should be fixed now, but I will check it later again (I have to go back to XP for that).
Good luck with your program.
Suggestion
levenum said:
First, you're welcome.
shaileshashar:
1) I ran a debug print on this message once on an iPaq 1710 and it seems to be sent several times per second. This could differ from OS to OS or even from device to device, I am not sure.
If you need specifically timed refresh, or you have an event triggered on new data, I suggest using a timer or maybe a thread that will wait on an event. You can refresh your plugin from anywhere in code by calling InvalidateRect with your window handle.
2) I messed up the cab at first, forgetting to add the Options reg value. Then when I went to upload the fix, I couldn't access the site for about an hour (no idea why, I even rebooted the PC to Ubuntu). Should be fixed now, but I will check it later again (I have to go back to XP for that).
Good luck with your program.
Click to expand...
Click to collapse
Thanks for the help, will check the fixed cab.
Also a suggestion:
A custom icon could also be incorporated. You can give a option to load a custom icon next to the text in the today plugin.
I know anybody can modify ur code and do it but still.
Actually, I probably should have mentioned this in the original post but I have no intention of adding options to this thing.
This would only complicate the code and turn it in to an actual app instead of a sample project.
But by all means feel free to make suggestions. If this thing does become popular, when I am done with my other projects (like LVMTopBat) which won't be any time soon (unfortunately) I will release a separate version of this plugin with all kinds of options that can be controlled both by user (form the options dialog) and by other apps through registry.
Maybe things like text alignment, size, bold / Italic / underlined.
P.S.
The reason I put the string this plugin loads under HKEY_CURRENT_USER instead of the HKLM where the rest of the plugin registry resides is because by default the HKEY_LOCAL_MACHINE on WM 5 and higher has a security restriction. For example you can not write to it using RAPI, only by authorized (or signed) app on the device. The HKEY_CURRENT_USER on the other hand is open for all.
levenum said:
P.S.
The reason I put the string this plugin loads under HKEY_CURRENT_USER instead of the HKLM where the rest of the plugin registry resides is because by default the HKEY_LOCAL_MACHINE on WM 5 and higher has a security restriction. For example you can not write to it using RAPI, only by authorized (or signed) app on the device. The HKEY_CURRENT_USER on the other hand is open for all.
Click to expand...
Click to collapse
Thanks for the info, I never knew that.
Thank you so much! This was exactly what I was looking for!
levenum said:
...But by all means feel free to make suggestions.
Click to expand...
Click to collapse
As a frequent mortscript user I think, this great app might be even more usefull, if the string was shown in an "allways on top" message box instead of the today screen. The Today screen might be obscured by other active windows during the scripts runtime and the plugin eats precious today screen estate also while being unused, doesn't it?
In that case (of a standalone application) I would furthermore introduce some kind of termination string (or reg. value) to end the display application.
Code:
- start mortscript
- writes first string to registry
- starts display application (run)
- updates string in registry whenever appropriate
- ...
- writes termination string to registry
-> display applications self-terminates
- ...
- end of mortscript
Honestly, I already do use something comparable with mortscript (employing a conditioned sleepmessage loop and reading from the registry too), but this could be much nicer and more elegant.
Just my 2 cents... What do you think?
I think something like that would be better implemented by the mortsrit program it self.
It could be a function like MessageBox API in windows which you could then command on and off. Having it built in would save precious resources on the device that would be wasted by having an extra app run constantly in background.
This is just my thought though.
I'd suggest contacting the developer of mortscript and discussing it with him.
levenum said:
I think something like that would be better implemented by the mortsrit program it self.
...
I'd suggest contacting the developer of mortscript and discussing it with him.
Click to expand...
Click to collapse
Mort knew about that request and by chance just announced to so.
Thanks anyway.
Hello levenum,
I just joined the community. Reason being, I found your RegDisplay plug-in
You call it a sample project, but the impact is that of an awesome solution.
Great for MortScript, but equally useful in BASIC applications that write
messages to the registry which is show upon screen minimization.
I regret not being a C programmer (mainly BASIC), else I'd love to further
develop this jewel.
Your plug-in runs flawlessly in an iPAQ 210 under WM6 Classic.
Cheers and Respectful Greetings
Robert
CLSID for registry display plugin
What is the CLSID for the Registry Display Plugin? I am going to have to edit the XML file that defines my home screen in order to get the plugin to show up. I am using Facade to control my home screen, and the only plugins that it will show in its list are those currently in use in one of the XML files in the Application Data\Home folder. All other new plugins require editing the XML. Thanks for your help.
levenum said:
Ok, most of you may find this totally useless as a plugin, but it was a combination of a request by user Treo_newb and a desire to create a sample plugin project that could be used as a base / example for plugin writers (I plan on doing an article on codeproject.com and this will be the source for it).
What does it do?
This plugin displays a string stored in registry.
The path is:
HKEY_CURRENT_USER\Software\RegDispPlugin
Value name: DisplayString
It checks if this string has changed several times per second when today screen is shown (as the system sends refresh message to all plugins) and displays the updated message if a change occurred.
What is it good for?
First, if you write apps using mortscript or similar like the user who requested this it will let your script display stuff on today screen.
Alternatively it could be used to mark your device today with a string that isn't as easily changed as user info.
The source is basically a skeleton plugin you can use to build your own plugin on (no license / copyright to limit you) and it already has several tricks needed for the plugin to display correctly:
VGA compatibility
Text size matching system settings
Proper header in settings dialog (like on system plugins)
Proper text color when selected (according to theme)
No blinking all today screen on change
Proper resize when switching between landscape and portrait
When I was writing my first plugin I could not find all these little fixes concentrated in a single article so I had to fish for each one as the bug reports came in.
Hope you will find this little project useful.
The plugin:View attachment 41592
The source (eVC 4 project): View attachment 41583
Click to expand...
Click to collapse
This is great! I was asked if I could write a today screen plug-in for my weather application (http://forum.xda-developers.com/showthread.php?t=445576) - I couldn't since I don't have the skills and I'm writing .NET code - but this is exactly what I needed.
I'm adding support for this plug-in and will of course give credits to you.

[solved] How to prevent standby using VB.NET?

Hallo!
I'm working on an application called hTorch and although it is my first vb.net app I was quite successfull so far (at least I hope so ). But one think I'm just not able to achieve: Preventing the device from going into standby/suspend while the app is running.
In C++/C# there semes to be a system call "SystemIdleTimerReset()" but either there is no equivalent for vb.net or I was not able to find it.
Another thought was to modify the according registry key (HKLM\System\CurrentControlSet\Control\Power\Timeouts\BattSuspendTimeout) and to restore the original settings on program exit. This works fine except that WM does not apply the settings change immediately when it's done via registry. Again I did some research and again I only found a solution for C++/C# only. A system call named "NWUS_MAX_IDLE_TIME_CHANGED" tells the OS that the settings have changed and should be reread. I wasn't able to find something similar for vb.net though.
Does anybody know a solution for my needs?
Maybe someone could provide me with some sample code how he achieved this within vb.net?
Maybe some C++/C# programmer has build a library to access the power functions?
I would be really thankful for any help/hint you can give me!
Thanks in advance,
DeepThought
The standby mode is in the registry. Make a timer in VB.net and set it with an interval of about 5000 ms. Then make sure that ever time the timer ticks the standby mode will be disabled in the registry
Thank you for the quick response!
But the change via registry doesn't work. When I change the BattSuspendTimeout to 0 that does change the setting correctly. But they become not active. Only after a soft reset. It seems, that you somehow have to notify windows, that the settings have changed. Otherwise the will not be reread.
Any Idea how to achieve that?
I would also like to know if there is a way to prevent suspend.
I think only the pocket pc winmo versions do a real suspend where wifi and applications stop processing, and the smartphone winmo devices only kind of black the screen.
The only software I know is S2U2 which successfully can prevent "real suspend" and let e.g. my led notification work correctly.
Cause i cannot really use it on ks20 due to compatibilty issues i would be very interested in a reg hack, or (if there really is no reghack, i tried alot) some code snipets with which i could build a little app.
There's a pretty good article on CodeProject covering power.
*digs out link*
Here you go - http://www.codeproject.com/KB/mobile/WiMoPower1.aspx
It covers:
* Displaying the voltage, current, and temperature of your device's battery
* Changing the power state of hardware within the device
* Enumerating the hardware in a Windows Mobile Professional device
* Enumerating the power modes that a Windows Professional device supports
* Preventing a device from sleeping
* Toggling the state of the screen's backlight
* Waking up the machine to perform work without alerting the user or turning on the screen
[solution]
Thanks to AndyZap I can now answer the question myself
It is so simple, that I'm really ashamed now.
The magic word for me was PInvoke. Since I new the function I was searching for was an available win32 systemcall the missing link was how I can make this system call within vb.net.
So the actual solution are just two lines:
Code:
Declare Sub IdleTimerReset Lib "coredll.dll" Alias "SystemIdleTimerReset" ()
where "IdleTimerReset" is the name I've given the Sub. Which than just needs to be called like:
Code:
IdleTimerReset()
NOTE: This just resets the Idle timer once. So if you want to prevent the device from going into standby you have to reset this timer every time before it reaches the threshold. (The windows default setting is 60 seconds AFAIK).
THANK YOU AndyZap for your Help via PMail!
DeepThought
Thank you for your answer Northernmost!
I really love this community!

[REQ HELP]C# running an infinite loop without hanging the application

Hello all
i want something possible like multithreading
and on thread to be running all time (infinitely until application is exited)
it would be like this
after every X seconds it will check for an update
i tried it but it hangs my mobile
so is there any another alternate to use an infinite loop without hanging my app
sorry but i am very much poor in background workers and dont know how to work with them
thnx in advance
Use a timer.
Windows is an event driven OS. You do not have the right to hog resources waiting for a particular event to occur. Create a timer object, and set it to fire every x second(s). The function you provide as as the trigger/execute/action function, will actually perform the validation and carry out the action that is required.
Your application should take the back seat, and wait for it to be called. Meanwhile it will allow WinMo to carry on with its job....
Hi stephj
Thanks for your reply
could you please give me an example or some syntax for using it
looks like i really dont have right to hog the resources of windows
If you use Visual studio, you only have to put on your form a Timer object.
You define the intervall property in the property tab and you enable it.
In design mode, when you double click on the Timer on your form, visual studio create an empty event for you. All you have to do is to fill the event with your code.
'htcvidi' has hit it right on the nail. (en Francais, "parfaitement")
Included is the code to do it, together with the complete application.
A trivial example that displays the current date time in a label on the form.
The value is updated every five seconds.

Categories

Resources