Three method calls that make all the difference

I’ve been coding like crazy the last few days 🙂 on an astronomy-related application. I had to remember lots of trigonometry from 15 years ago 🙁

The application is supposed to be a tool for discovering white dwarfs in our galaxy utilising information from astronomical archives (e.g. SDSS, SuperCOSMOS) through the use of Web Services. It’s been interesting so far. I had to deal with asynchrony issues when interacting with services and when updating the GUI. It’s been fun.

Originally, I used ScPl for drawing the main part of the GUI which deals with a representation of our galaxy and the distribution of stars but due to the large number of plots, the user experience was compromised due to performance issues with the library. So, I decided to do some GDI+ programming myself for the main part of the GUI and only use ScPl (which is fantastic btw) for what it was meant for: the scientific graphs I will have to display later on.

I started drawing on my GUI but I was experiencing flickering during resizing. Then, I discovered these three calls that make a huge difference. Way cool.

SetStyle(ControlStyles.UserPaint, true);

SetStyle(ControlStyles.AllPaintingInWmPaint, true);

SetStyle(ControlStyles.DoubleBuffer, true);

Tools I am using… Having extreme fun with .NET 2.0 and VS.NET 2005 Beta 1 and a couple of astronomy and trigonometry books.

Today I am having sort of a break (girlfriend is back in the evening so have to clean flat etc :-).

Recent Posts

BrainExpanded – Web app and Data Sources

As I wrote in previous posts, the manual recording of memories for BrainExpanded is just…

3 days ago

BrainExpanded – End-to-end working

Imagine a world where your memory is enhanced by a team of intelligent agents, working…

2 weeks ago

BrainExpanded – Login State Caching Issue in iOS Share Extension

As part of the BrainExpanded project, I’m building an iOS app that lets users easily…

2 months ago

Is AI Good or Bad?

Artificial Intelligence (AI) has rapidly evolved over the past few decades, becoming an integral part…

2 months ago

BrainExpanded – Copilot

Happy New Year everyone! I was planning for my next BrainExpanded post to be a…

4 months ago

BrainExpanded – The Timeline

See "BrainExpanded - Introduction" for context on this post. Notes and links Over the years,…

4 months ago