Cant use System.Windows
-
Hi!! i'm back to disturb u again... This time i wanna know y cant i use System.windows in a console program.. wheneva i type this it shows error.. that it doesn't exists.. but when i choose window application. i uses it... help me out..i need to use it...
-
Hi!! i'm back to disturb u again... This time i wanna know y cant i use System.windows in a console program.. wheneva i type this it shows error.. that it doesn't exists.. but when i choose window application. i uses it... help me out..i need to use it...
You need to add it as a reference. By default, it doesn't get added to console applications. Why would it? They aren't responsible for drawing windows after all.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
You need to add it as a reference. By default, it doesn't get added to console applications. Why would it? They aren't responsible for drawing windows after all.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
Hi!! i'm back to disturb u again... This time i wanna know y cant i use System.windows in a console program.. wheneva i type this it shows error.. that it doesn't exists.. but when i choose window application. i uses it... help me out..i need to use it...
A console application does not include Windows by default. You need to add it to the References section of your project in order to use it. However, if you are developing an application that needs Windows why would you start with a console app?
It's time for a new signature.
-
A console application does not include Windows by default. You need to add it to the References section of your project in order to use it. However, if you are developing an application that needs Windows why would you start with a console app?
It's time for a new signature.
-
Hi!! i'm back to disturb u again... This time i wanna know y cant i use System.windows in a console program.. wheneva i type this it shows error.. that it doesn't exists.. but when i choose window application. i uses it... help me out..i need to use it...
-
how??? i m working on keyloggers... so need to write a console program for it... thats y... i'm using System.Windows.Forms.Keys... but cant use it... as mentioned...
In your solution explorer, right-click References (looks like a folder), Add Reference. Then find the one you need. I will advise you that using keyloggers maliciously (such as to spy on someone, steal passwords etc) is ill-advised, and probably illegal.
-
sir, thats m asking.. how shud i... actually i'm new to VS2008 and C#.. thats y stuck here...
Well, I wonder how you expect to write a working application if you do not understand the basics. However
- Use your mouse to right-click on the References item in Solution Explorer.
- Select the .NET tab in the popup dialog.
- Scroll down to System.Windows.Forms, and select it.
- Click on OK.
- Add the
using
statement to your source module.
[edit]Did I say something wrong here? Got a 1 vote for it anyway[/edit]
It's time for a new signature.
modified on Thursday, July 1, 2010 1:57 PM
-
Well, I wonder how you expect to write a working application if you do not understand the basics. However
- Use your mouse to right-click on the References item in Solution Explorer.
- Select the .NET tab in the popup dialog.
- Scroll down to System.Windows.Forms, and select it.
- Click on OK.
- Add the
using
statement to your source module.
[edit]Did I say something wrong here? Got a 1 vote for it anyway[/edit]
It's time for a new signature.
modified on Thursday, July 1, 2010 1:57 PM
I have noticed that some people down-vote things they don't want to hear, regardless of veracity or technical merit. I wouldn't let it get you down.
-
I have noticed that some people down-vote things they don't want to hear, regardless of veracity or technical merit. I wouldn't let it get you down.