Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Focus


Message #1 by pd_otoole@h... on Wed, 24 Jul 2002 20:03:02
Okay, here goes:

1.  Copy the entire Setup1 project folder to a backup folder.  Setup1 is
normally located in C:\Program Files\Microsoft Visual
Studio\VB98\Wizards\PDWizard\Setup1.

2.  Open the Setup1.vbp project in VB6.

3.  In frmSetup1.Load, comment the statement:
'    Case UCase$(gsSTARTMENUKEY), UCase$(gsPROGMENUKEY)
    and insert the following immediately after it:
     Case UCase$(gsSTARTMENUKEY), UCase$(gsPROGMENUKEY), "STARTUP"

4.  In the module basSetup1, comment the statement:
'    CreateShellLink strProgramPath, strGroup, strProgramArgs,
strProgramIconTitle, fPrivate, sParent
    and insert the following immediately after it:
     If UCase(strGroup) = "STARTUP" Then
         strGroup = "\Startup"
         CreateShellLink _
             strProgramPath, _
             strGroup, _
             strProgramArgs, _
             strProgramIconTitle, _
             0, _
             sParent
     Else
         CreateShellLink _
             strProgramPath, _
             strGroup, _
             strProgramArgs, _
             strProgramIconTitle, _
             fPrivate, _
             sParent
     End If

5.  Save the project and compile it to Setup1.exe in the project folder.

6.  Rename Setup1.exe in C:\Program Files\Microsoft Visual
Studio\VB98\Wizards\PDWizard\ (the project's parent folder) to Setup1.orig,
then copy your new Setup1.exe into that folder.

7.  Run the Package and Deployment Wizard on your app.

8.  Edit setup.lst (generated by P&D Wizard), and change the sections that
look like this:

    [IconGroups]
    Group0=Your App Name
    PrivateGroup0=-1
    Parent0=$(Programs)

    [Your App Name]
    Icon1="YourApp.exe"
    Title1=Your App Name
    StartIn1=$(AppPath)

    [Setup]
    Title=Your App Name
    DefaultDir=$(ProgramFiles)\YourApp
    AppExe=YourApp.exe
    AppToUninstall=YourApp.exe

to look like this:

    [IconGroups]
    Group0=Your App Name
    PrivateGroup0=-1
    Parent0=$(Programs)
    Group1=Startup
    PrivateGroup1=-1
    Parent1=$(Programs)

    [Your App Name]
    Icon1="YourApp.exe"
    Title1=Your App Name
    StartIn1=$(AppPath)

    [Startup]
    Icon1="YourApp.exe" /S
    Title1=Your App Name
    StartIn1=$(AppPath)

    [Setup]
    Title=Your App Name
    DefaultDir=$(ProgramFiles)\YourApp
    AppExe=YourApp.exe
    AppToUninstall=YourApp.exe

9.  Install your app, and restart your PC to prove that your app is
automatically started when the machine is booted.

HTH, Pete

-----Original Message-----
From: pd_otoole@h... [mailto:pd_otoole@h...]
Sent: Saturday, July 27, 2002 10:39 AM
To: professional vb
Subject: [pro_vb] Re: Focus


Thanks for the help. I use the Packaging wizard, and am happy using
it. But have not seen this area you mention. I would be hapy to
see this code you mention.

Desmond.

> If you're packaging your app with Microsoft's Package and Deployment
Wizard,
I have a solution for you -- it entails a simple modification to the Setup1
app allowing you to place a shortcut to your app in the Startup folder.
I'd
be happy to provide details if you're interested.

Pete

-----Original Message-----
From: pd_otoole@h... [mailto:pd_otoole@h...]
Sent: Thursday, July 25, 2002 8:01 PM
To: professional vb
Subject: [pro_vb] Re: Focus


Thanks to everyone who helped me with my tool tray Icon. This works
fine. The only outstanding problem, which I will not need yet is to do
some kind of install that boots an aplication.  I.E. when I boot my PC
there is a Norton Ativirus Icon allready there and can lauch the
aplication. If there are any advanced books on this I would love to know
I'm gessing that the Icon is an aplication in it's own right and loaded
into the tooltray. but I can't find it in the startup folder.

Desmond.



> I have created an application that places an Icon in the tool tray, but
I>  have to click the Icon once to get focus, even though the tool tip
w> orks on a mouse over event. Is there a way of gaining the focus
o> n the mouse over event.

>
T> IA

> Desmond.

---
Visual C# - A Guide for VB6 Developers
This book will make it easy to transfer your skills
from Visual Basic 6 to C#, the language of choice
of the .NET Framework.
http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059



---
Visual C# - A Guide for VB6 Developers
This book will make it easy to transfer your skills
from Visual Basic 6 to C#, the language of choice
of the .NET Framework.
http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059



  Return to Index