title: vb6: place image control on frame dynamically
body: <p>I'm working on a new UI-element in an vb6 programm. I need to place pictures dynamically on 2 diffenent colored background lines:</p>
  
  <p>I tried out two different ideas but none of them is working:</p>
  
  <p><strong>Idea 1</strong></p>
  
  <p>I used image control and assigned an image to the control. Then I set left, top, with and hight properties to values where I want to place the image. Image was places at correct position but not in foregound on a frame but in background (behind coloured frame).</p>
  
  <p>Can anyone tell me how I can place an image control in foreground (on green coloured frame)? I need to place these image controlls dynamically from code in running program.</p>
  
  <p><strong>Idea 2</strong></p>
  
  <p>In second sulution I tried to use picturebox instead of image control. Picturebox can be placed on colored background (frame) without any problems.
  Here the problem is that loaded picture has to be scaled to size of picturebox picture property. Picture is loaded to picturebox by following code: <code>Picture.Picture = LoadPicture("F:\img.JPG")</code></p>
  
  <p>Does anyone know how I can scale this img to size of picturebox?</p>
  
  <p>Can anyone help me to follow up one of the solutions. In principle I would prefere to use Image controls if it is polible to place them in foreground on frame.</p>