G
Guest
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.DockControl. 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(.net) 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
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.DockControl. 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(.net) 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