![]() |
| | #1 |
| Registered User Join Date: Aug 2004
Posts: 731
| making a window The peices of code I got so far are this: my using statements Code: using System; using System.Drawing; using System.Windows.Forms; Code: namespace FormTest
{
public class FeaturedForm : Form
Code: static void Main()
{
Application.Run(new FeaturedForm());
}
so with that how do I make a window apear? |
| Rune Hunter is offline | |
| | #2 |
| Registered User Join Date: Aug 2004
Posts: 731
| Ok I have made a window but now I got the black console window behind the window. How do I get rid of or make it so the console window doen't apear. |
| Rune Hunter is offline | |
| | #3 |
| the hat of redundancy hat Join Date: Aug 2001 Location: Hannover, Germany
Posts: 2,769
| There should be a compiler switch for CONSOLE or WINDOWS subsystem. If you select windows, no console window will appear.
__________________ hth -nv She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate." When in doubt, read the FAQ. Then ask a smart question. |
| nvoigt is offline | |
| | #4 |
| Registered User Join Date: Aug 2004
Posts: 731
| alright well than the problem is, I am using code DOM. I want the program be able to make a windows program and that is the hard part. |
| Rune Hunter is offline | |
| | #5 |
| Banned Join Date: Feb 2003 Location: Australia
Posts: 986
| When you call the compiler in the CSharpCodeDomProvider (I think) you pass in a number of options - one is whether or not to create an exe, one is whether to create a console or Win32 program. |
| nickname_changed is offline | |
| | #6 |
| Banned Join Date: Feb 2003 Location: Australia
Posts: 986
| Code: // Create an instance of the CSharpCodeProvider class.
Microsoft.CSharp.CSharpCodeProvider provider = new CSharpCodeProvider();
// Call the CodeDomProvider.CreateCompiler() method to obtain an ICodeCompiler from the provider.
System.CodeDom.Compiler.ICodeCompiler compiler = provider.CreateCompiler();
CompilerParameters cp = new CompilerParameters(referenceAssemblies,
exeFile, false);
// Generate an executable rather than a DLL file.
cp.GenerateExecutable = true;
cp.CompilerOptions += "/target=winexe";
// Invoke compilation.
CompilerResults cr = compiler.CompileAssemblyFromFile(cp, sourceFile);
|
| nickname_changed is offline | |
| | #7 |
| Registered User Join Date: Aug 2004
Posts: 731
| You were close, it is /t:winexe Found that after I knew what I was looking for. Thank you! |
| Rune Hunter is offline | |
| | #8 |
| Banned Join Date: Feb 2003 Location: Australia
Posts: 986
| Ahh sorry my mistake, I used the .NET 2.0 CSC, where it's /target:winexe or /t:winexe. Glad to help |
| nickname_changed is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C or C++ | AcerN30 | Game Programming | 41 | 05-30-2008 06:57 PM |
| Just starting Windows Programming, School me! | Shamino | Windows Programming | 17 | 02-22-2008 08:14 AM |
| 6 measly errors | beene | Game Programming | 11 | 11-14-2006 11:06 AM |
| Fixed window size | The Brain | Windows Programming | 5 | 02-23-2006 03:07 PM |
| Why only 32x32? (OpenGL) [Please help] | Queatrix | Game Programming | 2 | 01-23-2006 02:39 PM |