PDA

View Full Version : Effects/buttons...



Voltrox
28-10-2006, 11:21 PM
Hello,

How do I get started on creating a good looking interface in Delphi?

meaning, i want my application to have pretty buttons that light up and so on...but I have absolutley no idea on how to do it, could someone please advise me on this?

Thank you.

JernejL
29-10-2006, 12:19 AM
try Tpicture that changes images or some custom internet component.

Voltrox
29-10-2006, 01:17 AM
That's not exactly what i meant...

What I meant was something that would allow me to draw on my current image, or something, I created an image in Photoshop.

That image has buttons, but i want it to appear as if those buttons are lighting up.

jasonf
29-10-2006, 01:40 AM
You're going to have to change the image of the object being rendered on the screen when the mouse moves over it.
How you do this is dependant on the framework you're using.
If you're using DelphiX, then you will be doing collision detection against the objects and the mouse position.
If it's a Delphi Form, then you have more options.

But basically, you need to know when the mouse has touched an object so you can change the picture.. then once the mouse has left the object, you set the picture back again.

It is impossible to give a clearer answer without knowing what you're using.

Voltrox
29-10-2006, 02:18 AM
I'm using the ordinary Delphi forms, unless there's something better you can recommend.

the thing is, I already have an image for my program, but, i want the buttons to retain that beveled effect that they have in photshop, but it isn't possible to do that if i cut it out of the photoshop image because it would lose that effect since it isn't on an object in photoshop, meaning, the buttons are pillow embossed into the control panel as one JPEG image, and I am trying to set it up in such a way that the buttons can have that look but allowing them to light up when the mouse hovers over them, and i have no idea of how to make them light up, i already know how to use the mouse events, but the problem is figuring out how to actually change the button, or paint on it, or even paint an entire graphical button in Delphi.


Like for instance, i want it to be able to change like Windows Media Player's buttons, while it has it's pillow emboss style.

tanffn
29-10-2006, 06:57 AM
There are soo many component packs out there that its hard to list them.. I suggest starting with JEDI-VCL (JVCL+JCL) if you can’t find what you need you in JVCL you can search in torry.net

Voltrox
29-10-2006, 01:37 PM
JVCL didn't work in Delphi 2006.

and I went to torry and only saw a long list of components which cost money.

Legolas
29-10-2006, 02:15 PM
You could try to use a simple TImage, handling mouse events to change the image and grab the click on it

JernejL
29-10-2006, 02:18 PM
JVCL didn't work in Delphi 2006.

and I went to torry and only saw a long list of components which cost money.

Oh for crying (http://www.torry.ru/pages.php?id=77) out (http://www.torry.ru/pages.php?id=79) loud (http://www.torry.ru/pages.php?id=573). next time look harder.

Voltrox
30-10-2006, 03:13 AM
that's now what i was looking for...it's n ot helping. :(

I want to create really nice buttons, whether it's in Delphi or in Photoshop, but i need to be able to animate them...could someone please help me?

and someone please help me find a video library?

look at the VFW topic.

thanks.

czar
30-10-2006, 06:18 AM
You have already been given the answer....

Use a TIMage. Make a bitmap for default, disabled and mouse over situation. Assign the correct bitmap to the image. Piece of cake.

I make my main screen in photoshop then cut out a rectangle where the button goes. Apply you mous eover effects and save another rectangle.

That is how I do some of my VCL environments that are not supposed to look like windows environments.

It is a little less flexible than dragging and dropping a tbutton for sure, but you can't have everything.

Experiment...

cronodragon
30-10-2006, 06:28 AM
You can also embed Flash in your Delphi app, it's very cool. Then just link the visual objects to the actions with FSCommand.

Voltrox
30-10-2006, 04:54 PM
How do I do that?

cronodragon
30-10-2006, 04:59 PM
Use the Shockwave's ActiveX control:

http://delphi.about.com/od/graphics/l/aa040103a.htm
http://www.macromedia.com/devnet/mx/flash/activex.html

http://delphi.about.com/library/graphics/useflash.gif

Have fun!

Voltrox
13-11-2006, 08:53 PM
Well, i'm using Delphi 2006...

It's menu's are different, and there isn't a Component|Import ActiveX Control.

But, even if I did get it to work, how would I get the flash buttons to execute Delphi code?

JernejL
13-11-2006, 09:07 PM
Well, i'm using Delphi 2006...

It's menu's are different, and there isn't a Component|Import ActiveX Control.

But, even if I did get it to work, how would I get the flash buttons to execute Delphi code?

that got answered already:

[quote="cronodragon"]
You can also embed Flash in your Delphi app, it's very cool. Then just ]

cronodragon
13-11-2006, 09:18 PM
Hmm, I don't like Delphi 2006... is too similar to Visual Studio :? But, well I used to hate Windows while using DOS, and Delphi while using Turbo Pascal :lol: Maybe I will get used to it some day :P

tanffn
14-11-2006, 07:47 AM
JVCL didn't work in Delphi 2006.

and I went to torry and only saw a long list of components which cost money.

I'm using Delphi2006 and Delphi6 both run fine using JVCL 3.1 and JCL1.96 (~2 month old).

Voltrox
14-11-2006, 10:37 PM
Oh.

What I meant is how do I use the FSCOmmand?

Could you show me an example?

I don't know anything about it..