If the form is already painted will it not repaint it? I know this is not TRUE skinning, but it suits my program. I want this to change the main forms background when a user selects it from the dropdown list so they can have a preview before saving the setting. Here's my code. Do I have to erase the form or something of the sort first?
VB Code:
  1. Private Sub comboSkin_Click()
  2. Kamo2.Picture1.Picture = Kamo2.ImageList1.ListImages(liboptions.comboSkin.ListIndex).Picture
  3.  
  4. ScaleMode = 3
  5.     Kamo2.Picture1.AutoRedraw = True
  6.     Kamo2.AutoRedraw = True
  7.    
  8.     For X = 0 To Width Step Kamo2.Picture1.Width
  9.         For Y = 0 To Height Step Kamo2.Picture1.Height
  10.             DoEvents
  11.             BitBlt hDC, X, Y, Kamo2.Picture1.ScaleWidth, Kamo2.Picture1.ScaleHeight, Kamo2.Picture1.hDC, 0, 0, vbSrcCopy
  12.         Next Y
  13.     Next X
  14. ScaleMode = 1
  15. End Sub