SkillAgentSearch skills...

WindowsForms.Console

Component for WindowsForm

Install / Use

/learn @msx752/WindowsForms.Console

README

nuget NuGet Build status

WindowsForms.Console

Component of WindowsForm

Usage

  • import nuget package to the project
        Install-Package WindowsForms.Console

Example Usage

All examples assume you have added the FConsole control to your form (named fconsole1). Both direct usage and extension methods are shown. For input, async/await is recommended.

// Write a line to the console
fconsole1.WriteLine("Hello, World!");
this.WriteLine("Hello, World!"); // Extension method (inside a Form)

// Write a line with a specific color
fconsole1.WriteLine("Success!", Color.Green);
this.WriteLine("Success!", Color.Green); // Extension method

// Write text without a newline
fconsole1.Write("Processing...");
this.Write("Processing..."); // Extension method

// Write colored text without a newline
fconsole1.Write("Warning!", Color.Orange);
this.Write("Warning!", Color.Orange); // Extension method

// Read a line from the console (asynchronous)
string input = await fconsole1.ReadLine();
string input2 = await this.ReadLine(); // Extension method

// Read a single key from the console (asynchronous)
char key = await fconsole1.ReadKey();
char key2 = await this.ReadKey(); // Extension method

Note: ReadLine and ReadKey are asynchronous and should be awaited inside an async method for best UI responsiveness. Synchronous blocking is possible but not recommended on the UI thread.

FConsole

Supported Platforms

moved to security.md

Dependencies

  • System.Windows.Form
  • System

FrameworkReferences for the .NetCore and upper

  • Microsoft.WindowsDesktop.App.WindowsForm

Example Project

Related Skills

View on GitHub
GitHub Stars21
CategoryDevelopment
Updated2mo ago
Forks4

Languages

C#

Security Score

95/100

Audited on Jan 3, 2026

No findings