VISUAL BASIC 6.0

  • Thread starter Thread starter JOSE RIVAS
  • Start date Start date
J

JOSE RIVAS

HI PLEASE HELP
Im making a program, that makes a process (OCR process) so
i reach to automate it in order to open a file
("c:\image.bmp") and then executes the ocr process
ok.. it is working fine.. i just need to change that
static route ("c:\image.bmp") for a parameter and generate
a dll or exe file.. cause i will send via VFOXRO this
parameter (in order to automate a batch process of
numerous images)

here some code:
==============
Public Sub OpenFile(ByVal Filename As String)
'(this opens a file)
End Sub
==============
OpenFile "c:\image.bmp"
==============

Ok so that i need is something like
==============
OpenFile myRoute
==============

so i can in FOXPRO:
run myOCRprogram.exe theRoute

ok so..
question: where i have to tell my program it will receive
a parameter? in order to send that route as a parameter
via foxpro??
Q2: and i have to build a dll? or EXE file in order to
accomplish that? (i have many modules and forms)

PLEASE HELP!!!!
THANKS SOME MUCH IN ADVANCE FOR ANY ADVICE!!
(provide code if possible)

JOSE R. LIMA PERU
 
Ok so that i need is something like
==============
OpenFile myRoute
==============

so i can in FOXPRO:
run myOCRprogram.exe theRoute

This is a .NET forum, so my hint is dotnet-related.
If you want to collect commandline arguments for EXE file, you may want to
try Microsoft.VisualBasic.Command() function. Here is what
Help file says:

Returns the argument portion of the command line used to launch Visual Basic
or an executable program developed with Visual Basic.

Public Function Command() As String
Remarks
For applications developed with Visual Basic and compiled to an .exe file,
the Command function returns any arguments that appear after the name of the
application on the command line, as in this example:

MyApp cmdlineargs
Example
This example uses the Command function to get the command-line arguments in
a function that returns them in an object containing an array.

Function GetCommandLineArgs() As String()
' Declare variables.
Dim separators As String = " "
Dim commands As String = Microsoft.VisualBasic.Command()
Dim args() As String = commands.Split(separators.ToCharArray)
Return args
End Function

Hope it helps :-)

sincerely,
--
Sebastian Zaklada
Skilled Software
http://www.skilledsoftware.com
************************************
SQL Source Control 2003 - for
SQL Server Source Safe integration
and custom databases documentation
 
JOSE RIVAS said:
HI PLEASE HELP

Hi Jose,

this group is a VB.NET group ("dotnet"; see group name). Older versions are
handled at one of the microsoft.public.vb.* groups. Please post your
question there. There the answer might be: Command$
 
Back
Top