473,795 Members | 2,830 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

1.Default button runtime 2. App running after unistall

Hello,

I am working on C# using vs.net 2003. I have faced two interesting
problems.

1. Dynamically setting Default Button:
I created a form and used it in various contexts. On basis of the context,
the panel of a form which contains various buttons , are shown or hides. Now
at design time i set the default button property to one of button. But when
the form object is created in different context and set visibilty of default
one false while some other buttons is/are visible then no one has default
button. My main form is basically a derived form from a control called
TD.SandDock.Doc kControl. Now on function which is called before display the
form but after creating its object, set the buttons , where i need to set the
default button as well. But i find no helper function/property to do so! How
can i achieve the same.

I cant set the default button to be appear on there (& set its
text) ,as its click event process is completely differ.

2. I created a small server application which basically listen on a port
for its client. Its GUI is absent and its only appear in taskbar icon(with
right click menu). One interesting thing i note is that this
applicaiton(.ne t) when uninstalled (installer is created using default .net
installation) while the applicaiton running. it doesnt complaint for
uninstall and thus it uninstalls the application while server applicaiton is
still running. As i create a mutex in applicaiton startup to check wherether
applicaiton is running or not . Hence when user install again the server
(note that server is still running even after uinstall) and runs the program
it says applcation is already running.

How can i assure that either it should not uninstall the applicaiton or it
should close the server applicaiton.

Thanks
Anil
--
Anil Kumar Sharma
(Project Lead)
India
May 25 '06 #1
3 1571
You might use Process.GetProc essByName to obtain a list of processes having
the same name. If it's existing, sounds like it's running.

"Anil Kumar Sharma" wrote:
Hello,

I am working on C# using vs.net 2003. I have faced two interesting
problems.

1. Dynamically setting Default Button:
I created a form and used it in various contexts. On basis of the context,
the panel of a form which contains various buttons , are shown or hides. Now
at design time i set the default button property to one of button. But when
the form object is created in different context and set visibilty of default
one false while some other buttons is/are visible then no one has default
button. My main form is basically a derived form from a control called
TD.SandDock.Doc kControl. Now on function which is called before display the
form but after creating its object, set the buttons , where i need to set the
default button as well. But i find no helper function/property to do so! How
can i achieve the same.

I cant set the default button to be appear on there (& set its
text) ,as its click event process is completely differ.

2. I created a small server application which basically listen on a port
for its client. Its GUI is absent and its only appear in taskbar icon(with
right click menu). One interesting thing i note is that this
applicaiton(.ne t) when uninstalled (installer is created using default .net
installation) while the applicaiton running. it doesnt complaint for
uninstall and thus it uninstalls the application while server applicaiton is
still running. As i create a mutex in applicaiton startup to check wherether
applicaiton is running or not . Hence when user install again the server
(note that server is still running even after uinstall) and runs the program
it says applcation is already running.

How can i assure that either it should not uninstall the applicaiton or it
should close the server applicaiton.

Thanks
Anil
--
Anil Kumar Sharma
(Project Lead)
India

May 25 '06 #2
About your first query, the "default" state of a button is defined at buttons
creation time. Regarding win32 api (CreateWindow - Button Styles), it might
be possible but with some tricks. You can ask a control to recreate himself
(might need to derive the class to access needed method to use SetStyle and
UpdateStyles).

Hope it helps.
"Anil Kumar Sharma" wrote:
Hello,

I am working on C# using vs.net 2003. I have faced two interesting
problems.

1. Dynamically setting Default Button:
I created a form and used it in various contexts. On basis of the context,
the panel of a form which contains various buttons , are shown or hides. Now
at design time i set the default button property to one of button. But when
the form object is created in different context and set visibilty of default
one false while some other buttons is/are visible then no one has default
button. My main form is basically a derived form from a control called
TD.SandDock.Doc kControl. Now on function which is called before display the
form but after creating its object, set the buttons , where i need to set the
default button as well. But i find no helper function/property to do so! How
can i achieve the same.

I cant set the default button to be appear on there (& set its
text) ,as its click event process is completely differ.

2. I created a small server application which basically listen on a port
for its client. Its GUI is absent and its only appear in taskbar icon(with
right click menu). One interesting thing i note is that this
applicaiton(.ne t) when uninstalled (installer is created using default .net
installation) while the applicaiton running. it doesnt complaint for
uninstall and thus it uninstalls the application while server applicaiton is
still running. As i create a mutex in applicaiton startup to check wherether
applicaiton is running or not . Hence when user install again the server
(note that server is still running even after uinstall) and runs the program
it says applcation is already running.

How can i assure that either it should not uninstall the applicaiton or it
should close the server applicaiton.

Thanks
Anil
--
Anil Kumar Sharma
(Project Lead)
India

May 25 '06 #3
Hi sebastieng,
Thanks for kind and prompt reply. But you see, when creating installer
in .net build in installer, i cant find a way to code in it (as we do in
install shield). Thats why my application creates a mutex and checks the
other instance of same applicaiton. So my server application wont run twice
in any case. In code i can do this but when insataller of .net is in picture,
its look tough to go through it.
To be straight how can in installer i check for it. For other application
, one can not delete/uninstall the application while its running. But
surprisingly my server application exe can be deleted and hence uninstalled
even when its running.
Thanks again.
Anil

--
Anil Kumar Sharma
(Project Lead)
India
"sebastieng " wrote:
You might use Process.GetProc essByName to obtain a list of processes having
the same name. If it's existing, sounds like it's running.

"Anil Kumar Sharma" wrote:
Hello,

I am working on C# using vs.net 2003. I have faced two interesting
problems.

1. Dynamically setting Default Button:
I created a form and used it in various contexts. On basis of the context,
the panel of a form which contains various buttons , are shown or hides. Now
at design time i set the default button property to one of button. But when
the form object is created in different context and set visibilty of default
one false while some other buttons is/are visible then no one has default
button. My main form is basically a derived form from a control called
TD.SandDock.Doc kControl. Now on function which is called before display the
form but after creating its object, set the buttons , where i need to set the
default button as well. But i find no helper function/property to do so! How
can i achieve the same.

I cant set the default button to be appear on there (& set its
text) ,as its click event process is completely differ.

2. I created a small server application which basically listen on a port
for its client. Its GUI is absent and its only appear in taskbar icon(with
right click menu). One interesting thing i note is that this
applicaiton(.ne t) when uninstalled (installer is created using default .net
installation) while the applicaiton running. it doesnt complaint for
uninstall and thus it uninstalls the application while server applicaiton is
still running. As i create a mutex in applicaiton startup to check wherether
applicaiton is running or not . Hence when user install again the server
(note that server is still running even after uinstall) and runs the program
it says applcation is already running.

How can i assure that either it should not uninstall the applicaiton or it
should close the server applicaiton.

Thanks
Anil
--
Anil Kumar Sharma
(Project Lead)
India

May 25 '06 #4

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

Similar topics

4
1687
by: Naresh | last post by:
I have Windows 2000 advanced server with SP4 installed. I also have Biztalk Server 2004 installed. I am using VS.NET 2003. I create any class library without setting any additional external references in my project. Once I install the resulting dll into the GAC everythings ok. But after this it does not allow me to unistall/delete the assembly from the GAC. It gives the following Error:- "Assembly could not be unistalled, beacuse it is used by...
2
2116
by: MLH | last post by:
I would like to allow users to set, as an application default, a specific printer to send reports to. I don't know how to bring up a list of valid print devices in A97, nor do I know how to reference any one of them that might be selected. For instance, if I click Start, Control Panel, Printers and Faxes on a PC running XP and I see the following: HP Laser Jet 4200 PCL 6 HP Laser Jet 4200 PCL 5e HP Laser Jet III
8
3517
by: Bern McCarty | last post by:
Is it at all possible to leverage mixed-mode assemblies from AppDomains other than the default AppDomain? Is there any means at all of doing this? Mixed-mode is incredibly convenient, but if I cannot load/unload/reload extensions into my large and slow-to-load application during development without restarting the process then the disadvantages may outweigh the advantages. I've got a mixed-mode program in which I create a new AppDomain...
1
2529
by: bruce | last post by:
hi.. i'm trying to figure out how to uninstall "mechanize". i don't see an "unistall" from the "python --help-commands" function... i'm looking to rebuild/reinstall mechanize from the svn repos to try to see if an apparent parsing issue that i mentioned is fixed... thanks
5
4247
by: siggi | last post by:
Hi all, installing a package with 'setup.py' is easy. But how do I uninstall the package, once I want to get rid of it again? Thanks, siggi
0
2758
by: =?Utf-8?B?bmVlcmFqYkBub2lkYS5ub3NwYW1oY2x0ZWNoLmNv | last post by:
Hi, We have created new .NET web service and running it through the default test page and it's working fine in our development environment. When we moved the web service to the acceptance environment then also it is successfully displaying the default testpage given by the .NET , but when we are providing the values to the parameters of webmethod on test page and click on the invoke button it gives us the error of "page cannot be...
7
8456
by: Norman Diamond | last post by:
A project depends on VC runtime from Visual Studio 2005 SP1, and DotNet Framework 2. Options are set in the setup project properties, so if these two dependencies are not already installed then this installer will install them. But what about the situation where VC runtime has already been installed? In fact it's been installed twice. Although the project was built on a Windows XP system with Visual Studio 2005 SP1 and the results were...
0
2385
by: Tony | last post by:
I am continuing to develop an Access 2007 application which was originally converted from Access 2003. In Access 2003 I was able to disable the Access Close button in the top righthand corner of the screen. I have been unable to find any way to disable this button in Access 2007 and subsequently I have been forced to find ways to detect and handle the situations after the Access Close button has been clicked. I have been largely...
5
5895
by: Tony | last post by:
I am continuing to develop an Access 2007 application which was originally converted from Access 2003. In Access 2003 I was able to disable the Access Close button in the top righthand corner of the screen. I have been unable to find any way to disable this button in Access 2007 and subsequently I have been forced to find ways to detect and handle the situations after the Access Close button has been clicked. I have been largely...
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10443
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10165
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10002
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9044
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7543
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2921
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.