473,385 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to make as single execute file

ad
I used vs2005 to develop a winform project.
How can I make my project as a single executable file?
Dec 25 '06 #1
4 5023
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
bool owned;
Mutex mutex = new Mutex(true, Application.ProductName +
"manifest", out owned);
if (owned)
{
if (ThemeManifest.Create())//Create XP Theme
{
Process process =
System.Diagnostics.Process.Start(Application.Execu tablePath);
process.WaitForInputIdle();
Application.Exit();
}
else
{
Run();
}
mutex.ReleaseMutex();
}
else
{
Run();
}

}

private static void Run()
{
bool owned;
Mutex mutex = new Mutex(true, Application.ProductName +
"single", out owned);
if (owned)
{
Application.Run(new MainForm());

mutex.ReleaseMutex();
}
}
}

On Dec 24, 3:17 am, "ad" <fly...@wfes.tcc.edu.twwrote:
I used vs2005 to develop a winform project.
How can I make my project as a single executable file?
Dec 25 '06 #2

"ad" <fl****@wfes.tcc.edu.twwrote in message
news:uH*************@TK2MSFTNGP06.phx.gbl...
>I used vs2005 to develop a winform project.
How can I make my project as a single executable file?
You cannot have a standalone Windows Forms application. The .NET Framework
must be installed to use WinForms. In fact, most scenarios when you would
want a single file (web distribution for example) are exactly when you need
to have code pre-installed in trusted system directories.
Dec 26 '06 #3
You can use RemoteSoft's Salamander products. This will bunding everything
up into a single exe, including all .Net framework components.

We've used this on machines where clients wouldn't allow us to install the
..Net framework, but we still wanted the advantages of building WinForms apps
in .Net.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins

"ad" <fl****@wfes.tcc.edu.twwrote in message
news:uH*************@TK2MSFTNGP06.phx.gbl...
>I used vs2005 to develop a winform project.
How can I make my project as a single executable file?

Dec 26 '06 #4

"Chris Mullins" <cm******@yahoo.comwrote in message
news:up**************@TK2MSFTNGP02.phx.gbl...
You can use RemoteSoft's Salamander products. This will bunding everything
up into a single exe, including all .Net framework components.
How well does it duplicate the run-time semantics? It surely can't
implement security in the same way, because only GAC-installed DLLs can use
AllowPartiallyTrustedCallersAttribute to let applications downloaded from
the web run in a sandbox. Presumably it just appears to the OS as a native
app, resulting in warnings from the browser and then running with full trust
if the user chooses to continue?
>
We've used this on machines where clients wouldn't allow us to install the
.Net framework, but we still wanted the advantages of building WinForms
apps in .Net.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins

"ad" <fl****@wfes.tcc.edu.twwrote in message
news:uH*************@TK2MSFTNGP06.phx.gbl...
>>I used vs2005 to develop a winform project.
How can I make my project as a single executable file?


Dec 26 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Nicolas Fleury | last post by:
Hi everyone, I was wondering if it would make sense to make staticmethod objects callable, so that the following code would work: class A: @staticmethod def foo(): pass bar = foo() I...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
5
by: natzol | last post by:
Is there a way to run query, make file out of query (txt,csv or xls - for example) and save it as a blob into the table column type Image/Text? Any thoughts would be greatly appreciated. ...
2
by: mike | last post by:
Hello, I'm trying to write a function to return submatches. I want to do this because I want to run a match on matches of matches of yet other matches, so it seemed to me it would be easier to...
6
by: Ben | last post by:
Hi We have a Dataset that has been populated from the output parameter of a Stored Procedure (@Output). I understand that I can extract a single item when the dataset is populated by a table...
13
by: VijayJaiswal | last post by:
How can i make and execute assembelly language programes in c language. I have not make a single assembelly program yet, so please give a small example. Also mension all the instructions necessary,...
3
BenTheMan
by: BenTheMan | last post by:
Ok---I was wondering...Is there any way to make C++ execute a UNIX command? Like, I generate LaTeX files in my code, file.tex. Then I need to compile the .tex files with ``pdflatex file.tex''...
2
Fary4u
by: Fary4u | last post by:
Hi i'm trying to make 2 different Connection & Recordset in 1 single file But accessing main values from the Query String, this part is working fine but only problem to access the 2nd part of...
7
by: Steve Bergman | last post by:
I'm involved in a discussion thread in which it has been stated that: """ Anything written in a language that is 20x slower (Perl, Python, PHP) than C/C++ should be instantly rejected by users...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.