|
Set timers to enabled true
private void timer1_Tick(object sender, System.EventArgs e)<br />
{<br />
Application.Exit();<br />
}
|
|
|
|
|
System.Windows.Forms.Application.Exit(); does not get executed because your program is running an open window on a thread. It will never reach System.Windows.Forms.Application.Exit(); because when you close the window Dispose would have been called already.
Can i ask why you are using a window? If it is to run a scheduled task why not just create a Console Application, this will exit once it has finished executing. If you have the window so you can enter data about what it is you want to run, why not just add switches to execution of your console application like Start -> Run 'myapp.exe "path to filename" "time to start"'
Like this:
http://www.codeproject.com/csharp/deleteold.asp?df=100&forumid=152583&exp=0&select=1169916[^]
Darren
|
|
|
|
|
hi all,
I have a class which has a functions to generate XML files based on given parameters, Move these files from one machine to another and execute these files over a database.
Iam able to call these functions fine on a button click event.
It is required that the functions all be automated ..
I tried this by calling these functions from a windows service(C#) in the OnStart() method but i see that they are not executing...
I am not able to debug the windows service.
How can i automate the execution of my class functions using windows service or some other kind of scheduler?
Thanks in anticipation
|
|
|
|
|
See this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskDebuggingServiceApplications.asp
|
|
|
|
|
I want design report that receive from xml file in C#, but error "load failed" and must add datasource when restart project.
everybody can help me. thanks!
|
|
|
|
|
Hello,
I'have to create an application that uses a listView. The listView in C#.net 2003 has grid with horizontal and vertical lines. How can I do so as I can make it have only vertical lines? If possible, help me please.
|
|
|
|
|
olivierbalagizi wrote: The listView in C#.net 2003 has grid with horizontal and vertical lines. How can I do so as I can make it have only vertical lines?
so far in my knowledge Gridlines can only appear in Details view when set to true. if anybody else have any knowledge about removing horizontal or vertical line i'm interesting to know it too.
regards.
|
|
|
|
|
The ListView is one of the most limited controls in .NET when it comes to customising apperance and manipulating sub items. I have tried to use one in an application and get it to do what i want for a week now and read much on it, but never came across showing only vertical or horizontal lines.
I think the only way to do this would be to extend the ListView class and overwrite all Painting methods with your own
|
|
|
|
|
Dear gurus,
my app has a rich user-interface which I have to test extensively by mouse-clicking on all the menus, buttons,.....
My idea now is to create a small tool which sends all this clicks,... automatically to my application for testing the user-interface.
Does anyone have an idea how this can be accomplished?
My best whishes and thankyou for your help ! ! ! !
|
|
|
|
|
I have a image file in folder i take it and store it in database as a Image Format. after stored in database how can i delete that image file from folder?
M.Senthil Rajan
|
|
|
|
|
You can write a batch file to delete the image from the folder and call the batch file using System.Diagonastics.Process.Start();
E.g
In batch file:
Del <file path="">
exit
After saving in database:
System.Diagonastics.Process.Start("C:\<batchfilename>.bat");
Hope this helps.....
Thanks
|
|
|
|
|
|
Hi senthilu.,
Try this
using System.IO;
private Button1_Click(.......)
{
try
{
File.Delete(Server.MapPath("..//filename"));
Label1.Text="completed";
}
catch(Exception exe)
{
Label1.Text="error : "+exe.Message;
}
}
best regards.,
ranandbe
|
|
|
|
|
Hi!.
I am developing a web based whois lookup page for my site. But while trying to connect to a remote whois database "whois.wildwest.net" and port "43" its showing the error "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond". The stack trace is :-
[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond]
System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port) +578
giwia.development.temp.whois.Button2_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\giwia\development\temp\whois.aspx.cs:65
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +58
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
. I am using Framework 1.1.
Please help me to solve this problem. Its working in local host. But it cant on web space.
Thanx in advance
JIJO BABY - Lets Play C#
|
|
|
|
|
It means the host is not responding. Try to: telnet whois.wildwest.net 43 and you will see it fails.
|
|
|
|
|
hi all, i need to store word document into sql server,they are give by the user,and my qustion is how much space it will occupy in the database when i store this word document (using stream reader i read the entire document and pass this value into string and i pass this string value into the database)i feel it will occupy more space on the db.(can any one say how much space will occupyed the 150kb word document?)
is there any way to reduce the size of the document?
very urgent....help me plz....................
|
|
|
|
|
hello,
In my application i want to diaplay all properties in a control of dialog box and if user modifies it, this should be saved.
So, is there any way to know about the proerties of my applcation which can be displayed in a grid. I want the same user interaction like property window of C# form application.
or it can be explained as
I was looking for a way to access all the available properties of a given object. for ex. I would like to do some thing like
SomeClass obj1;
foreach( property p of obj1 )
{
// Do something with property
}
Is there any thing which any of you can suggest on this.
Thank You.
Gajesh
Pune(india)
-- modified at 2:09 Friday 2nd June, 2006
|
|
|
|
|
See this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/usingpropgrid.asp
|
|
|
|
|
Hi,
I have a VB application using a .Net(C#) dll.I made the application wait for particular time from the .net dll and during the wait if i move between other open windows,the VB application gets hanged or becomes blank screened.
I tried using System.Windows.Forms.Application.DoEvents() to repaint the Vb application but it is that effective but of course makes little difference.
I totally clueless
Do not wait to strike till the iron is hot; but make it hot by striking.
|
|
|
|
|
I got the same problem, but I made my program wait until another program is loaded.
I´ve overcome this problem by making a loop on a timer, so It checks every 300ms if the program is loaded, so it´s not needed to wait anymore. =D
-- modified at 1:44 Friday 2nd June, 2006
|
|
|
|
|
Do the waiting operation on a separate thread[^]. That way, the UI will remain responsive while you wait.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I'm a begginer programming in C#.I am studing about assembly in C#.
I don't know what is assembly?
how do a file *.dll create?
Using a file .Dll ?
usefull of *.dll, or assemble
Thank you.;)
nguyenquang
|
|
|
|
|
|
Thank you Darren Marshall.
|
|
|
|
|
Hi
I need some help with coding my class.
I want to create 2 different types of TabPages that will appear on my single TabControl. For eg. a CustomerTabPage and EmployeeTabPage. So I assume I should create 2 customised TabPage classes?
So if im receiving an employees details i will create an instance of Employee and create an instance of EmployeeTabPage(myEmployee) and pass it myEmployee to create a tab page that is unique to employees and adds all myEmployee's data to the labels on that tabPage.
Now the problem I have is how do I add the controls that will appear on my CustomerTabPage or EmployeeTabPage? do I code it in each class of TabPage that I created?
plz help!
|
|
|
|