Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass a parameter to my .net exe?
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01318881
Message ID:
01319190
Views:
20
I also use .Net 2008. Your .Net app needs to have the class public.

namespace MyNameSpace
{
public class MyFormClass : System.Windows.Forms.Form
{
//Any property that you want to access from
//your VFP applications should be declared public.
//Or you create a public Get and Set method.
public string Property1;

//Also any method that you want to call from VFP must
//be declared public.
public int DoMyStuff()
{
//code
return 0;
}
}
}

>Intersting. I downloaded the demo and installed it, but it doesn't seem to work.
>When I do this:
>
>loCrystalReportsForm = CLRNewObject("form1", "mydotnetapp.exe")
>
>...I get an error sayiing "could not create object form1 possible reason: could not load type 'form1' from assembly 'mydotnetapp'
>
>My app is actually a VS.NET 2008 one. Does this thing work with VS.NET 2008?
>
>
>>If you want to use .net applications with VFP, it might be worth looking at .NetExtender from http://www.etecnologia.net.
>>
>>The code to run the .Net report form then would look like this:
>>
>>
>>loCrystalReportsForm = CLRNewObject("form1", "DotNet.exe")
>>WITH loCrystalReportForm
>>  .ReportName = "XYZ"
>>  .Show()
>>ENDWITH
>>
>>
>>*
>>RETURN llRetVal
>>
>>>I have a very simple .net application. It's just one screen with the crystal report control on it.
>>>
>>>Right now, I have an "open report" button I made that has some code in it like this:
>>>
>>>dlgOpen.InitialDirectory = @"c:\";
>>>dlgOpen.Filter = "Crystal Report|*.rpt|All|*.*";
>>>if (dlgOpen.ShowDialog() == DialogResult.OK)
>>>{
>>> crystalReportViewer1.ReportSource = dlgOpen.FileName;
>>>}
>>>
>>>
>>>...what I want to do is avoid the need for the user to have to click the 'open file' button, and just pass the name of the report with the exe. so in foxpro, I could do something like this:
>>>
>>>Run /n MyNetCRapp.exe myreportnme.rpt
>>>
>>>
>>>...since I'm not up on C# yet I don't have a clue how to do ths..anyone have any ideas?
>>>
>>>Thanks!
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform