Results for "Author: clint lafever"
Article to show those who do not know about the Templates folder for VB how to save templates to it for future use.
Ok, in my last posting, once again, somebody requested another article, this time on how to make a DLL. so.... here it is. I hope it fairs well with all.
Just some VB Tech Tips, nothing fancy, but informative.
A step by step article on how to make an Active X control. In my eyes, I am not an expert but somebody asked me to write this (past comment on another submission) so I did. If you follow it, in the end you will have your own Custom PictureBox control that will have a property to assign a URL to an image to use for its picture along with an event to know when it completed its download. Hope you all enjoy. I did not realize it would take me so long to write.
I posted this code yesterday but I had comments on it and emails sent directly to me from my web site asking how to use it. Guess that is the problem when you only post the sub routine. So, here is the code again, but this time with a demo project. This uses the API to simulate the minimize effect you see of a form shrinking to the taskbar, but with this code you can shrink it to any place you want, like itself to show it imploding, or the tray, or to the mouse. KEYWORDS: FORM ANIMATION DRAWANIMATEDRECTS FOLD IMPLODE MOUSE TASKBAR EFFECT EFFECTS
Just wanted to stab at this contest...I know a lot more can be added to this to make it more...complex yet fun...but I am at work and this is what I could through together during lunch. This program will just tell you the number of times the program was ran by using a custom control to access a ASP page on an external website which connects to a database to read the hit count then the ASP formats the results in INI format then the custom control saves that dowloaded ASP page to an INI file on the users hard drive then uses simple API calls tor read the value and display it. Just wanted to start of the contest with a little something that uses the web as well. BTW: The custom control code is included since I know you are not supposed to upload OCX's. The control was made by me and you can find a compiled version at http://lafever.iscool.net if you like it.
The demo will show you how to use ADO to connect to a database hosted on a web server. From there all standard uses of ADO recordsets and what not are possible. I see this question asked a lot in newsgroups so I thought I would share this code here to to help refer them to a working example. Note, the web server has to be a server you have rights to and not just some free web hoster like GeoCities so don't get too excited if you thought that is what this was. This demo will connect to my web server and read data from the NorthWind database found in SQL Server. Also note, my web server cannot handle a lot of traffic so depending on how many people download this and try it, you may have some slow responses or errors on connection. Sorry, but this is just a demo. This code is really not advanced, but many people do not know you can use ADO like this so I just wanted a demo up to point people to later on. Hope it helps some. KEYWORDS: REMOTE DB DATABASE ADO RECORDSET WEB SERVER WEBSERVER CONNECTION SQL IIS
PSC Alert will run in your system tray and monitor PSC's VB ticker. When it detects a new posting, it will alert you by displaying a small window for a few seconds down by the tray, playing a sound effect, and flashing the tray icon. Before you download, let me tell you now that the project does use an OCX which is not included but the URL to obtain the OCX is in the read me along with more information about where to learn more about my and my coding. You can also look at my BIO above to see I am a regular here along with a PSC Contest winner. I am not some joker out to cause problems.
Example code that will show how you can use the custom section (and LoadResData) of the resource file to store misc. files into your executable. Along with that, if one of the files is a .WAV file, to play it directly from the resource file without extracting it. Other parts of the code will show how you can embed JPG files into the resource file instead of .BMP files and use those files for your images in your program. This will help lower the size of your program if you love to use images in your program. Using the same code it will also show how you can extract out files to the users hard drive that were put in the resource file. A good usage of this is lets say you have a DB application and would like to give the ability to make a new DB file, but you want to make sure the DB has the write structure and filled with default data. Just embed your DB file into the resource and extract it out to a new file when the user wants a new file. I know a few days ago somebody else posted code similar, but I had this up here on PSC a long time ago (been removed since) and thought that since resource files can provide so much, it would be a good idea to post again for those who missed the other authors post. KEYWORDS: WAVE WAV RESOURCE LOADRESDATA CUSTOM SOUND PLAY EMBED SNDPLAYSOUND SND_ASYNC SND_LOOP
From time to time I write some little application or game for me and my co-workers to use and in the program I am using some new control I made or downloaded. I already know they have the VB runtimes so I dont really feel like making an install for them so I just embed the OCX into the EXE using the resource file, then on the program start up it checks for the files existance. If it cannot find it [like on the first time] it will extract the OCX from the EXE to their hard drive and register it. Then it will open the form(s) that use it. This project shows how I do it. While I would never do this in a professional application, some of you may like this. However, I know this code can show some of you malicious programmers out there how to embed a virus or something like that. I had to think long and hard before I shared this. It is not all that advanced and if you are any good you would of figured out this on your own. So I decided there are enough legitimate reasons that others may like this code so I posted it. Please everyone who is responsible...please get a Project Scanner to scan source code projects for code like this (like the one listed here on PSC or mine at http://vbasic.iscool.net )
A little while ago somebody posted a listview that will automatically display a file listing for you. I thought this was a good idea and downloaded it. While it was nice, it had some bugs. Instead of just fixing that code, today I decided to make one myself. 90% of it was made simply using the Active X Control Wizard. I then added some code to read the icons for the files to dispaly in the ListView and few other tweaks to what the wizard made. In the end I have this control for you. While it is functional and easy to understand, you may wish to add/alter the code a bit to make it a bit more robust for all needs. Have fun with it. Simply set the Path property to a full path you wish to display files of and presto. On ItemClick or DblClick you can check and read the ItemType property to determine if the user clicked or double clicked on a Folder or a File ListItem and perform the logic you desire.
Project includes a very simple Class Module to talk to Excel with a demo project showing how to export the contents of a ListView to a workbook, and then create a pivot table from it along with page setup. The class module is pretty basic but I hope it helps some with ideas of how they can now add Export to Excel options to some of their projects. NOTE: The end user must have at least Excel 97 installed for this to work. KEYWORDS: EXCEL OBJECT CLASS WORKSHEET WORKBOOK PIVOT TABLE
Article to show those who do not know about the Templates folder for VB how to save templates to it for future use.
Ok, in my last posting, once again, somebody requested another article, this time on how to make a DLL. so.... here it is. I hope it fairs well with all.
Just some VB Tech Tips, nothing fancy, but informative.
A step by step article on how to make an Active X control. In my eyes, I am not an expert but somebody asked me to write this (past comment on another submission) so I did. If you follow it, in the end you will have your own Custom PictureBox control that will have a property to assign a URL to an image to use for its picture along with an event to know when it completed its download. Hope you all enjoy. I did not realize it would take me so long to write.
Just wanted to stab at this contest...I know a lot more can be added to this to make it more...complex yet fun...but I am at work and this is what I could through together during lunch. This program will just tell you the number of times the program was ran by using a custom control to access a ASP page on an external website which connects to a database to read the hit count then the ASP formats the results in INI format then the custom control saves that dowloaded ASP page to an INI file on the users hard drive then uses simple API calls tor read the value and display it. Just wanted to start of the contest with a little something that uses the web as well. BTW: The custom control code is included since I know you are not supposed to upload OCX's. The control was made by me and you can find a compiled version at http://lafever.iscool.net if you like it.
I posted this code yesterday but I had comments on it and emails sent directly to me from my web site asking how to use it. Guess that is the problem when you only post the sub routine. So, here is the code again, but this time with a demo project. This uses the API to simulate the minimize effect you see of a form shrinking to the taskbar, but with this code you can shrink it to any place you want, like itself to show it imploding, or the tray, or to the mouse. KEYWORDS: FORM ANIMATION DRAWANIMATEDRECTS FOLD IMPLODE MOUSE TASKBAR EFFECT EFFECTS
The demo will show you how to use ADO to connect to a database hosted on a web server. From there all standard uses of ADO recordsets and what not are possible. I see this question asked a lot in newsgroups so I thought I would share this code here to to help refer them to a working example. Note, the web server has to be a server you have rights to and not just some free web hoster like GeoCities so don't get too excited if you thought that is what this was. This demo will connect to my web server and read data from the NorthWind database found in SQL Server. Also note, my web server cannot handle a lot of traffic so depending on how many people download this and try it, you may have some slow responses or errors on connection. Sorry, but this is just a demo. This code is really not advanced, but many people do not know you can use ADO like this so I just wanted a demo up to point people to later on. Hope it helps some. KEYWORDS: REMOTE DB DATABASE ADO RECORDSET WEB SERVER WEBSERVER CONNECTION SQL IIS
Example code that will show how you can use the custom section (and LoadResData) of the resource file to store misc. files into your executable. Along with that, if one of the files is a .WAV file, to play it directly from the resource file without extracting it. Other parts of the code will show how you can embed JPG files into the resource file instead of .BMP files and use those files for your images in your program. This will help lower the size of your program if you love to use images in your program. Using the same code it will also show how you can extract out files to the users hard drive that were put in the resource file. A good usage of this is lets say you have a DB application and would like to give the ability to make a new DB file, but you want to make sure the DB has the write structure and filled with default data. Just embed your DB file into the resource and extract it out to a new file when the user wants a new file. I know a few days ago somebody else posted code similar, but I had this up here on PSC a long time ago (been removed since) and thought that since resource files can provide so much, it would be a good idea to post again for those who missed the other authors post. KEYWORDS: WAVE WAV RESOURCE LOADRESDATA CUSTOM SOUND PLAY EMBED SNDPLAYSOUND SND_ASYNC SND_LOOP