Re: Optional Deployment
From: Gary Shell (gshell_at_fuse.net)
Date: 12/07/04
- Previous message: Gary Shell: "Re: Dispatch Template Dialog"
- In reply to: Al Edlund: "Re: Optional Deployment"
- Next in thread: Gary Shell: "Re: Optional Deployment"
- Reply: Gary Shell: "Re: Optional Deployment"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 7 Dec 2004 13:57:05 -0500
But I am not trying to start VISIO per se. I am using the VISIO interop OCX
and instantiating it on a form. If VISIO is not installed, the OCX will
not exist and the program will immediately die. Actually, I doubt if it
will even load.
I am going to have to set up a test environment for this and play around
with it.
But my biggest concern is not at run time. It's the install time issues (if
there are any). Again I haven't tried this yet, I am just investigating
what the pitfalls might be before I jump into it.
Gary
"Al Edlund" <edlund@ameritech.net> wrote in message
news:O9ibMrI3EHA.1152@TK2MSFTNGP14.phx.gbl...
> you might try to start it and test for the return , this is an example of
> starting the app and some testing that might be done. You can also
consider
> trying to start it "invisible"
> al
>
> 'Get the open instance of Visio
> Set visApp = GetObject(, "Visio.Application")
>
> If (visApp Is Nothing) Then
> 'there is no open instance of Visio, Create one
> Set visApp = CreateObject("Visio.Application")
> 'Add a new blank drawing page
> Set visDoc = visApp.Documents.Add("")
> Else
> 'There was an open instance of Visio
> If visApp.Documents.Count = 0 Then
> 'if there are no open documents in this instance of Visio,
> 'Add a new blank drawing
> Set visDoc = visApp.Documents.Add("")
> Else
> 'otherwise, get the currently active document
> Set visDoc = visApp.ActiveDocument
> End If
> End If
> "Gary Shell" <gshell@fuse.net> wrote in message
> news:eK$3sXI3EHA.824@TK2MSFTNGP11.phx.gbl...
> > But what if VISIO is not installed at all? In my instance, if the user
> > does
> > not even have VISIO I want to be able to install and run the application
> > and
> > just disable the VISIO required functionality.
> >
> > Your code is helpful in determining if the user has the correct version.
> > But I am struggling with what to do if they have NO version.
> >
> > Thanks,
> > Gary
> >
> >
> > "Al Edlund" <edlund@ameritech.net> wrote in message
> > news:OhHVgSG3EHA.1264@TK2MSFTNGP12.phx.gbl...
> >> this snippet from one of the sample projects in the v2003 sdk (works
fine
> > in
> >> mine)
> >> Al
> >> Try
> >>
> >> If (vsoApplication Is Nothing) Then
> >>
> >> vsoApplication = CType(application, _
> >>
> >> Microsoft.Office.Interop.Visio.Application)
> >>
> >> majorVersion = CType( _
> >>
> >> Convert.ToDouble(vsoApplication.Version), Short)
> >>
> >> ' Make sure that we're running against the correct version of Visio.
> >>
> >> If (0 = majorVersion Or _
> >>
> >> majorVersion < MinVisioVersion) Then
> >>
> >> If (vsoApplication.AlertResponse = 0) Then
> >>
> >> applicationName = StringUtils.funcLoadString(StringUtils.SampleAppName)
> >>
> >> System.Windows.Forms.MessageBox.Show( _
> >>
> >>
String.Format(StringUtils.funcLoadString(StringUtils.ErrorVisioVersion),
> >> _
> >>
> >> applicationName), _
> >>
> >> applicationName, _
> >>
> >> System.Windows.Forms.MessageBoxButtons.OK, _
> >>
> >> System.Windows.Forms.MessageBoxIcon.Error)
> >>
> >> End If
> >>
> >> Else
> >>
> >> "Gary Shell" <gshell@fuse.net> wrote in message
> >> news:O1dDk0B3EHA.3596@TK2MSFTNGP12.phx.gbl...
> >> >I realize this may be more of a VB.NET question but I have a feeling
no
> > one
> >> > there will know the specifics of Visio so here goes. My VB.NET app
> > which
> >> > is
> >> > using the VISIO Interop OCX will be installed in various
environments,
> >> > some
> >> > of which may or may not have VISIO 2003 installed. The VISIO OCX is
> >> > instantiated on only one form. This one form resides in a separate
> >> > project
> >> > inside my VB.NET Solution. The rest of the app resides in multiple
> >> > forms
> >> > in
> >> > three other projects under the same solution.
> >> >
> >> > At install time, how can I determine if the user does not have VISIO
> > 2003
> >> > and instruct them to try again after they have installed Visio 2003
or
> >> > offer
> >> > to install the rest of the application without the VISIO files. I
> > assume
> >> > at
> >> > run time I can then check for the presence or absence of the VISIO
> > related
> >> > form and disable that functionality.
> >> >
> >> > Gary
> >> >
> >> > I
> >> >
> >> >
> >>
> >>
> >
> >
>
>
- Previous message: Gary Shell: "Re: Dispatch Template Dialog"
- In reply to: Al Edlund: "Re: Optional Deployment"
- Next in thread: Gary Shell: "Re: Optional Deployment"
- Reply: Gary Shell: "Re: Optional Deployment"
- Messages sorted by: [ date ] [ thread ]