How would one control an application (Media Player) from the program being created in VB? To sum it up, i would like to control media player (Microsoft Media Player 11) from my program. When i say control, i mean "Play, Pause, Next, Previous, Mute, Stop, etc..."

I want to do this because i have interfaced a microcontroller to my computer, and made a vb.net program to communicate to the MCU via RS232. The next step i would like to accomplish would be to allow the microcontroller to manipulate media player through my program.

Thanks. :)

That isn't quite what i meant. I don't want to make my own media player, i want to manipulate already existing programs, like media player, paint, notepad, etc. I want to actually be able to manipulate a program FROM my program.

So, in other words, instead of me having to go into media player, and clicking "Play", my program would tell media player to "Play". Yes, this may be senseless, but hey, i like to over complicate things. ;)

Take for instance notepad. I would want to be able to (from my program) take text from the clip board, and automatically past it into notepad, with no user interaction.

Is any of this possible?

you can actually add media player to your toolbox and draw it onto a form like acontrol

then you just do e.g (psuedocode)

private sub command1_click
 
mediaplayer.next
 
end sub

Ok, and how would i do that? :s

Thanks for the help so-far, and the fast replies!

Im not sure, i have only ever done it under VB6

Member Avatar for iamthwee

I've not read that link properly, but it would appear it already use windows media player within the program as opposed to creating your own. You would just be adding it as a com object and using the api to access it?

I've not read that link properly, but it would appear it already use windows media player within the program as opposed to creating your own. You would just be adding it as a com object and using the api to access it?

Umm, i don't know... :D I guess i could make "my own" media player within my program, but that won't be as fun... :)


I still don't think i am getting my point across. I want to have media player running at the same time my program is running. (so there are TWO programs running now. 100% separate.) What i want to do is actually manipulate the OTHER program from MY program. I DON'T want media player embedded into my program, i want then separate. I want to know if there is a way to send commands to the actual media player process. So if media player was NOT running, then my program couldn't do anything.

I hope that gets the idea across, i really don't know how else to explain it. :o

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.