Results 1 to 5 of 5

Thread: Question for Developers - Help find WMP bug workaround

  1. #1
    Maximum Bitrate GingerPrince's Avatar
    Join Date
    Apr 2003
    Location
    Leeds, UK
    Posts
    533

    Question for Developers - Help find WMP bug workaround

    Guys

    I've found what appears to be a bug in the Windows Media Player 9 component, and google searching finds no solution to the problem.

    Basically in CarBox you can switch between any 2 skins ar runtime, however I've noticed that the WMP component doesn't resize correctly. More investigation reveals that if you change the Width and Height properties of the WMP component at runtime, it seems not to tell WMP to resize within its new bounds. I'm coding in Delphi but I understand it to be the same in other languages, using the same component.

    I can get it to correctly resize if I set the components parent to null before resizeing, then set it back, but that clears the status of the player.

    Can anyone find a way to programatically resize a WMP component, and it size correctly? You should be able to reproduct this by dropping a WMP component on a form of choice, then create buttons to increment and decrement width and height.

    Cheers,



    Sy

    GingerPrince

    Car changed for TVR Griffith 500, so computer de-installed. Using a Dension 100ix w/60Gb HD unit in the interim.

    Carputer Install - http://www.stuffandting.com/carputer/
    CarBox Software -- http://www.stuffandting.com/carbox/

  2. #2
    Maximum Bitrate GingerPrince's Avatar
    Join Date
    Apr 2003
    Location
    Leeds, UK
    Posts
    533
    Typical! Spend forever looking at a problem, give up and ask the question, then find the answer straight away

    So it's sorted, cheers

    If anyone cares, a workaround is: -

    wmp.visible := false;
    wmp.width := whatever;
    wmp.height := whatever;
    wmp.visible := true;
    wmp.setfocus := true;


    Sy

    GingerPrince

    Car changed for TVR Griffith 500, so computer de-installed. Using a Dension 100ix w/60Gb HD unit in the interim.

    Carputer Install - http://www.stuffandting.com/carputer/
    CarBox Software -- http://www.stuffandting.com/carbox/

  3. #3
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    I've never had a problem with it....no need for a workaround
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

  4. #4
    Maximum Bitrate GingerPrince's Avatar
    Join Date
    Apr 2003
    Location
    Leeds, UK
    Posts
    533
    Quote Originally Posted by frodobaggins
    I've never had a problem with it....no need for a workaround
    hmmm, must be just a borland thing then. I get the problem in delphi, and i've seen references to the same issue in borland c++ builder.

    Anyhoo, workaround found

    GingerPrince

    Car changed for TVR Griffith 500, so computer de-installed. Using a Dension 100ix w/60Gb HD unit in the interim.

    Carputer Install - http://www.stuffandting.com/carputer/
    CarBox Software -- http://www.stuffandting.com/carbox/

  5. #5
    Maximum Bitrate PTCruiser's Avatar
    Join Date
    Oct 2002
    Location
    Switzerland
    Posts
    476
    I also had this problem...

    Note that I give the answer in the M$ dev forum & my httpc forum

    Glad that you found also the solution...

    wmp.setfocus := false;
    wmp.width := whatever;
    wmp.height := whatever;
    wmp.setfocus := true;

    or

    wmp.parent := nil;
    wmp.width := whatever;
    wmp.height := whatever;
    wmp.parent := formwhatever;
    Epia M9000, lili 7" vga&touch & 2xTM-7002S compo, camera with reversed image, 2.5" 60 GB, 256Mb DDR, Opus 90W, GPS usb... AND MEDIACRUISER of course!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •