Announcement

Collapse
No announcement yet.

Question for Developers - Help find WMP bug workaround

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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/

    Comment


    • #3
      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!

      Comment


      • #4
        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/

        Comment


        • #5
          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!

          Comment

          Working...
          X