Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TWindowsmediaplayer

Status
Not open for further replies.

auditdi30

Programmer
Feb 25, 2009
39
NO
Hello!

When I made a program with a Twindowsmediaplayer on it, it looks fine on my computer with xp, but on a vista computer, this component is very small, about 1/4 of it's real size.

Why?? And how can I fix this?? Have tried to put height and width in the formactivate, but doesn't help!!

TIA
Kåre!
 
This is probably because the resolution is much higher on the Vista computer, overall. The control is displaying with default parameters and the same size on both systems. Try out something like this - adjust the numbers as necessary for how you want it to display.

Code:
MediaPlayer1.DisplayRect:= Rect(0, 0, 400, 300);

I'm waiting for the white paper entitled "Finding Employment in the Era of Occupational Irrelevancy
 
Hello!

Have tried this code, but it won't recognised displayrect!!

Are you sure you don't mix it with mediaplayer?? I was asking about twindowsmediaplayer (under activex)

TIA
Kåre!
 
That's what I was thinking, and looked it up online. I looked at my example I have here and the control works exactly the same way as the others in design mode. It can be dragged, and has the standard properties attached to it which control size. Height and Width, Left and Top probably should go into the FormCreate part instead of FormActivate. But you should be able to control the size in design mode much easier.

I'm waiting for the white paper entitled "Finding Employment in the Era of Occupational Irrelevancy
 
Tried to put the code for height, width in the formcreate, but it doesn't help.

As I say it has right size in my xp which has screen resolution of 1280x1024, on the vista as it's got only about 1/4 size, the resolution is 1280x800.

Any other tips??
 
The only other thing I can think of is that the OCX is probably different in Vista than in XP and you probably should regenerate the type library and recompile in Vista.

I'm waiting for the white paper entitled "Finding Employment in the Era of Occupational Irrelevancy
 
Yes, that may be the problem, but I have Delphi installed on a xp machine, therefore I can't recompile it in vista. The program I made is running as I say perfect on a xp computer, but not on a vista.

It must be a solution, but what?!?!?

Regards
Kåre!
 
The only other idea I would have is to make sure you are compiling against the WMP OCX (and not WMP.DLL) on XP and then try copying the file into your program's directory for Vista and see what happens. If that works, then you know the file needs to be present in order for it to work everywhere.

Whether you have the licensing rights to do this is another story, however... But that's what I'd try to see what is going on.

I'm waiting for the white paper entitled "Finding Employment in the Era of Occupational Irrelevancy
 
I did a test under W7 and come to the same conclusion. no fullscreen under vista/w7.

/Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top