Prev: App w UC distro
Next: Thanks Re: Send an email
From: hermann leinen on 17 Feb 2010 09:38 Hello! When my form is resized or if the user clicks something from my menu, lots in/ on the form changes (controls are resize, textboxes are moved). Unfortuntately it's not an MDI scenario, else I would simply load another form where everything is already placed where it should be. During the resizing a lot of repaints occur because I need to place some controls over others. I was not able to draw everything myself on one dc and then blit everything as soon as everything was prepared, but I need to use some OCXes as well (while 1 of them is one that I don't have the source code) for. I am using a lot of .Redraw = false flags already and I'm trapping event to see when repaints occur and all, but I still don't get a "static" impression. I see a lot resizing work occur when the user clicks a button and my controls are repositioned. Because I was desparate, I use LockWindowUpdate like this sub Button_Click LockWindowUpdate frmMain.hwnd 'do all repositioning LockWindowUpdate 0 end sub .... but I feel that this is really bad... Could somebody please tell me his opinion? What would you do in such a situation? Thanks a lot. Hermann
From: Dave O. on 17 Feb 2010 11:32 "hermann leinen" <h.leinen(a)gmx.de> wrote in message news:eRIk70%23rKHA.4492(a)TK2MSFTNGP05.phx.gbl... > It's not crappy, I am really into design! LOL Usability trumps prettiness every time. You may have a good reason to move stuff around and it might be right for your specific application but in 99% of cases it just confuses the user and a confused user equates to an unhappy user which in turn means no more sales to that user. Perhaps if you were to explain exactly what you are doing and what you need you'd get some better help. Dave O.
From: Phil Hunt on 17 Feb 2010 12:12 I create many control on the fly too. One thing you may want to do is "hiding" the form instead of unload (this may change your code a little). Also make sure you don't fall into resize event unnecessary like when you open another form and then re-activate. "Dave O." <nobody(a)nowhere.com> wrote in message news:eONBI7%23rKHA.4492(a)TK2MSFTNGP05.phx.gbl... > > "hermann leinen" <h.leinen(a)gmx.de> wrote in message > news:eRIk70%23rKHA.4492(a)TK2MSFTNGP05.phx.gbl... >> It's not crappy, I am really into design! > LOL > > Usability trumps prettiness every time. > You may have a good reason to move stuff around and it might be right for > your specific application but in 99% of cases it just confuses the user > and a confused user equates to an unhappy user which in turn means no more > sales to that user. > > Perhaps if you were to explain exactly what you are doing and what you > need you'd get some better help. > > Dave O. >
From: DanS on 17 Feb 2010 14:30 hermann leinen <h.leinen(a)gmx.de> wrote in news:eRIk70#rKHA.4492(a)TK2MSFTNGP05.phx.gbl: > It's not crappy, I am really into design! > I am a really big fan of drawing everything myself and then just blit > the result. Why ? (If not *absolutely* necessary.)
From: MarkJ on 18 Feb 2010 08:23
The trouble with LockWindowUpdate is that it is system-wide: only one window in the system can be locked at a time. If two applications are using LockWindowUpdate at the same time, one can fail. It's mainly used for drag-and-drop, so you might find drag-and-drop stops working in other programs while your VB6 application is repainting itself. That's why WM_REDRAW is preferred - it's specific to one window so the potential for glitches is removed. http://blogs.msdn.com/oldnewthing/archive/2007/02/22/1742084.aspx |