Re: 10 SDK - Mystery Syntax

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Jim Travis [ms] (jtravis_at_online.microsoft.com)
Date: 01/08/05


Date: Fri, 7 Jan 2005 22:05:13 -0800

Drop the parentheses:

 .Settings.setMode "Shuffle", True

VB6 thing.

See the Additional Tips on this page:

http://msdn.microsoft.com/library/en-us/wmplay10/mmp_sdk/usingwindowsmediaplayerwithvisualbasic.asp

-- 
Jim Travis
Microsoft Corp.
Windows Media Player SDK
Download: 
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/winmedia.asp
Latest online: 
http://msdn.microsoft.com/library/en-us/wmplay10/mmp_sdk/windowsmediaplayer10sdk.asp
Please do not send email directly to this alias as this alias is for
newsgroup purposes only. This posting is provided "AS IS" with no
warranties, and confers no rights. You assume all risk for your use. © 2004
Microsoft Corporation. All rights reserved.
"Vinson" <Vinson@discussions.microsoft.com> wrote in message 
news:63383FB2-36BE-4491-9FC4-7033BEB39BEA@microsoft.com...
>I have been using the WMP 10 SDK with some success, but cannot get the
> setMode method working within VB6.  Has anyone had any experience using it's
> mystery syntax?
>
> According to the SDK, the syntax is:
> player.settings.setMode(modeName, state)
>
> The "modename" is a string which can read "autoRewind" "loop," 
> "ShowFrame,"
> or "Shuffle."
>
> The "state" is a Boolean which specifies whether the setting is active or 
> not.
>
> Using the code below, VB6 returns an error stating that "=" is expected
> before you can even run the code.
>
>    With WindowsMediaPlayer1
>       .Settings.setMode("Shuffle", True)
>       .Settings.volume = 100
>       .Settings.autoStart = False
>       .enableContextMenu = False
>      End With
>
> Giving it an alternative syntax which satisfies the equal sign and will
> allow you to run the code, but will return an error "Expected Function or
> Variable," such as:
>
> X = WindowsMediaPlayer1.Settings.setMode("shuffle", True)
>
> What syntax does this method need to work correctly?
>
> Thanks!
>
> Vinson
> 


Relevant Pages

  • 10 SDK - Mystery Syntax
    ... I have been using the WMP 10 SDK with some success, ... setMode method working within VB6. ... According to the SDK, the syntax is: ...
    (microsoft.public.windowsmedia.sdk)
  • Re: VB6+ Article in VSM by Bill McCarthy
    ... > block-style syntax. ... it definitely could be in VB6+. ... compiler or a managed compiler, I think the article pretty clearly stated it ... newsgroups, such as the future being only .NET, or that unmanaged code is ...
    (microsoft.public.vb.general.discussion)
  • Re: Is my Control a cotrol array ??
    ... lower bound because the language makes using 0 more "natural". ... You don't need to gut existing syntax to ... There would be literally hundreds of restrictions that full vb6 ... DOS apps still run on XP. ...
    (microsoft.public.vb.controls)
  • Re: VB6 and Microsoft and what to do about it.
    ... >I work for a firm that has everything invested in VB6. ... >that some PCs need to be replaced by newer PCs that comply ... the syntax of a computer language. ... They may own the rights to the name Visual ...
    (microsoft.public.vb.general.discussion)
  • Re: Is my Control a cotrol array ??
    ... lower bound because the language makes using 0 more "natural". ... There would be literally hundreds of restrictions that full vb6 ... in VB6 so requiring the full syntax would not have been a code-breaking ... DOS apps still run on XP. ...
    (microsoft.public.vb.controls)