• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 441
  • Last Modified:

Where's WindowsFormsApplicationBase class?

I'm following this example, method 2 but doing it in C#
http://emoreau.com/Entries/Articles/2008/11/Passing-arguments-to-an-application-startup.aspx

I have this but I cant find WindowsFormsApplicationBase

namespace Scene7API
{
    class cStartup : Microsoft.CSharp.// (but i dont see other methods to get me to the namespace above

    {
    }
}
0
Camillia
Asked:
Camillia
  • 5
  • 3
  • 2
  • +2
1 Solution
 
Randy DownsOWNERCommented:
Maybe this will help
http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.applicationservices.windowsformsapplicationbase(v=vs.80).aspx

public class WindowsFormsApplicationBase : ConsoleApplicationBase

Open in new window

0
 
käµfm³d 👽Commented:
It tells you in the article:

Public Class cStartup
   Inherits Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase
End Class

Open in new window


You'll probably need to add a reference to Microsoft.VisualBasic.dll.
0
 
CamilliaAuthor Commented:
I'm using C# tho...not VB. Let me add a reference to Microsoft.CSharp.dll

Now, If I use
public class WindowsFormsApplicationBase : ConsoleApplicationBase

That's WindowsFormsApplicationBase inherting from ConsoleApplicationBase....

I need (per that article) my class to inherit from WindowsFormsApplicationBase
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
CamilliaAuthor Commented:
I added a reference to Microsoft.CSharp.dll, that doesnt give me WindowsFormsApplicationBase either
0
 
Éric MoreauSenior .Net ConsultantCommented:
you can add a reference to the VB library in C#
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
You probably don't need it.
What are you trying to do ?
start an app AND pass arguements to it ?
read the arguements passed to the current app ?
Start only one instance of an app ?
0
 
CamilliaAuthor Commented:
Let me try it, Emoreau
0
 
käµfm³d 👽Commented:
Very interesting choice of answer selection.
0
 
CamilliaAuthor Commented:
oh, i'm sorry. I just saw that you have the same answer at the botton of your answer. If I can reopen and divide the points, i can do that.
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
I'm just puzzled why you highlight you are doing it in C# and then accept an answer to use VB.
0
 
CamilliaAuthor Commented:
because i didnt know i can add VB dlls to C# project. I tried it and it worked.
0
 
Éric MoreauSenior .Net ConsultantCommented:
there is nothing wrong in using the VB library in C# if it contains features you want!
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
>>there is nothing wrong in using the VB library in C# if it contains features you want!

Agreed - but maybe there is a simple C# way to accomplish what was required.  (One can get from A to D round a square by going A..B..C...D if one wants but maybe A..D is more suitable).

Anyway as long as it works.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 5
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now