VNC question

I am working on adding VNC to my product. The screen is 7", 800x480.

In the OnFlush event, I have the vncServer.Send() call. Depending on the screen that I have displayed the OnFlush Event is only updating a portion of the screen. The width and height variables are not 800 x 480. VNC can only do full-screen updates. So my code looks like this.

if (width == 800 && height == 480)
                    {
                        vncServer.Send(data, x, y, width, height);
                    }

The problem is that some screens never update or the VNC view doesn’t keep up with the screens physically shown on the display. In VNC viewer I will click to another screen and it will change at the display but not in VNC viewer.

To update my screens I Invalidate() individual text boxes in the dispatch timer to update the data in those text boxes. Do I need to invalidate the entire screen to get a full screen sent to OnFlush event?

What is strange is some screens have no problems updating. Others just won’t update. It seems to be the more data that is updating the more likely it is to work okay. Is there something in the graphics library that determines it is more efficient to just do a full-screen update instead of only a partial update?

Are you using UI?
Show us code and simple thing :)) please

I think I found the main issue. To transfer the full 800x480 screen takes about 5 seconds. Looking at Wireshark each packet is about 590 bytes if I recall. (It was a few days ago.) So the main issue is with my application code running there is not enough processor time to send a full-screen update quickly.

If I switch VNC viewer to 256 colors it is much better but the colors are all wonky and make the VNC view almost unusable.

Adding VNC to this project would be an awesome feature but not a requirement. I will circle back to VNC in a few weeks. I have to focus on more application-specific features that need to be added to the project to meet some testing deadlines.