Jump to content

WMP changing visualization

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
nojbox87

nojbox87

    Newbie

  • Members
  • Pip
  • 5 posts
I have made a visual basic 2008 express program which uses the windows media component to make my own version of media player. i can start and stop media, select which file i want to play but i cannot find a way to change which visualisation is being shown. does anybody know how to change visualisations programatically?

Thanks in advance,
Jon

#2
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Try exploring the IntelliSense lists to see if there are any object members you can change.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#3
nojbox87

nojbox87

    Newbie

  • Members
  • Pip
  • 5 posts
I assume by that you mean the lists that appear while you type code (Sorry i am quite new to this) if so then i have tried already and cannot seem to see anything that referenced to Visualizations and i cannot seem to find anything on the net about this.

Thanks for you prompt reply,

Jon

#4
gaylo565

gaylo565

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 268 posts
Here is the MSDN link for creating and rendering custom visualizations. All you should need is the rendering section I would think:)
Custom Visualization Programming Reference

#5
nojbox87

nojbox87

    Newbie

  • Members
  • Pip
  • 5 posts
That seems to be the stuff i am looking for.

Sorry for being really thick but i cannot work out how to get to these things

e.g.

the render method.

I can set play states easily e.g. Player.Ctlcontrols.stop() but i cannot seem to find the render option anywhere.

Thanks for all your help so far.

#6
nojbox87

nojbox87

    Newbie

  • Members
  • Pip
  • 5 posts
OK forget my last post. I am getting somewhere, but have hit a wall and i think its something silly.

The code i have is

Dim Vis As IWMPEffectsCtrl
Label1.Text = Vis.CurrentEffect

But it gives an error message: Variable Vis has been used buefore it has been assigned a value.

what do i need to add?

#7
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Vis needs to be instantiated in OOP. Try this:

[HIGHLIGHT=vb]Dim Vis As New IWMPEffectsCtrl()
Label1.Text = Vis.CurrentEffect[/HIGHLIGHT]
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#8
nojbox87

nojbox87

    Newbie

  • Members
  • Pip
  • 5 posts
Thanks for all your help so far.

OK i tried that change (added 'New') but this time i get:

"'New' Cannot be used on an interface"

Any suggestions?