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:

image

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!

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: