控件连接了2个自定义属性页,其中1个属性页与2个属性(假定为A、B)进行连接,2个属性分别对应于属性页上的两个文本框;另1个属性页只连接了1个属性(C)。
每次对A和B单独设置时,一点击“应用”按钮,2个属性页就会全部显示,但是在逐句运行又能正常显示单页。
不断修改代码,反复试验了几十次都没能成功,头都要大了。Private Sub txtstrBackground_Change()
Changed = True
End SubPrivate Sub txtstrForeground_Change()
Changed = True
End SubPrivate Sub PropertyPage_ApplyChanges()
SelectedControls(0).strForeground = txtstrForeground.Text
SelectedControls(0).strBackground = txtstrBackground.Text
End SubPrivate Sub Command1_Click(Index As Integer)
Select Case Index
Case 0
strForeFilName = chgValue()
If strForeFilName <> "" And strForeFilName <> txtstrForeground.Text Then
txtstrForeground.Text = strForeFilName
End If
Case 1
strBakFilName = chgValue()
If strBakFilName <> "" And strBakFilName <> txtstrBackground.Text Then
txtstrBackground.Text = strBakFilName
End If
End Select
End Sub麻烦诸位给出出招吧……
每次对A和B单独设置时,一点击“应用”按钮,2个属性页就会全部显示,但是在逐句运行又能正常显示单页。
不断修改代码,反复试验了几十次都没能成功,头都要大了。Private Sub txtstrBackground_Change()
Changed = True
End SubPrivate Sub txtstrForeground_Change()
Changed = True
End SubPrivate Sub PropertyPage_ApplyChanges()
SelectedControls(0).strForeground = txtstrForeground.Text
SelectedControls(0).strBackground = txtstrBackground.Text
End SubPrivate Sub Command1_Click(Index As Integer)
Select Case Index
Case 0
strForeFilName = chgValue()
If strForeFilName <> "" And strForeFilName <> txtstrForeground.Text Then
txtstrForeground.Text = strForeFilName
End If
Case 1
strBakFilName = chgValue()
If strBakFilName <> "" And strBakFilName <> txtstrBackground.Text Then
txtstrBackground.Text = strBakFilName
End If
End Select
End Sub麻烦诸位给出出招吧……
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货