Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / not the place but i dunno where is - delphi 7 question

Author
Message
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 20th Jul 2003 16:24
ok
on vb6 list boxes have an index so you can refer to an item delphi 7 doesnt

procedure TForm1.Button1Click(Sender: TObject);
begin
mediaplayer1.FileName := listbox1.Items;
mediaplayer1.Open;
Mediaplayer1.Play;

end;

a list box i made contains 1 item (the path and filename to a song)
i want this filename property of mediaplayer1 to equal this item. does anyone know why this doesnt happen with my code
Reset
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 20th Jul 2003 17:23 Edited at: 20th Jul 2003 17:25
Delphi 7 does.

ListBox1.Items[index]

will return the value.

or to get the selected item

ListBox1.ItemIndex;

To get the string:

ListBox1.Items[ListBox1.ItemIndex];

Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 20th Jul 2003 21:00
cheers
is there anyway of detecting when a file being played has finished. vb6 used to say mediaplayer1.endofstream=true then.... whats for delphi7

Reset
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 20th Jul 2003 21:56
Why not try BASS ?

Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 20th Jul 2003 22:45
@Frobscottle

Have a look at the EndPos and Position properties

@Toady

Good alternative idea - but why oh why did you use the name "Home Software"?

Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 20th Jul 2003 23:11
cheers
Vb6 is so much easier
I wish vb6 would make dll files
oh well
ill just stare at the help files for a few hours...


2 hours later




2 hours later


2hours later


2 hours later


2 hours later zzzZZZZZzzz

Reset
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 20th Jul 2003 23:43
VB6 isn't really a proper compiler. In the strict sense of the word it does create machine code, however it uses the runtime lib. for the most basic of tasks.

The Object part of Delphi is pretty easy to get to grips with. The only real problem for DLL developers is knowing the Delphi equivilent of certain types in C++.

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 21st Jul 2003 01:28
Because all my software is written at home. I've been using the name for well over 15 years now...


Its better than a poke in the eye...
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st Jul 2003 01:44
oh well, each to his own

Login to post a reply

Server time is: 2024-11-23 12:31:45
Your offset time is: 2024-11-23 12:31:45