|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
In this part we are going to discuss and test to use some of the Windows® components. Performance CounterThe performance counter is a Windows® component which is communicating with the Windows® own performance counter (See Figure A).
Figure A:The Windows® Vista Reliability and Performance Monitor have a Performance counter. The performance counter helps the users to get total performance information about their computer. Let’s test the performance Counter component in Visual Studio® 2005.
Figure C:The simple CPU usage monitor application, using Windows® performance counter. ErrorProviderThe error provider is used in user information fill forms, for example: we have a registration form and we have about five empty textboxes and two buttons one with the text register and the other one with the text cancel. OK, now the user wants to register and he enters name, nick-name, e-mail, password and re-confirming his/her password. Now the user clicks on the register button and the button validates the information suddenly the nick-name which was enter is used by another user, and a error provider icon will popup and tell the user that he/she needs to enter another nick-name. So the error provider could be used to validate information. Let’s add an error provider and test the functions:
Figure E:As we can see I’ve just tested to enter a nick-name and password and I clicked on register and I’ve got the error provider information. You could use other codes like: if(textbox1.text.trim().Length == 0) HelpProviderThe help provider is used to help the user. How does the help provider help the user? The help provider is helping the user like this you could enter some lines of code and the compile and run the application next you could hit F1 and the helpprovider would display help information for that session . Let’s test the help provider:
Figure G:You could very quick see and understand why I’ve added the HelpButton, if we want to test our help provider we need the HelpButton available. We hope you might learn something.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||