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
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
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