Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call external app from .net program

Status
Not open for further replies.

696796

Programmer
Aug 3, 2004
218
GB
Hello,

I need to open an application from my vb.net app but get it to not show ie. (app.Visible = False)

I have not done this before with .net and was wondering how i should:-

a)call the application to be opened
-i need to open a specific document related to
that program ie. a word document
b)make it invisible to my user

I have an example in VBA by my Predecessor
Code:
Sub Form_Timer()
Dim btApp As BarTender.Application
Dim btFormat As BarTender.Format
Dim btDb As BarTender.Database

DoCmd.Hourglass True
Me.TimerInterval = False

Select Case Forms![Profile form]!backupprint

Case True

    Select Case Forms![Profile form]!COUNTRY
    
            Case Is = "UK"
                        
                Set btApp = CreateObject("BarTender.Application")
                btApp.Visible = False
                Set btFormat = btApp.Formats.Open("S:\MFLabelPrinting\printlabels\KlixUK.btw", , "zebra-pprint30")
                'Opens the flavia label format ready for printing, the desired printer is selected
                btFormat.PrintOut (True)
                btFormat.Close (btDoNotSaveChanges)
                'Prints the current record and closes the label format
                Set btFormat = btApp.Formats.Open("S:\MFLabelPrinting\printlabels\KlixDispatch.btw", , "canon-pprint25.fsq.eu.mars")
                'Opens the flavia dispatch label, and selects the desired printer
                btFormat.PrintOut (True)
                btFormat.Close (btDoNotSaveChanges)
                'Prints the current record and closes the label format
                btApp.Quit
                DoCmd.Hourglass False
                DoCmd.Close
                DoCmd.Close acForm, "profile form"
                DoCmd.OpenForm "Main Menu2"

Im am not sure if it is the 'shell' function i should be using or something else, but any help is much apreciated.

Kind Regards,

Alex Marchant
 
process.start(filename)

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Cheers,

i've already used that, which does open the specific file - i thought their may be a more detailed way to do it, so i can command what the program does.

Any ideas on how to make the app not appear?
 
Used mostly same code as before - solved now - cheers anyway
 
696796, what did you change to make it work?

__________________________________________
Try forum1391 for lively discussions
 
Basically just had to reference the bartender namespace
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top