Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB 2 questions

Options
  • 15-04-2003 11:01pm
    #1
    Registered Users Posts: 383 ✭✭


    Hi,

    I've got 2 questions about a VB (VB 6, SP 5) project I am doing.

    1. I am using 2 extra components, MSFLXGRD and tabctl32.

    Most machines without VB installed do not have these, so on startup I want to check to see if they are installed. I know the file names are "tabctl32.ocx" and "msflxgrd.ocx", is there any way to verify their existance and if they dont make my error frm appear?


    2. If they aren't installed, then I want to provide a "link" on the frm that the person can click to download the files. How do you create a link (label1.caption) that launches IE?

    thanks for the help.


Comments

  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    1) VB programs need a lot of "stuff" installed alongside them anyway, so as a general rule, if you dont know whats on the target machine, you need to issue a full build. The easiest way to do this is with the setup wizard which comes with VB. Note - it is generally possible to modify these setups to drop out anything you like...so you could set it up to only install the .exe, and the required files for these two controls you want to include

    If you dont want to ship them, then you may have a problem. I would suggest that you try using CreateObject to create a reference to one (assigning it to an Object, rather than a typed variable). If it fails, you know you have problems. Of course, your program may simply refuse to run because its missing required components....so you may need the "check" running as a small start-up app which does this check, then spawns the main app, or delivers an error, then exits.

    2) You need to check up about installing / registering ActiveX controls (OCXs). This approach may not be what you want. Like I said...a more complete install app would be better...but bigger. How - for example - will you cater for the user not having the big-n-orrible VB runtime in place?

    Anyway, if you still want labels (or anything) which go to URLs, have a look at the shell function. See what happens when you give it a URL to shell - it should spawn said URL in your default browser. I'm sure you can figure out where it needs to go :)

    A bit of mouseOver handling, and you can even get it looking like a URL.

    Hope thats of some help. It doesnt answer all questions, but should definitely point you at the right stuff to look at first.

    jc


  • Registered Users Posts: 383 ✭✭cherrio


    all the computers the project will be run on will have the VB runtime dll installed, but may not have the other two installed.

    I know that some variable must contain the enviromental paths, was going to search these to see if the file exists in any of the folders.

    But its code I need, my project does not require any of this, I just thought would be a nice touch. Never did any thing like in in class so I have no clue on how to do it (same goes for excuting sheel commands).

    Been googling for 2 days found nothing useful. Any body got any code that does it?


  • Moderators, Home & Garden Moderators, Regional Midwest Moderators, Regional West Moderators Posts: 16,724 Mod ✭✭✭✭yop


    *********************************
    Dim IE As Object

    Set IE = CreateObject("InternetExplorer.Application")
    IE.Navigate "WWW.RTE.IE"
    IE.Visible = True
    **********************************

    This will launch IE and goto the RTE website

    The other problem you have will be solved by your installer, when you create a package say using the Package and Deployment wizard there is a dependencies file you can view, this will list all the files that will be installed using the package.
    Build this, test it on a clean machine, check that the files exist and the program runs, if it does then there is no need to check if the files exist, only making work for yourself.


  • Registered Users Posts: 383 ✭✭cherrio


    thanks yop, both worked just fine:)

    Can you include a database in the .cab file?


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    Yup. You can.


  • Advertisement
  • Closed Accounts Posts: 9,314 ✭✭✭Talliesin


    Originally posted by bonkey
    The easiest way to do this is with the setup wizard which comes with VB.

    You might think so. Personally I think the setup wizard is the worse installer system ever built and a major blight on the general quality of VB as a development environment.

    If you can justify the expense InstallShield is a joy to use, simple (click here, drag there, yadda yadda) for simple projects, flexible for complicated projects, reliable, and have good customer support.

    If you can't justify such expense then NSIS A.K.A SuperPiMP is free, light, open-source and while it lacks a few features that would be crucial to some projects many of them are provided by other developers.

    I've used both with VB projects, small and large, though it's a while since I used NSIS for anything (not since I got DeVore and Vexorg's signatures on a cheque for InstallShield:ninja: ).


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    I never used NSIS but I'll be having a look at it. Instalshield is a joy to work with. Simple, flexible and powerful. If you get into scripting with it then you're flying high.


Advertisement