CodePudding user response:
Put video, with WMP controls so that to implement is not too difficult,"Under a machine" instruction, implement the corresponding communication,
Using a serial port, USB interface, WinSock can, see you next a machine for which the
CodePudding user response:
If don't microcontroller, using A keyboard module directly, using VB to call WMP controls, and then press A button, for example, A key on the keyboard, will play A video, press the B button will play another video, I think that how to implement??CodePudding user response:
Create a new standard EXE "" project, add" parts "WindowsMediaPlayer,And then form a WMP control drawing, paste the following code, run to try:
(such as video or mp3 file paths, according to your actual to write, be careful to select it can support the format)
Option Explicit
Private Sub Form_KeyDown (KeyCode As an Integer, Shift the As an Integer)
The Select Case KeyCode
Case 65: WindowsMediaPlayer1 URL="F: \ \ movie crazy stone. Mp4"
'WindowsMediaPlayer1. Controls. Play can need not this, generally it will automatically play
Case: 66 WindowsMediaPlayer1. URL="F: \ \ god of movie. Mp4"
'WindowsMediaPlayer1. Controls. Play
Case: 67 WindowsMediaPlayer1. URL="F: \ \ movie ice age _5: interstellar collision. Mp4"
'WindowsMediaPlayer1. Controls. Play
End the Select
=65 'button code: A, B=66, C=67, the rest and so on, also can be "measured" which key is how much
End Sub
Private Sub Form_Load ()
Me. KeyPreview=True
End Sub
CodePudding user response:
Thank you, godCodePudding user response:
Excuse me a great god, and can call the WMP control playback of audio and video files at the same time?CodePudding user response:
Know, don't have to give directions, thank you