I have a project that used GDI to do extensive runtime rendering of pictureboxes on the screen. I'm bumping up against the limit of what can be done in a reasonable amount of time. For instance, each PB has a rectangle in it, below which is some text. Both the foreground and background of this text can be colored to indicate something. The border of the rectangle drawn in the PB can also be colored to mean something, and the image drawn into the center of the rectangle can be tinted. The user gets to decide what they want these various indicators to show. The problem is that rendering all this with GDI (there could be dozens of rectangles on the screen at any given time) results in marginal performance. Therefore, I was thinking of changing this over to XNA.
The surface that needs to be drawn on is only a fraction of the total screen area. In fact, it is just a panel in the main window, though the panel takes up the bulk of the main window. Around the panel are a series of other controls, but they are static, though they can be dragged onto the surface. Wherever a drop occurs, I will need to figure out what is under that point to determine what should be done. All that is simple enough, and is mostly done (it had to be done for GDI, as well).
One issue about the drag and drop is that the GDI approach allows that all the rectangles are pictureboxes, which means that I can have different drag cursors to indicate when the mouse is over a drop target and when it is not. That seems problematic if I switch to XNA, where the entire panel is just rendered rectangles, but perhaps it won't really be an issue. That remains to be seen.
What gets drawn into the rectangle will come from code in one of a variety of dlls. Various items can be drawn into the rectangles, and the items are all in dlls so that new items can be developed later as plug-ins. Therefore, the rendering will need to be done external to the form.
The major problem I am having, at this point is that XNA in VB is fairly new, whereas XNA is not very new at all. There are LOADS of tutorials out there for XNA, but they are almost all based on the idea that an XNA app is an XNA project with its own window. The difficulty is filtering through all the references to find something that addresses using XNA in a control on a form in a standard windows project. Since that came along relatively recently, the VAST majority of references are only tangentially useful, at best.
Is there a good reference for drawing images on a control in a Forms based app using XNA? I prefer VB, but a reference in C# would be viable.