VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

UniCaption unicode caption for your forms

Vesa Piittinen  (20 Submissions)   VB function enhancement   Beginner   Wed 3rd February 2021

By a request here, I was fooling around with different ways of changing a form's caption to Unicode. I've seen commercial controls that take over the drawing routine with some heavy subclassing and other similar poor attempts, which have then broken, if not when theme changes, then by when Vista got released.
I started off by figuring out a way to create a custom Unicode window and then make an existing form a child of it, but this got pretty messy and I wasn't very happy with the complexity. However, I had a bug during this process that I by mistake used a non-Unicode version of DefWindowProc, which prevented the caption to be Unicode. And it didn't take me long to figure out that by temporarily changing a window's window procedure any window caption can be made Unicode.
So here it is: a very short and clean way to have an Unicode caption in your forms! The code can be pasted directly to your form.

Rate UniCaption unicode caption for your forms (6(6 Vote))
UniCaption unicode caption for your forms.bas

UniCaption unicode caption for your forms Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters