Bonjour à tous !
Je cherche à inclure une console dans un panel de ma form principale. J'utilise allocConsole pour demarrer une console, mais elle est séparée de la form.
Code :
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using System.Runtime.InteropServices;
- namespace waTest
- {
- public partial class Form1 : Form
- {
- [DllImport("Kernel32.dll" )]
- static extern Boolean AllocConsole();
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- AllocConsole();
- Console.WriteLine("test" );
- }
- }
- }
|
Si vous avez des idées je suis preneur !
Merci par avance