Help VB Won't listen to me!!!!!
Ok, this makes NO sense to me here. This was working fine until I added code to my form load event to use BitBlt to paint the form background. I have a command button called cmdtoggle. Here is the code I have on it.
VB Code:
Private Sub cmdtoggle_Click()
If cmdtoggle.Caption = "Show Playlist" Then
ListView1.Height = 4215
cmdtoggle.Caption = "Hide Playlist"
Else
ListView1.Height = 6855
cmdtoggle.Caption = "Show Playlist"
End If
End Sub
The button caption says "Show Playlist" by default on startup. Somehow it gets confused and changes between the Show & hide button captions just fine, but it goes haywire on setting the height of listview1. When you click the button, it makes the listview height somthing that goes off the bottom of the screen. Any ideas? Thanks in advance.
I removed this & it works fine......
VB Code:
Private Sub Form_Load()
ScaleMode = 3
Picture1.AutoRedraw = True
Me.AutoRedraw = True
For x = 0 To Width Step Picture1.Width
For y = 0 To Height Step Picture1.Height
DoEvents
BitBlt hDC, x, y, Picture1.ScaleWidth, Picture1.ScaleHeight, Picture1.hDC, 0, 0, vbSrcCopy
Next y
Next x
End Sub
Why does the BitBlt code that paints the form mess up the code on a command button??