2

I use a virtual PC (with remote desktop connection) for my project. The project uses some GDI+ functionality.

Now, apparently there is a problem when displaying graphics object on the real and virtual PC.

A simple example:

public class Form1 : Form 
{
    private void Form1_Paint(System.Object sender, 
                             System.Windows.Forms.PaintEventArgs e)
    {
        Graphics g = e.Graphics;
        
        using (Pen pen = new Pen(Color.Blue, 3)) {
            g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias;
            g.DrawLine(pen, 10, 10, 50, 150);
            g.SmoothingMode = Drawing2D.SmoothingMode.None;
            g.DrawLine(pen, 30, 10, 70, 150);
            
        }
    }
}

Result:

Virtual PC                                  Real PC

alt text http://lh6.ggpht.com/_1TPOP7DzY1E/S45E8Ns3X0I/AAAAAAAADFE/3SROt2yQz_w/s800/Capture4.png

So, for a "virtual" development is should be take in consideration. Have you had the similar situations?

Pontus Gagge
  • 17,166
  • 1
  • 38
  • 51
serhio
  • 28,010
  • 62
  • 221
  • 374
  • Basically running an application on a virtual PC can cause the same problems as running the application on another real PC. Your problem seems to have nothing to do with the virtual PC but rather with the graphics configurations. – Habi Mar 03 '10 at 11:37
  • @Habi, however on a real PC you will not have such a problem (only if you manually set a "special" graphic mode). The problem is with RDC, one other can be when you can't have, actually, two monitors etc. so there can be some problems with "non-real" development platforms. – serhio Mar 04 '10 at 08:28

1 Answers1

4

This is problem with RDC, not with virtual desktop. RDC can remove antialiasing, for example, to achieve lower data transmission.

Solutions:

  • Not use RDC, open your VM in VMWare/whatever
  • RDC does have settings , where you can disable some features, try enabling all of them / setting 'better' internet connection
nothrow
  • 15,882
  • 9
  • 57
  • 104