Running a shell application minimized

Gette
Member Posts: 19
I have extracted xml files from navision to a specific folder.
A form based timer runs the SHELL function which calls a .NET console application and gives 2 parameters which are filled in dynamically.
I've got 2 problems with this solution:
1. When the shell executes the console application I see the DOS box. The user may not see this. Is there a possibility to hide this.
2. Because the parameters of the application are dynamically filled in, each time the shell executes it askes if the application can be trusted or not. Also this I want to hide from the user.
I don't know if it is possible to solve these 2 issues but any comments are welcome.
Kind regards,
Geert
A form based timer runs the SHELL function which calls a .NET console application and gives 2 parameters which are filled in dynamically.
I've got 2 problems with this solution:
1. When the shell executes the console application I see the DOS box. The user may not see this. Is there a possibility to hide this.
2. Because the parameters of the application are dynamically filled in, each time the shell executes it askes if the application can be trusted or not. Also this I want to hide from the user.
I don't know if it is possible to solve these 2 issues but any comments are welcome.
Kind regards,
Geert
0
Comments
-
Regarding no. 2 you should take a look at the Navision 4.0 late changes document. You can find it in the updated release document on Partnerguide.
In short: You need to store the path and filename to the .exe file in a text constant to avoid the warning...Regards
Peter0 -
Not the ideal solution, but give it a go...
You can try calling your console from a batch file and add the following to the batch file....
@ECHO OFF
<<execute your call to the console here>>
cls
So by the way you can either dynamically create your batch file and delete it after you have executed it, or call it with parameters.
Regards,
Gus0 -
You can use (VB6 or your favorite) to create the following and compile it as a dll. You can then use the dll as an ocx type control in Navision to get a shell command that doesn't have the black window flash. It's kind of hokey, but it is the only way that I know around this.
Public Function ShellCmd(CmdStr As String) As Integer
ShellCmd = Shell(CmdStr)
End Function0 -
Hi
I had the same problem, and the solution for me, was to move the code to a GUI project, and substitute the first line in the Main method with my origional startup line. I see no box, frame or task at the bottom with this hack.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions