|
-
Aug 12th, 2008, 10:54 AM
#1
Thread Starter
PowerPoster
about combine checkboxes values and boolean in property page
i'm using visual basic 6.
i build a property page:
Code:
Private Sub PropertyPage_ApplyChanges()
SelectedControls(0).Transparent = cboTransparent.ListIndex
If cboTransparent.ListIndex = 2 Then SelectedControls(0).TransparentColor = PicTransparentColor.BackColor
SelectedControls(0).GraphicMirror = cboMirror.ListIndex
If chkStretch.Value = 0 Then
SelectedControls(0).GraphicStrecht = False
Else
SelectedControls(0).GraphicStrecht = True
End If
End Sub
i recive an error in second if... i don't hunderstand what isn't right.
can anyone explain to me what isn't right?
the GraphicStrecht property acept boolean values...
thanks
-
Aug 12th, 2008, 11:02 AM
#2
Thread Starter
PowerPoster
Re: about combine checkboxes values and boolean in property page
ok... i resolve the problem:
Code:
Private Sub PropertyPage_ApplyChanges()
SelectedControls(0).Transparent = cboTransparent.ListIndex
If cboTransparent.ListIndex = 2 Then SelectedControls(0).TransparentColor = PicTransparentColor.BackColor
SelectedControls(0).GraphicMirror = cboMirror.ListIndex
SelectedControls(0).GraphicStretch = chkStretch.Value
End Sub
Private Sub PropertyPage_SelectionChanged()
cboTransparent.ListIndex = SelectedControls(0).Transparent
PicTransparentColor.BackColor = SelectedControls(0).TransparentColor
cboMirror.ListIndex = SelectedControls(0).GraphicMirror
If SelectedControls(0).GraphicStretch = True Then
chkStretch.Value = 1
Else
chkStretch.Value = 0
End If
Changed = False
End Sub
but i still confuse... why that error?
thanks
-
Aug 12th, 2008, 11:12 AM
#3
Re: about combine checkboxes values and boolean in property page
What was the error and what did you do to fix it?
-
Aug 12th, 2008, 11:20 AM
#4
Thread Starter
PowerPoster
Re: about combine checkboxes values and boolean in property page
i had these:
Code:
Private Sub PropertyPage_ApplyChanges()
SelectedControls(0).Transparent = cboTransparent.ListIndex
If cboTransparent.ListIndex = 2 Then SelectedControls(0).TransparentColor = PicTransparentColor.BackColor
SelectedControls(0).GraphicMirror = cboMirror.ListIndex
If chkStretch.Value = 0 Then
SelectedControls(0).GraphicStrecht = False
Else
SelectedControls(0).GraphicStrecht = True
End If
End Sub
and i change(fix) to these:
Code:
Private Sub PropertyPage_ApplyChanges()
SelectedControls(0).Transparent = cboTransparent.ListIndex
If cboTransparent.ListIndex = 2 Then SelectedControls(0).TransparentColor = PicTransparentColor.BackColor
SelectedControls(0).GraphicMirror = cboMirror.ListIndex
SelectedControls(0).GraphicStretch = chkStretch.Value
End Sub
error message was:
"run-time error '438'
object doesn't support these property or method"
honestly these error put me confuse...
thanks
-
Aug 12th, 2008, 11:27 AM
#5
Re: about combine checkboxes values and boolean in property page
What line of code blew up that you changed?
-
Aug 12th, 2008, 11:30 AM
#6
Thread Starter
PowerPoster
Re: about combine checkboxes values and boolean in property page
these:
Code:
If chkStretch.Value = 0 Then
SelectedControls(0).GraphicStrecht = False
Else
SelectedControls(0).GraphicStrecht = True
End If
to these:
Code:
SelectedControls(0).GraphicStretch = chkStretch.Value
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|