Sunday, February 27


Black Magic


    Protected Overrides ReadOnly Property CreateParams() As CreateParams
            Dim cp As CreateParams = MyBase.CreateParams
            cp.ExStyle = cp.ExStyle Or &H2000000
            Return cp
        End Get
    End Property 'CreateParams

If you have, oh, say, a Winforms VB.Net application with a tabbed interface and a variety of controls including a web browser and text boxes and so on, and you resize it, it will flicker like mad.  You can set it to double-buffer, and nothing whatsoever will change.

Add this little snippet of code to the form and suddenly the flicker is gone.  Just gone.  It works exactly how you would expect.

Why is this not the default - no, the only available - setting?

It's Microsoft.  Don't ask why.

Why are you working in Visual Basic?

Because I haven't done any Windows GUI programming in ten years, and VB.Net lets me doodle around, get a workable interface, and then write all the serious stuffs in IronPython.  (Importing all of IronPython adds about 1.4MB to the project for immeasurable added functionality.)

Okay, why are you working in Windows at all?

Miko, the desktop client for Minx.  Although the aim is for it to be more of a peer than a client.

Cool.  Why Winforms rather than WPF?

Yeah, well.  WPF is very much its own universe.  I can slap together a Winforms app and it seems to work much the same way that pre-.Net Windows coding did.  With WPF, even the form designer looks broken to me.

I didn't understand any of that.  Do you have any more pictures of Sayaka Isoyama?

Of course.

Posted by: Pixy Misa at 04:23 PM | Comments (2) | Add Comment | Trackbacks (Suck)
Post contains 263 words, total size 2 kb.

1 I would rather prefer a doc for Minx API than a Windows binary client, because I don't have a Windows system readily available to me, and mucking around with VMs is too much bother. But sure... I suppose someone wanted that.

Posted by: Pete Zaitcev at Monday, February 28 2011 04:57 AM (9KseV)

2 Will do.  The bulk of the code will be Python via IronPython, so you'll be able to plunder it for sample code.

Posted by: Pixy Misa at Monday, February 28 2011 08:43 AM (PiXy!)

Hide Comments | Add Comment

Comments are disabled. Post is locked.
46kb generated in CPU 0.0176, elapsed 0.1039 seconds.
56 queries taking 0.0932 seconds, 333 records returned.
Powered by Minx 1.1.6c-pink.