The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,676 other followers

Archive for the ‘WinForms’ Category

Full Duplex Asynchronous Read/Write with Named Pipes – CodeProject

Posted by jpluimers on 2018/08/21

When you run on Windows: [WayBack] Full Duplex Asynchronous Read/Write with Named Pipes РCodeProject

via:

–jeroen

Posted in .NET, C#, Development, Software Development, WinForms | Leave a Comment »

.NET/C#: Chaning the ForeColor of a ReadOnly/Disabled TextBox (via: Stack Overflow)

Posted by jpluimers on 2014/12/24

Once every while you still do WinForms work, and bump into something you hadn’t bumped into before.

This time it was trying to set ForeColor = Color.Red on a ReadOnly TextBox for displaying error messages:

  • Using a TextBox means the user can still copy the text to the clipboard.
  • Using a Red foreground draws enough attention (it’s was an app with a really busy user interface).

When setting a TextBox from ReadOnly = false to true sets the BackColor from SystemColors.Window (usually white) to SystemColors.Control (usually light grey), and leaves the ForeColor to SystemColors.WindowText (usually black).

Setting ForeColor = Color.Red (funny there is a plural in SystemColors but not in Color) it doesn’t display it as such:

To my surprise, the TextBox had ReadOnly text (you could copy, but not modify it), which showed with a a grey (SystemColors.Control) BackColor and a black (SystemColors.WindowText) ForeColor: the defaults for a ReadOnly TextBox, not using my ForeColor = Color.Red;

I vaguely remembered there was some odd way of solving this, but since I hadn’t written a blog article about it back then¬†(somewhere around .NET 1.x or 2.0 I didn’t have a blog yet), I was glad that Cheetah¬†posted¬†this answer on StackOverflow: Read the rest of this entry »

Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development, VB.NET, VB.NET 10.0, VB.NET 11.0, VB.NET 7.0, VB.NET 7.1, VB.NET 8.0, VB.NET 9.0, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, WinForms | Leave a Comment »

WinForms Container Controls 5: FlowLayoutPanel

Posted by jpluimers on 2014/03/24

When using a FlowLauyoutPanel, I always forget on which control the FlowBreak design time property / SetFlowBreak run time method operates.

Then I always end up writing a short demo program like Container Controls 5: FlowLayoutPanel.

It operates after the control on which you set it.

It is like text in a Word Processor: it breaks after the place where you set the break. Read the rest of this entry »

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development, WinForms | Leave a Comment »

Samples Environment for Microsoft Chart Controls – Release: Samples for Chart Control – .NET Framework 4

Posted by jpluimers on 2013/06/19

I hadn’t done Charting for a while, but these got going very quickly:

Samples Environment for Microsoft Chart Controls – Release: Samples for Chart Control – .NET Framework 4.

There are example downloads for ASP.NET and WinForms requiring .NET 4 or higher.

In addition, these starting points also proved to be really helpful:

Since my objective was adding charts to an existing WinForms business app, this was the namespace at hand: System.Windows.Forms.DataVisualization.Charting Namespace ().

If you are at .NET 3.5, then start at DataVisualization.Charting.Chart simple example РC# РSnipplr Social Snippet Repository.

–jeroen

Posted in .NET, .NET 4.0, .NET 4.5, ASP.NET, C#, C# 3.0, C# 4.0, Development, Software Development, VB.NET, Visual Studio 2010, WinForms | Leave a Comment »

excel “not enough storage is available to complete this operation (exception from hresult: 0x8007000e (e_outofmemory))” – Google Search

Posted by jpluimers on 2013/04/16

So I won’t forget to research this:

excel “not enough storage is available to complete this operation (exception from hresult: 0x8007000e (e_outofmemory))” – Google Search.

Somehow this occurs with Excel and the .NET app only having a few dozen megabytes of memory in use, so the cause must be something a lot more simple than “out of memory”.

It is a complex export, but I might just be able to get this going using ADO.NET, and make sure it is not a 60+k rows or 60+k characters issue.

–jeroen

Posted in .NET, .NET 4.0, C#, C# 4.0, Development, Excel, Office, Power User, Software Development, Visual Studio 2010, WinForms | Leave a Comment »

 
%d bloggers like this: