The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> Delphi Programming
|
Some help, please.
Discuss Some help, please. in the Delphi Programming forum on Dev Shed. Some help, please. Delphi Programming forum discussing Delphi related topics including Kylix, C++ Builder, and more. Delphi is a high-performance language, originally based on the PASCAL language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

July 17th, 2004, 02:07 PM
|
|
Contributing User
|
|
Join Date: Jul 2004
Posts: 113

Time spent in forums: 1 Day 7 h 56 m 21 sec
Reputation Power: 9
|
|
|
Some help, please.
Hi All. I am new at delphi programming and really need some help.
1) How to change the color of titlebar?
2)How to launch mail program or go to website while clicking on a label?
3) How to change the font name of mainmenu.items?
Any help is highly appreciated.
Anar
|

July 19th, 2004, 03:47 PM
|
|
Contributing User
|
|
Join Date: Jul 2004
Posts: 46
Time spent in forums: < 1 sec
Reputation Power: 9
|
|
Quote: | Originally Posted by Ruh Hi All. I am new at delphi programming and really need some help.
1) How to change the color of titlebar?
2)How to launch mail program or go to website while clicking on a label?
3) How to change the font name of mainmenu.items?
Anar |
1. not too sure, proly tweaking aroun with Win32 API.
2. http://delphi.about.com/library/weekly/aa082499.htm
3. not sure, probably through TActionManager. Never used it so cant say much about it.
Good luck!!
|

July 19th, 2004, 04:12 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
1. You can change the system's idea of title bar color with code like this:
Code:
const
MaxItems = 1;
var
ItemList: array[1..MaxItems] of Integer;
ColorList: array[1..MaxItems] of TColor;
begin
ItemList[1] := COLOR_ACTIVECAPTION;
ColorList[1] := ColorToRGB(clRed);
SetSysColors(MaxItems, ItemList, ColorList);
end;
See SetSysColors in MSDN for more info on this API call. The trouble is that when you change this color, the title color for every window in the system gets changed. If you want just your window to have a different color, consider using a component from here.
http://www.torry.net/pages.php?id=95
2. Use this code on a label's component.
Code:
uses
....rest of files in uses section .... , ShellApi;
...
...
procedure TForm1.Label1DblClick(Sender: TObject);
begin
ShellExecute(0, 'open', 'http://www.yahoo.com/', Nil, Nil, SW_SHOWNORMAL);
end;
procedure TForm1.Label2DblClick(Sender: TObject);
begin
ShellExecute(0, 'open', 'mailto:me@somewhere.com', Nil, Nil, SW_SHOWNORMAL);
end;
3. See http://www.torry.net/pages.php?id=149
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
|

July 22nd, 2004, 12:20 AM
|
|
Contributing User
|
|
Join Date: Jul 2004
Posts: 113

Time spent in forums: 1 Day 7 h 56 m 21 sec
Reputation Power: 9
|
|
|
Hi Lightnin' & Scorpions4ever,
Thanks for your respond, it really helped me a lot.
Just one thing still confuses me, what is the difference between ShellExecute(0, 'open',... and ShellExecute(handle, 'open',... ? Please make it clear for me.
Anar
|

August 24th, 2004, 12:47 PM
|
|
Contributing User
|
|
Join Date: Jul 2004
Posts: 113

Time spent in forums: 1 Day 7 h 56 m 21 sec
Reputation Power: 9
|
|
|
Here goes another question,
How to make Windows XP style ComboBox? Is there any component for this?
|

August 24th, 2004, 05:29 PM
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
combobox xp style
try LMD-Tools a set of 100+ comp, great!!!
http://www.ceberus.com/lmd/
Hi
|

August 26th, 2004, 10:23 AM
|
|
Contributing User
|
|
Join Date: Jul 2004
Posts: 113

Time spent in forums: 1 Day 7 h 56 m 21 sec
Reputation Power: 9
|
|
Questions follow each other
How to assign all true type fonts into combobox?
|

September 1st, 2004, 01:57 AM
|
|
Contributing User
|
|
Join Date: Jul 2004
Posts: 113

Time spent in forums: 1 Day 7 h 56 m 21 sec
Reputation Power: 9
|
|
|
I tried LMD-tools, they are really cool, just u can't use compiled .exe file. It works only at IDE.
I found an answer to my question, used one RichEdit & 1 ComboBox, added ComboBox1.Items:= Screen.Fonts; to onFormCreate event, and RichEdit1.Font.Name:= ComboBox1.Text; on ComboBox onChange event, that works fine for me.
Now, I have 2 items at my combobox, English & Russian. How can I determine the selected item at combobox? For ex. on Button1Click, if the item English is selected then Begin....End, else Begin....End;
|

September 1st, 2004, 01:12 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
|
Check out the free combobox components on torry's site:
http://www.torry.net/pages.php?id=138
http://www.torry.net/pages.php?id=134
This is usually where I head to when I'm looking for components. Better still, quite a few of them are free and some even come with source code.
As for your specific problem, look into the ItemIndex property of the combo box.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|