如何自动选择列表框中的下一个项目 [英] how to Automatically select next item in listbox
问题描述
你好,
我有一个moodest mp3播放器,它有一个播放列表作为listbox1
显示完整路径或每个插入的文件。
问题是,当媒体播放结束时,我希望我的列表框
自动选择下一个(在/下面)项目继续。
我可以在该代码中添加哪些内容:
如果Me.AxWindowsMediaPlayer1.playState =
WMPLib.WMPPlayState.wmppsMediaEnded那么
结束如果
Hello,
I have a moodest mp3 player which has a playlist as listbox1 which
shows full path or each inserted file.
The problem is, when a media playing is ended, i want my listbox to
select automatically next (under/below) item to continue.
What things can i add to that code:
If Me.AxWindowsMediaPlayer1.playState =
WMPLib.WMPPlayState.wmppsMediaEnded Then
End if
推荐答案
9月28日上午11点46分,kimiraikkonen< kimiraikkone ... @ gmail.comwrote:
On Sep 28, 11:46 am, kimiraikkonen <kimiraikkone...@gmail.comwrote:
您好,
我有一个moodest mp3播放器,其播放列表为listbox1
显示完整路径或者每个插入的文件。
问题是,当媒体播放结束时,我想要我的列表框
自动选择下一个(在/下面)项目继续。
我可以在该代码中添加哪些内容:
如果Me.AxWindowsMediaPlayer1.playState =
WMPLib.WMPPlayState.wmppsMediaEnded那么
如果$ b $结束b
Hello,
I have a moodest mp3 player which has a playlist as listbox1 which
shows full path or each inserted file.
The problem is, when a media playing is ended, i want my listbox to
select automatically next (under/below) item to continue.
What things can i add to that code:
If Me.AxWindowsMediaPlayer1.playState =
WMPLib.WMPPlayState.wmppsMediaEnded Then
End if
不应该是:
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1
你可能想做一个if..then测试,以确保你不在列表的
结尾。
谢谢,
Seth Rowe
Shouldn''t it be:
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1
You might want to do an if..then test to make sure you aren''t at the
end of the List however.
Thanks,
Seth Rowe
>
不应该是:
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1
>
您可能想要进行if..then测试以确保您不在列表的
结尾。
谢谢,
Seth Rowe
>
Shouldn''t it be:
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1
You might want to do an if..then test to make sure you aren''t at the
end of the List however.
Thanks,
Seth Rowe
嗨Seth Rowe,
很棒它适用于选择下一个项目,但我无法弄清楚
自动化。可以分配哪个事件或动作?
如果播放媒体因流结束而停止:
如果是Me.AxWindowsMediaPlayer1 .playState =
WMPLib.WMPPlayState.wmppsMediaStopped然后
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1
例如,该代码适用于按钮单击操作,但我想
自动选择下一项,而无需用户提示或用户
鼠标操作。 (比如在Windows Media Player的播放列表中,Winamp的
播放列表)
Hi Seth Rowe,
Great it worked for selection next item, but i couldn''t make out how
to automatize. Which event or action can it be assigned to?
If the playing media is stopped due to end of stream:
If Me.AxWindowsMediaPlayer1.playState =
WMPLib.WMPPlayState.wmppsMediaStopped Then
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1
That code works for a button click action for example, but i want to
automatize selecting next item, without needing to user prompt or user
mouse action. (Like in Windows Media Player''s playlist, Winamp''s
playlist)
kimiraikkonen,
你需要一个媒体播放器的活动,然后才能处理。
看一下媒体播放器的智能性。
Cor
" kimiraikkonen" < ki ************* @ gmail.comschreef在bericht
新闻:11 ***************** *****@57g2000hsv.googlegro ups.com ...
kimiraikkonen,
You need an event from your mediaplayer for this which then can be handled.
Have a look in intelisense of the mediaplayer which there are.
Cor
"kimiraikkonen" <ki*************@gmail.comschreef in bericht
news:11**********************@57g2000hsv.googlegro ups.com...
>
>
>>
不应该是:
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1
你可能想做一个if..then测试,以确保你不在列表的末尾。
谢谢,Seth Rowe
>>
Shouldn''t it be:
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1
You might want to do an if..then test to make sure you aren''t at the
end of the List however.
Thanks,
Seth Rowe
嗨Seth Rowe,
非常适合选择下一个项目,但我不能不知道
如何实现自动化。可以分配哪个事件或动作?
如果播放媒体因流结束而停止:
如果是Me.AxWindowsMediaPlayer1 .playState =
WMPLib.WMPPlayState.wmppsMediaStopped然后
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1
例如,该代码适用于按钮单击操作,但我想
自动选择下一项,而无需用户提示或用户
鼠标操作。 (比如在Windows Media Player的播放列表中,Winamp的
播放列表)
Hi Seth Rowe,
Great it worked for selection next item, but i couldn''t make out how
to automatize. Which event or action can it be assigned to?
If the playing media is stopped due to end of stream:
If Me.AxWindowsMediaPlayer1.playState =
WMPLib.WMPPlayState.wmppsMediaStopped Then
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1
That code works for a button click action for example, but i want to
automatize selecting next item, without needing to user prompt or user
mouse action. (Like in Windows Media Player''s playlist, Winamp''s
playlist)
这篇关于如何自动选择列表框中的下一个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!