dcsimg
December 10, 2016
Hot Topics:

Tips from The Lost Disc

  • November 19, 2002
  • By Dax Pandhi
  • Send Email »
  • More Articles »

Before you say anything, I dunno, it sounded cool, that's all no other reason for the cheesy title. Basically, what we have here are a bunch of highly significant tips from our dear readers, along with a bunch of important FAQs. Here goes nothing!

Q: How Do I Create Custom Uninstallation Utility for setup1.vbp?

A: Wellermyou don't! The Geek Gods of Microsoft did not give us that customizability. L Though, if someone does know how, please mail me! J

Q: How Can I Show a "Percentage" text label in the file copy dialog?

A: Oh dear, another disappointment for you guys, sorry, you can't. Microsoft made the progress bar not from ComCtl or some other OCX but from a damn PictureBox , so I think you can pretty much guess why we can't show a % label.

Q: I Need To Store Some BMPs/JPGs for backgrounds, but I don't want to bootstrap them.

A: If you don't want to bootstrap, the best option is to use resource files (see Part 3) and try to keep them under 64kb .

Q: Can I change the progress bar in the file copy dialog?

A: Oh dear, don't EVER do that! I tried to do it and I ended up writing and modifying about 400 lines of code! When setup1.vbp was made (originally at Microsoft) those naughty weenies still hadn't figured the meaning of full customizability...

Q: How can I create start menu type links or icons on the desktop or other places?

A: Okay, about 80 people mailed me on this, I know I told them to wait for the next part, so here's my answer:

You already have the solution sitting in basSetup1.bas!

Now, I'll answer your question, but only if your promise to explore the wonders of setup1.vbp because there are a LOT of them that even I haven't yet touched!

Here's the function you'll need to create shell links or start menu icons for your non-geeks. Please note you will have to modify this function a bit to throw icons off the start menu and onto the desktop or so. But I won't go into that, as it'll be a good exercise for you:

'-----------------------------------------------------------' SUB: CreateShellLink'' Creates (or replaces) a link in either Start>Programs or' any of its immediate subfolders in the Windows 95 shell.'' IN: [strLinkPath] - full path to the target of the link'     Ex: 'c:\Program Files\My Application\MyApp.exe"'     [strLinkArguments] - command-line arguments for the link'     Ex: '-f -c "c:\Program Files\My Application\MyApp.dat" -q''     [strLinkName] - text caption for the link'     [fLog] - Whether or not to write to the logfile (default'                is true if missing)'' OUT:'   The link will be created in the folder strGroupName'-----------------------------------------------------------'Public Sub CreateShellLink(ByVal strLinkPath As String, _ByVal strGroupName As String, ByVal strLinkArguments As _String, ByVal strLinkName As String, ByVal fPrivate As _Boolean, sParent As String, Optional ByVal fLog As _Boolean = True)

Please note that you don't have to copy this code anywhere, it already exists in the bassetup1.bas module. If you do modify it, copy the entire function and paste it at the bottom of the module, and rename it to something else because setup1.vbp initially needs CreateShellLink for use in the setup.

Also, I DO NOT mean to discourage you by not giving you the entire cut-n-paste code. But c'mon - you're red-blooded Visual Basic programmers - get off you butt (or on your butt) and find out how, search the 'names' in modShell.bas, read the entire code of CreateShellLink in basSetup1.vbp go, you can do it! And with all this encouragement, even Elvis would give it a go (uh-huh-huh).

"C'mon, kids, wash our hands before dinner" Nag Screens!

I love nag ads and nag screens in "unregistered" software especially the ones I create myself!

It's like in the soft shiny-shoe life of Cherry Blossom - the shoe-brush is suddenly broken, isn't it?

Or maybe like on a 8-lane highway without any cars your tires burst into a flat! It is a important to have nag screens especially in freeware to make those user see that you a great human before letting them use your hard-work! ;)

Here's an example of what a nag screen in a setup program should look like:

Some Nag Tips

Make the nag form stay on top and create a timed progress bar with the following code, then the user will HAVE to read what you say until the time runs out:

Private Sub Timer1_Timer()Progress1.Value = Progress1.Value + 1If Progress1.Value = 100 Then   Unload Me   FrmMyForm.ShowEnd IfEnd Sub

Then, set the Timer Interval property to 100. Optionally, you can set the progress bar's Visible property to False to irritate the user ;)





Page 4 of 7



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date
Rocket Fuel