Alex & Access

March 31, 2011

How to redraw Access form on RDC session

Filed under: Access — access @ 12:44 pm

I recently moved one of my applications to terminal services hosting. In most case this works just fine, but in this application I use DBPix ActiveX control with pop-up form (red ring) over it, movable by user:


This combination produced very weird visual effects on terminal server session, basically control area was not repainted correctly. I tried to send WM_PAINT message, InvalidateRect function, nothing helped. So I ended up with following solution: after form load and after event of moving popup form I run .Move form method to move form one pixel left and then back.

If IsRunningInTerminal() Then
       Me.Move Me.WindowLeft + 8
       Me.Move Me.WindowLeft – 8
End If

Not very elegant solution, but it works. And if you know better solution – please post comment here.

By the way, Ammara developing new DBpix 3.0 version with some exciting features!

Blog at