Results for "Author: david drake"
Tired of dealing with Regsvr32 and users who don't even know what a DLL is? This code will make it easy to Register and Un-register your VB DLLs by adding menu options to Windows when you right-click on a DLL or OCX. Additionally, when you double-click on any DLL or OCX file, Windows will automatically Register it by default. Supporting your DLLs just got easier! Please leave your comments and Please Vote!
Countdown Timer is a complete application that demonstrates several very useful programming techniques. 1. Asynchronous Processing The project includes a class called clsSlumber, which is an extremely useful tool for asynchronous processing. It encapsulates the Sleep API call, but slumbers in small intervals to allow your app to remain responsive to any trigger. clsSlumber will return control either when the slumber time expires or when it is told to wake up. This class is also accurate to 0.1 milliseconds in its timing capabilities, which is demonstrated in this timing accuracy of this app. For asynchronous processing, set the total slumber time to be your Timeout interval. If the processing is completed before the timeout, you can continue by Waking Up from the slumber, otherwise you can raise a timeout error when the slumber has completed. You will find this a very useful tool in you code collection, as I have used it broadly in my coding for over a year. 2. OCX less Progress Bars Two examples of OCX-less Progress Bars are included, one is a standard progress bar, while the other is a Pie which fills in according to progress. 3. Double Buffering Since this example displays updated time in 10 millisecond intervals, double buffering was necessary in order to provide a flicker-free display of the time. 4. Error Handling The re-usable classes included in the project are great examples for error handling. Take note at how the call-stack will be returned in the error message that is raised. Although this application has very limited use, I hope you find the encapsulated utilities that are demonstrated here to be powerful tools for your future development. This code has been thoroughly tested on Windows 95, 98, NT 4, and 2000. Please don’t forget to vote! Thank you. David Drake
This demo allows you to compare and benchmark 3 methods of XML Parsing available to VB. 1. String Manipulation The first method is basic VB string manipulation, using functions such as Instr() and Mid(). 2. MSXML Document Object Model The second method uses the DOM methods provided with MSXML. 3. MSXML 3.0 SAX2 The final method uses the new SAX2 technology provided with MSXML 3.0. The benchmarking results will prove that SAX2 scales linearly while the DOM and VB string methods scale exponentially. SAX2 proves to be a highly scalable solution for parsing large XML recordset. This demo will be useful for those who are interesting in learning about XML parsing in VB, and especially useful for those who want to take advantage of Microsoft's new MSXML SAX2 technology. All the VB wrapper classes you will need are included with this demo. Before you run this demo, you will need to install Microsoft's MSXML 3.0 library. For instructions, see the Instructions.txt file included with the project. Don't forget to vote!!!
WaitableTimer API This demo demonstrates how to use the WaitableTimer API in Windows. A WaitableTimer is very similar to the Sleep API. You can use this API to pause your application for a set amount of time, without taking up any CPU cycles. The benefit of a WaitableTimer over the Sleep API is that WaitableTimers allow your application to still receive events during the wait, while the Sleep command will freeze your app, queuing all events until the sleep interval has expired. Demo This demo shows you the difference between a 5 second wait using the Sleep API compared with a WaitableTimer. You will notice that while sleeping your form will not respond to any events, such as minimizing the form or re-painting if the form gets covered by another window. While using a WaitableTimer, the app remains completely responsive to all these Windows events! Finally, this demo provides an easy to use class called clsWaitableTimer, which completely encapsulates the WaitableTimer API. All you will need to do to take advantage of this API is to call the method Wait, passing in the number of milliseconds you want to wait. Enjoy and don't forget to vote!
Schnikies is a program that I have developed over the last 4 years to help me remember all my friend's birthdays. Originally I had written it using an Access Database to store the data, but more recently I have upgraded it to use an XML data file as the back-end data store, as well as using a Microsoft Agent for presentation. After entering all the events you want to remember, Schnikies will check for upcoming birthdays every time you log into your computer. If a birthday is coming up, Peedy the Parrot will count down to the event. On the day of someone’s birthday, Peedy will sing Happy Birthday to them. This program has saved me from missing countless Birthdays, Anniversaries, etc. Not only is this a very usefully application, but there are a lot of things you can learn from it. The following program techniques are utilized in this application: 1. XML Based Data Storage This application uses an XML text file as for its data storage, but from the users perspective it might as well be a SQL database. The result is a very light weight application. And I have designed this application so that you could very easily swap in a class that I have written that uses Microsoft’s SAX2 technology for parsing the XML File. SAX2 will provide a highly scalable solution for large amounts of data. (If you are interested in this, review my prior postings to get the SAX2 implementation.) 2. Microsoft Agent Programming This application uses Peedy, a Microsoft Agent, for its presentation. Not only is it a cute animated character, but you can even have it talk by installing the Text-to-Speech drivers. 3. Randomization All of Peedy’s actions are chosen at Random. From his location on the screen to his expressions, you can learn how to code random behavior. 4. Binary Search On a side note, a Binary Search Algorithm is used to alphabetically sort the XML recordset while loading the XML File. I hope you enjoy this program. Please feel free to comment and PLEASE VOTE!! NOTE - Please be sure to read the Readme.txt file which comes with the project, which contains instructions for how to setup your machine.
Tired of dealing with Regsvr32 and users who don't even know what a DLL is? This code will make it easy to Register and Un-register your VB DLLs by adding menu options to Windows when you right-click on a DLL or OCX. Additionally, when you double-click on any DLL or OCX file, Windows will automatically Register it by default. Supporting your DLLs just got easier! Please leave your comments and Please Vote!
Countdown Timer is a complete application that demonstrates several very useful programming techniques. 1. Asynchronous Processing The project includes a class called clsSlumber, which is an extremely useful tool for asynchronous processing. It encapsulates the Sleep API call, but slumbers in small intervals to allow your app to remain responsive to any trigger. clsSlumber will return control either when the slumber time expires or when it is told to wake up. This class is also accurate to 0.1 milliseconds in its timing capabilities, which is demonstrated in this timing accuracy of this app. For asynchronous processing, set the total slumber time to be your Timeout interval. If the processing is completed before the timeout, you can continue by Waking Up from the slumber, otherwise you can raise a timeout error when the slumber has completed. You will find this a very useful tool in you code collection, as I have used it broadly in my coding for over a year. 2. OCX less Progress Bars Two examples of OCX-less Progress Bars are included, one is a standard progress bar, while the other is a Pie which fills in according to progress. 3. Double Buffering Since this example displays updated time in 10 millisecond intervals, double buffering was necessary in order to provide a flicker-free display of the time. 4. Error Handling The re-usable classes included in the project are great examples for error handling. Take note at how the call-stack will be returned in the error message that is raised. Although this application has very limited use, I hope you find the encapsulated utilities that are demonstrated here to be powerful tools for your future development. This code has been thoroughly tested on Windows 95, 98, NT 4, and 2000. Please don’t forget to vote! Thank you. David Drake
This demo allows you to compare and benchmark 3 methods of XML Parsing available to VB. 1. String Manipulation The first method is basic VB string manipulation, using functions such as Instr() and Mid(). 2. MSXML Document Object Model The second method uses the DOM methods provided with MSXML. 3. MSXML 3.0 SAX2 The final method uses the new SAX2 technology provided with MSXML 3.0. The benchmarking results will prove that SAX2 scales linearly while the DOM and VB string methods scale exponentially. SAX2 proves to be a highly scalable solution for parsing large XML recordset. This demo will be useful for those who are interesting in learning about XML parsing in VB, and especially useful for those who want to take advantage of Microsoft's new MSXML SAX2 technology. All the VB wrapper classes you will need are included with this demo. Before you run this demo, you will need to install Microsoft's MSXML 3.0 library. For instructions, see the Instructions.txt file included with the project. Don't forget to vote!!!
WaitableTimer API This demo demonstrates how to use the WaitableTimer API in Windows. A WaitableTimer is very similar to the Sleep API. You can use this API to pause your application for a set amount of time, without taking up any CPU cycles. The benefit of a WaitableTimer over the Sleep API is that WaitableTimers allow your application to still receive events during the wait, while the Sleep command will freeze your app, queuing all events until the sleep interval has expired. Demo This demo shows you the difference between a 5 second wait using the Sleep API compared with a WaitableTimer. You will notice that while sleeping your form will not respond to any events, such as minimizing the form or re-painting if the form gets covered by another window. While using a WaitableTimer, the app remains completely responsive to all these Windows events! Finally, this demo provides an easy to use class called clsWaitableTimer, which completely encapsulates the WaitableTimer API. All you will need to do to take advantage of this API is to call the method Wait, passing in the number of milliseconds you want to wait. Enjoy and don't forget to vote!
Schnikies is a program that I have developed over the last 4 years to help me remember all my friend's birthdays. Originally I had written it using an Access Database to store the data, but more recently I have upgraded it to use an XML data file as the back-end data store, as well as using a Microsoft Agent for presentation. After entering all the events you want to remember, Schnikies will check for upcoming birthdays every time you log into your computer. If a birthday is coming up, Peedy the Parrot will count down to the event. On the day of someone’s birthday, Peedy will sing Happy Birthday to them. This program has saved me from missing countless Birthdays, Anniversaries, etc. Not only is this a very usefully application, but there are a lot of things you can learn from it. The following program techniques are utilized in this application: 1. XML Based Data Storage This application uses an XML text file as for its data storage, but from the users perspective it might as well be a SQL database. The result is a very light weight application. And I have designed this application so that you could very easily swap in a class that I have written that uses Microsoft’s SAX2 technology for parsing the XML File. SAX2 will provide a highly scalable solution for large amounts of data. (If you are interested in this, review my prior postings to get the SAX2 implementation.) 2. Microsoft Agent Programming This application uses Peedy, a Microsoft Agent, for its presentation. Not only is it a cute animated character, but you can even have it talk by installing the Text-to-Speech drivers. 3. Randomization All of Peedy’s actions are chosen at Random. From his location on the screen to his expressions, you can learn how to code random behavior. 4. Binary Search On a side note, a Binary Search Algorithm is used to alphabetically sort the XML recordset while loading the XML File. I hope you enjoy this program. Please feel free to comment and PLEASE VOTE!! NOTE - Please be sure to read the Readme.txt file which comes with the project, which contains instructions for how to setup your machine.