|
If run as a service means that cannot be stopped..?
How to make it run as a service..?
My teacher said that i have to make remoting application that runs in a service and check my program periodically.. If my program doesn't run, remoting application recall it back.
But the problem is i don't know how to make it
Do you know the best solution for my case detailly...?
Thank you cPallini
:: GreenblitZ ::
jeaffreygilbert@yahoo.com
|
|
|
|
|
When you create a project, you are supposed to select Windows Service instead of Console Application or Console Application as I think you are now doing.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
with windows forms application override OnFormClosing or OnFormClosed and input Application.Restart();
with console.. no idea
life is study!!!
|
|
|
|
|
Hi,
I've written a command line application that I need to run every couple of minutes. I've used the Windows Task Scheduler as a quick and easy way of calling the application but the problem is that the window is displayed every time the application is called. Is there any way of telling the Windows Task Scheduler not to display the window or can I change my application so it does not show a window as it's executing?
Thanks
|
|
|
|
|
weywe47k37 wrote: Is there any way of telling the Windows Task Scheduler not to display the window
I don't know, but I think it is not possible.
weywe47k37 wrote: or can I change my application so it does not show a window as it's executing?
You can do that, but probably not with a console application.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Rewrite it as a Windows service if it won't need user interaction.
Evil cannot be conquered in the world... It can only be resisted within oneself.
|
|
|
|
|
You can take a look at the Guadagno Task Scheduler, an article here on CodeProject. http://www.codeproject.com/useritems/Guadagno_Task_Scheduler.asp.
This application is a pluggable Task Scheduler that lets you write your own task to schedule. It comes with a RunCommand plug-in that provides the scheduling for Command Line files.
|
|
|
|
|
Hi everyone!
In dataset "dsbasis" I have table "ShopGood". I have another table "Good" which don't belong to dataset and contains only important data of ShoopGood for show in datagirdview. I add this table to dataset and I create relation betwen this two tables. I also have more textboxes bounded to dataset and datatable "ShopGood".
My problem is, that when I change position in datagrid, values in textboxes stay unchanged. Can anybody tell me why?
If I set datagrid datasource to the table which textboxes are bounded all works fine.
My code:
DataTable dTable = new DataTable("GoodTable");
// fill datatable for datagrid
dTable = dShopGood.ListOfGood("");
// set datasource
dgrShopGood.DataSource = dTable;
dgrShopGood.DataMember = "";
// create datarelation betwen datatable shown in datagridview and
// table ShoopGood in DSBasis
dsbasis.Tables.Add(dTable);
dsbasis.Relations.Add("rel_ShopGood_GoodTable", dTable.Columns["ID"], dsbasis.ShopGood.Columns["IDGood"]);
// set databindings
txtMark.DataBindings.Add("Text", dsbasis, "ShopGood.Mark", true);
txtName.DataBindings.Add("Text", dsbasis, "ShopGood.Name", true);
// fill dataset for bounded textboxes
dShopGood.CRAllDetail(dsbasis);
Thanks in advance,
Jure
|
|
|
|
|
Hello All,
I have a listview with which I want to iterate through and set focus on each item, this I want to do in the order that they are presented to the user within the listview and independent of the index order of the item collection.
The listview I have groups data when the headers are clicked, it looks good, but the problem with this is that when the headers are clicked the indexes of the item collection are no longer in order and are scattered within the listview. This means that focus on each item jumps up and down. This is not what I want.
Thanks for your knowledge and time,
Robert
|
|
|
|
|
How do i read list of files from a text file in CruiseControl.Net
|
|
|
|
|
Dear all,
I have a problem that I haven't encountered before. I have two forms. I would like to call a method that changes something on another form ( different class ), which happens to be a usercontrol. This my code :
Form A :
private void toolStripButton1_Click(object sender, EventArgs e)<br />
{<br />
UserControlMain cc = new UserControlMain(); <br />
ultraDockManager1.PaneFromControl(cc.webBrowserPanel).Close();<br />
}
This doesn't seem to work. The panel on from B is not close, but the application crashes instead.
If I add a method on Form B , and I invoke the following method directly, it works :
public void CloseWebBrowser()<br />
{<br />
this.ultraDockManager1.PaneFromControl(this.webBrowserPanel).Close();<br />
}
If I try to invoke the method on Form B from Form A by :
private void toolStripButton1_Click(object sender, EventArgs e)<br />
{<br />
UserControlMain cc = new UserControlMain(); <br />
cc.CloseWebBrowser();<br />
}
The application crashes as well.
Can anyone tell me what I'm doing wrong ? Is the behaviour of a UserControl different than to a normal winform.
kind regards,
|
|
|
|
|
Hi,
Rick van Woudenberg wrote: UserControlMain cc = new UserControlMain();
ultraDockManager1.PaneFromControl(cc.webBrowserPanel).Close();
this creates a new UserControlMain, not a reference to the one you probably already had.
I guess it is not sufficiently initialized to support the attempted operation,
I suggest you try to catch the exception that occurs, so you get useful details on it.
YAs a last resource yu may want to enclose your Application.Run() in a try-catch
that dumps the entire Exception.ToString() to a MessageBox.
|
|
|
|
|
I suspected something like that. I will try to catch the exceptions like you told me. Maybe that will shed a little light on the solution. In teh mean time, is it possible to somehow call the Method below on Form B from Form A ? :
public void HidePanelWeb(object sender, EventArgs e)<br />
{<br />
this.ultraDockManager1.PaneFromControl(this.webBrowserPanel).Close();<br />
}
kind regards,
|
|
|
|
|
Hi Rick,
I dont know enough about your app, but I am guessing you may be trapped by an
IllegalCrossThreadCall. Are you by any chance calling this from a thread that is not
the main thread ? If so, read up on Control.InvokeRequired and Invoke().
|
|
|
|
|
Luc,
Thank you for your help though. You basically fixed the problem for me. Your comment : 'maybe it's not referenced properly' got me thinking. Turned out that the object was already referenced in the application. I invoked tthe method and it work perfectly. Once again, thank you for putting me on the right track !!
Cheers
|
|
|
|
|
Hi!
I am using C# 2005, the size of '.exe' file of project in Release folder is increasing day by day as I add functionalities in project and now it is reaching around 2MB...
Can any one tell me whats the reason of this and how to control it? Because normally I dont see such big exe files...
Thanks in advance...
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
Wow! That's quite big. How many lines of code are compiled to make your exe file?
|
|
|
|
|
Code? Bah. Just a few bitmaps as embedded resources would do that easily.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Thanks for reply...
There are approximately 10000 or so lines of code and also 10-15 images/icons...
Is it because of code or images? and whats its solution?
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
It's the images.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for pointing out the problem, can you tell me how can i solve it? or should i let it go like this? will it create efficiency or any other problem...?
Thanks,
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
You could use a seperate resource assembly to contain your images, etc. That would remove them from the exe and give the benefit of allowing them to be updated independent of it. However, I don't see a problem with a 2MB exe. I've seen much larger ones, from code alone.
only two letters away from being an asset
|
|
|
|
|
Thanks Mark!
If this exe wont cause any problem then its good, however I will appreciate if you guide me how to create a separate resource assembly to contain images..
Take Care, Cheers...
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
|
Thanks a lot, hopefully this article will help in getting me started...
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|