Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Where's WindowsFormsApplicationBase class?

Posted on 2013-01-04
13
Medium Priority
?
420 Views
Last Modified: 2013-01-04
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
Comment
Question by:Camillia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +2
13 Comments
 
LVL 30

Expert Comment

by:Randy Downs
ID: 38744188
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
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38744197
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
 
LVL 7

Author Comment

by:Camillia
ID: 38744229
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Author Comment

by:Camillia
ID: 38744236
I added a reference to Microsoft.CSharp.dll, that doesnt give me WindowsFormsApplicationBase either
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 38744253
you can add a reference to the VB library in C#
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 38744257
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
 
LVL 7

Author Comment

by:Camillia
ID: 38744268
Let me try it, Emoreau
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38744392
Very interesting choice of answer selection.
0
 
LVL 7

Author Comment

by:Camillia
ID: 38744463
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
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 38744648
I'm just puzzled why you highlight you are doing it in C# and then accept an answer to use VB.
0
 
LVL 7

Author Comment

by:Camillia
ID: 38744652
because i didnt know i can add VB dlls to C# project. I tried it and it worked.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38744672
there is nothing wrong in using the VB library in C# if it contains features you want!
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 38744689
>>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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question