くだすれVB6.0以前(超初心者向け)
at TECH
710:デフォルトの名無しさん
09/03/07 23:38:51
>>706
厳密にTopIndexが一つ変化するごとに確実にイベントが欲しい、
とかで無ければタイマ使ってポーリングしたら?
こんな感じのクラスを作って検証してみたが、悪くないように思うけど。
[ListBoxWatcher Class]
Private WithEvents mListBox As ListBox
Private WithEvents mTimer As Timer
Private mTopIndex As Integer
Public Event TopIndexChanged()
Public Property Set ListBox(lb As ListBox)
Set mListBox = lb
Dim frm As Form
Set frm = mListBox.Parent
If mTimer Is Nothing Then
Set mTimer = frm.Controls.Add("VB.Timer", "pollingTimer")
mTimer.Interval = 200
End If
If frm.ActiveControl Is mListBox Then
StartPolling
End If
End Property
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
4225日前に更新/174 KB
担当:undef