|
i have a windows application with button 'check for updates'
my problem is that when i click on 'check for updates' button, i close the program first then open it again
this.Close();
System.Diagnostics.Process.Start(mypath);
where my path is the path of the *.exe file
all that i need is
1- keep the program running without closing it
2- show loading image until getting result from the updater
3- show the program updater result
any idea about how to show loading and get updater result without closing and re-opening the application???
|
|
|
|
|
this.Close();
will defnitly close ur program
i dont think u need it part of what ur trying to do
|
|
|
|
|
John_Tadros wrote: any idea about how to show loading and get updater result without closing and re-opening the application? It's difficult to guess without knowing what your program is doing, or what it needs to do, at this point.
Use the best guess
|
|
|
|
|
Look into "click once" deployment, it solves this problem without you having to get into the details.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
There are frameworks which u can integrate to ur application. ClickOnce will be one of the option but you need you assemblies signed.
here are the free libraries which provides automatic updates
<a href="http://autoupdatemodule.codeplex.com/">http://autoupdatemodule.codeplex.com/</a>
<a href="http://autoupdater.codeplex.com">http://autoupdater.codeplex.com</a>
<a href="http://brice-lambson.blogspot.in/2011/03/automatic-update-for-codeplex-projects.html<">http://brice-lambson.blogspot.in/2011/03/automatic-update-for-codeplex-projects.html<</a>/pre>
<div class="signature">Maulik Dusara
Sr. Sofware Engineer
</div>
|
|
|
|
|
i added a registry key to regedit to auto start my app on startup
when the session open and the app start it crash on start
in the debugger it says it cant find the complete path
for a sepcific txt file it is suposed to read
when lunching the app in any other way the app works
just fine and can read said textfile easily
the text file is located in a parent folder
any idea on what could cause this
|
|
|
|
|
It sounds like you implemented this expecting the current folder of the process to always be the folder where the application is located (e.g. "C:\Program Files\MyApps\MyNewApp\NewApp.exe" with the txt file located in "C:\Program Files\MyApps"), however when you launch an application by just specifying the full path, the current folder is not changed - since this happens during startup, the current folder for your process is most likely C:\.
There are several ways to make this work, here are a couple off the top of my head:
1) Change the code to accept the file name (with full path) as a command line parameter and pass that when you are starting it up through the registry.
2) Change the code to properly locate the txt file by having that location set in the registry.
3) Change the code to check the location of the process executable file and use that to locate your parent folder.
4) Don't make any changes in the code. Instead create a Windows shortcut and in the shortcut properties specify the startup folder for your application. On system startup, invoke the shortcut instead of launching your application directly.
I am not advocating that you go with 4), but I included it to give you some options.
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
I want to connect two pc through ip address and start chat with one to another like my pc and my friend pc having no physical connect except they are connect through internet
can any one help ??? Using c# and socket programming
|
|
|
|
|
You will probably have to traverse NAT at some point, so look into how to do that.
Apart from that, it's much the same as on a LAN.
|
|
|
|
|
Can u explain it further?
|
|
|
|
|
There are plenty of chat server/client examples on the web.
Try googling chat server/client example
|
|
|
|
|
Hello,
I have a function, and i would like to let a list/array of Threads run parallel in it (inorder to protect critical sections in it).
I thought I'd create List<mutex> and assign each one to a different Thread:
for( int i =0; i<10; i++)
{ arrmutex[i] = new mutex(); }
and in the function i would like to lock with a
arrmutex.elementAt(someThread).waitOne() -> a specific variable
It tells me that i cannot do that cause my mutex list is not initialize, AND, the lock wouldn't work..
Can you please help me figure out, how to initialize a list/array of mutexes?
and how to assign each thread a mutex?
Thanks,
|
|
|
|
|
Why us a Mutex?? Are you trying to synchronize an operation between processes??
What exactly are you trying to do with this set of mutexes??
Should you be using a ManualResetEvent instead??
|
|
|
|
|
hi
I have a question about forms in c#.
every time i run the program on a different laptops with different size of screen the items that have the forms have not be in the same location that i have put it the first time on my laptop.
how can i make the appearance of the items that have the different forms to be to the same location on every laptop or pc i run my program?
can i make it parametric?
thnx
|
|
|
|
|
|
im trying to remove a tab page from my tabcontrol
based on its tab index
but i have the tab index in an int
heres the code
if (e.Button == MouseButtons.Right)
{
for (int i = 0; i < tabControl1.TabCount; i++)
{
Rectangle r = tabControl1.GetTabRect(i);
if (r.Contains(e.Location))
{
if (i == 0)
{
}
else
{
string tabindexint = i.ToString();
tabControl1.TabPages.Remove(i);
it wont let me use an interger as a tab index how could i possibly do this
|
|
|
|
|
|
|
I REALY need to use the int tho because thats how i get
that selected tab name since its a right click selection
not a left click selection u can see it in the code
|
|
|
|
|
Try RemoveAt() - myTabControl.TabPages.RemoveAt(i);
|
|
|
|
|
thx and how do i get the page name of a tab based on is index
like what is the name of tab at index 4
|
|
|
|
|
Try something like
for (int i = tabControl1.TabPages.Count - 1; i >= 0; i--) {
if (tabControl1.TabPages[i].Text == "Header")
}
|
|
|
|
|
i got it to work using this
string tabpagenamex = tabControl1.TabPages[i].Name;
can u explain what the [] part means to tabpages
|
|
|
|
|
It means absolutely nothing to TabPage.
It means everything in C# because that's an array you're indexing into.
If you didn't know this, you REALLY need to pickup a beginners book on C# and work through it. Arrays are something you learn about in the 1st or 2nd week of an intro to programming class.
|
|
|
|
|
[] basically accesses an array item.
As mentioned, it might be useful for you to catch up on some basics.
|
|
|
|