|
http://en.csharp-online.net/Creating_a_.NET_Windows_Service[^]
http://www.developer.com/net/csharp/article.php/2173801[^]
That should get you started on Service basics. I've done a similar scenario where i used a Console to start an assembly. Do this by using a Semaphore to limit to one per machine, and a ResetEvent to wait for the console to either be closed or terminated remotely. Also when starting the console (Process.Start()), you can specify options that will allow you to start the console without a console window. It'll be up to you and your implementation as to what else you can start once you have your assembly running in a process. You might want to be able to open a window directly. As for the Service implementation, I think you're limited in some ways that you'll have to determine the impact on the design, particularly using configuration UI's
Scott
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
Hi all,
Is it possible to import a .dat file to MS Access and from there to SQL Server using C# code.
Is it possible to get any links on the same.I serached google amd didnot find any.
Thanking You
|
|
|
|
|
Yes, but why?
Probably, but I don't have any.
|
|
|
|
|
How to remove the form close button( not to disable)?
And only display MaximizeBox and MinimizeBox.
Thinks~~
|
|
|
|
|
|
I will try it.
Thank you for your answer~
|
|
|
|
|
Hi,
Have a read of this this thread.
Mark.
|
|
|
|
|
try this
this.ControlBox=false ;
|
|
|
|
|
He wants to keep the max and min buttons - Disabling the control box will get rid of all the buttons and the form icon.
To be honest I don't see why he would want to remove the close button, he would be better off catching the form close event and doing what he wants to do there.
Mark.
|
|
|
|
|
Thank you for your answer ~
|
|
|
|
|
It can't be done AFAIK. You can disable it, remove the Close menu (and separator) from the system menu and handle Alt+F4 - but that's as close as you can get.
You could create your own control class that has this functionality but it would be a LOT of work to just make a button invisible when it can be disabled with little effort.
Dave
|
|
|
|
|
|
Well remembered!
For the OP:
In my article here[^] I have demontrated this and the removal of the close + separator from the system menu.
Dave
|
|
|
|
|
good~ I will see that.
Thank you for your answer.
|
|
|
|
|
I have a setup window where I would like the user to select which directory the data files will be kept. In order to make this as easy as possible, I would like the user to choose from an openfile dialog, but it does not seem to have a method that returns the directory of choice.
I looked at openfile dialog and file dialog.
Using v1.1 net
Thanx in advance
Jude
|
|
|
|
|
FolderBrowserDialog
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Is it better to have an AIP and subscribe to a changed event to update the GUI when the property changes, or to specify a backing field and add the GUI update code to the set method?
Thanks,
Sam
|
|
|
|
|
I Hope i understood u
it is always better to Subscibre to an event when a Property is Changed
if it's your Property
Like
public int MyPropery
{
Get {return myPropery;}
Set {myPropery = value;//Do Something according to the Cahnge//}
}
Hope i could Help
Have Fun
Never forget it
|
|
|
|
|
there exist is a big conversation about this . has to do with mvc architecture .if you want standard .net framework look at microsoft databinding . every control has a data binding list .you can unify the way bi directional notification is made use code like this
textBox.DataBindings.Add("Text",object,object.property); wich means syncronize the textbox .text with the object.property
it is a dificult subject but worth it . or use the code the friend just gave you.
http://www.codeproject.com/KB/database/databindingconcepts.aspx[^]
http://msdn2.microsoft.com/en-us/library/ms752347.aspx[^]
f(yf) = yf
modified on Thursday, March 27, 2008 4:33 PM
|
|
|
|
|
I am having Visual C# 2005..
But the breakpoints dont seem to work when I create a console application..
Why?
It works in a windows form application though..
|
|
|
|
|
Debug breakpoints in console apps work just fine. You are running in debug mode, yes?
|
|
|
|
|
It could also be that terminal services service is inactivated.
For some reason, the TS service is used for debugging winforms and console apps.(dont know if it affects asp.net debugging to)
And im not talking about remote debugging, just normal local debugging.
I had this problem once and after some serious headscratching i found out about this on some msdn page.
|
|
|
|
|
Hi,
I have a BackgroundWorker that i use to select from a database. At the moment i have a ProgressBar that just loops so the user isn't just sat there wondering whats going off, but i want to make it so it actually links into how many rows i have selected so far.
eg: the ProgressBar is actually displaying the current progress of the select
Does anyone know how i would go about this?
Regards,
Gareth.
|
|
|
|
|
Hi Gareth,
if your database access is a single query, you will not be able to get any
meaningful progress information: the query is either ongoing or done, that's it.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hi Luc,
I was hoping you weren't going to say that!, Ahh well.
Regards,
Gareth.
|
|
|
|