vb.net - Panel Controls to Image -


I am trying to save the contents of a picture to an image which is displayed on the picture box, I drawtobitmap method I am using the following:

  Personal sub button handles 3_Click (System.Object, and Sender as System.EventArgs) button 3. Click Dim Bmp as New Bitmap (Panel1.Width, Panel 1. Highlight) Panel 1. DotBetmap (BMP, Panel 1. Client Rectangle) PictureBox 1 BackgroundMage = BMP and All   

Image box displays the image, though the draw order is incorrect.

Enter image details here

box 3 on the left side There is a panel with buttons. In the box on the right side there is a picture box. Note how order is different. Does anyone have any suggestions about how to fix it so that the ordering is the same, as it is on the panel?

"post-text" itemprop = "text">

I did it in C #, but you should be able to translate:

  private Zero Button 3_Click (Object Sender, EventArgs E) {Reverse Control (Panel 1); Var BMP = new bitmap (panel 1 width, panel 1. high); Panel 1 DotBetmap (BMP, Panel 1. Clientrectengel); Picture box 1 Background image = bmp; ReverseControls (Panel1); } Fixed zero reverse control (panel panel) {var control = panel.Controls.Cast & lt; Control & gt; (). Reverse (). ToArray (); Panel.Controls.Clear (); Panel.Controls.AddRange (control); }   

Since it portrays the controls in reverse order, I get a reversal of control and they are removed / read. Then reverse them after the bitmap drawing.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -