Status
Not open for further replies.

ravimevcha

Journeyman
Merge an .exe and a .dll into one .exe

download ILMerge
*research.microsoft.com/~mbarnett/ilmerge.aspx
put "ILMerge.exe" in your \WINNT directory
In VS.NET, right click project, Properties, Common Properties, Build Events
In "Post-build Event Command Line" enter:
ilmerge /out:$(TargetDir)YOURAPPNAME.exe $(TargetPath) $(TargetDir)YOURDLLNAME.dll
Then compile the Release version (not the debug version).
In your "bin\Release" directory, you will find a YOURAPPNAME.exe which can be run on its own without the .dll
 
OP
R

ravimevcha

Journeyman
Developing XP Style Applications

There are two steps:
1) write an assembly manifest file;
2) change the property of your controls setting FlatStyle property = system.
N.B.
Dont worry if you cant see any changes in your VS Studio environment, the changes have effect only on the *.exe file, so that you can see the difference, only when you run the program.
Lets look at how to write the manifest:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="Lorien2000.XPStyle.XPStyle"
type="win32"
/>
<description>XP Style Controls</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
name="Lorien2000.XPStyle.XPStyle" where, Lorien2000 is the name of your company, XPStyle the name of your product, XPStyle the name of your exe file, in general is:
name="Company.NameProgram.ExecutableFile"

<description>XP Style Controls</description> here you can put the descriptions of your product.

name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"

its the version of the controls that you want to use.

And finally, and the most important thing is to save the file as: YourProgram.exe.manifest

The second step is to change the property of your controls
 
OP
R

ravimevcha

Journeyman
Non Rectangular Forms

Have you ever wondered how you can create nonrectangular forms? Windows Media Player is a good example. When you switch to different skins, the border changes shapes. It seems like quite a difficult task, but it ends up being extremely simple. It's really only a few lines of code! But these few lines of code can make a big difference in the visual impression your project creates.

First create a new Windows Forms project using C#. (This can be done in any .NET language, but we'll use C# for this example.) Add a button to the middle of the form. Add this code to the button:


private void button1_Click(object sender, System.EventArgs e)
{
System.Drawing.Drawing2D.GraphicsPath p = new System.Drawing.Drawing2D.GraphicsPath();
int width = this.ClientSize.Width;
int height = this.ClientSize.Height;
p.AddClosedCurve(new Point[]{new Point(width/2, height/10),
new Point(width,0), new Point(width, height/3),
new Point(width-width/3, height),
new Point(width/7, height-height/} );
this.Region = new Region(p);
}
 
Status
Not open for further replies.
Top Bottom