Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 6th, 2005, 3:04 PM   #1
Pissi
Newbie
 
Join Date: Oct 2005
Posts: 9
Rep Power: 0 Pissi is on a distinguished road
Nice Looking Command buttons..?

How do i make nice looking command buttons?
(dont just say change the style to graphics because thats not good enough )

I have seen nice looking buttons and i wonder how they are made like it..like with bigger curves on the edges and stuff...and also how it would slightly change color on mouse-over

please help, if you can please post here
Pissi is offline   Reply With Quote
Old Dec 6th, 2005, 3:42 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Create a new file called "<your_program_name>.exe.manifest" and put this inside it:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<description>.NET control deployment tool</description>
<dependency>
	<dependentAssembly>
		<assemblyIdentity
			type="win32"
			name="Microsoft.Windows.Common-Controls"
			version="6.0.0.0"
			processorArchitecture="X86"
			publicKeyToken="6595b64144ccf1df"
			language="*"
		/>
	</dependentAssembly>
</dependency>
</assembly>
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Dec 6th, 2005, 4:52 PM   #3
Pissi
Newbie
 
Join Date: Oct 2005
Posts: 9
Rep Power: 0 Pissi is on a distinguished road
I dont get it
Pissi is offline   Reply With Quote
Old Dec 7th, 2005, 2:32 AM   #4
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Ok, listen.

You turn your program into an executabel (.exe) file.

You open up the folder which it is saved in.

Right-Click>New>Text Document.

Copy and paste the content from Oobles post.

Save it as (your_program_name).exe.manifest.


So if i made a program called calc.exe and i wanted a nice style, i'd make a calc.exe.manifest file.
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote
Old Dec 7th, 2005, 5:26 AM   #5
Pissi
Newbie
 
Join Date: Oct 2005
Posts: 9
Rep Power: 0 Pissi is on a distinguished road
Oh right, ill try it out
Pissi is offline   Reply With Quote
Old Dec 7th, 2005, 8:29 AM   #6
stevengs
Professional Programmer
 
stevengs's Avatar
 
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4 stevengs is on a distinguished road
Not that mine is a work of art, but what ever the hell rode you to choose a pseudo like pissy?!?
__________________
-Steven
"Is this a piece of your brain?" - Basil Fawlty
stevengs is offline   Reply With Quote
Old Dec 7th, 2005, 2:30 PM   #7
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Quote:
Originally Posted by Ooble
Create a new file called "<your_program_name>.exe.manifest" and put this inside it:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<description>.NET control deployment tool</description>
<dependency>
	<dependentAssembly>
		<assemblyIdentity
			type="win32"
			name="Microsoft.Windows.Common-Controls"
			version="6.0.0.0"
			processorArchitecture="X86"
			publicKeyToken="6595b64144ccf1df"
			language="*"
		/>
	</dependentAssembly>
</dependency>
</assembly>
Yeah you also need to call the InitCommonControlsA export in ComCtl32 otherwise it'll segfault. Also it's better practice to include the manifest as a resource inside the file, and there are other fields in the xml which are meant to be reflected in your application but aren't normally validated, for instance if you're writing a .NET assembly. I actually made a modified compiler for VB6 that'd do this automatically, as well as UPX and digitally sign it, or make it a console only application...
Rory is offline   Reply With Quote
Old Dec 7th, 2005, 3:51 PM   #8
Pissi
Newbie
 
Join Date: Oct 2005
Posts: 9
Rep Power: 0 Pissi is on a distinguished road
It worked, thanks, now i have to learn to do it myself...somehow.....
Pissi is offline   Reply With Quote
Old Dec 7th, 2005, 10:54 PM   #9
Kilo
Expert Programmer
 
Kilo's Avatar
 
Join Date: Nov 2005
Location: In Pink Clam?
Posts: 542
Rep Power: 0 Kilo is an unknown quantity at this point
Send a message via AIM to Kilo
can someone show me how to do this with C# && C++ ??? I tried doing it this way and my application will not run, stating that the application configuration is incorrect.
__________________
"When in Rome, Do as the Romans Do"
"Beauty is in the eye of the BEER holder"
"Save your breath your going to need it for your blow up doll later"

SearchLores.org
Kilo is offline   Reply With Quote
Old Dec 9th, 2005, 2:38 PM   #10
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Quote:
Originally Posted by Kilo
can someone show me how to do this with C# && C++ ??? I tried doing it this way and my application will not run, stating that the application configuration is incorrect.
Exactly the same, you add a manifest either as a separate file or an RC resource. You then need to call the InitCommonControls function in comdlg32.dll before you create any windows, and then they will all be fully "themed".
Rory is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:04 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC