473,383 Members | 1,874 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

C# Form Application, (log writer problem)

13
the following code was used in a console application (where it worked). Now iam using it as a windows form app. and it doesnt seem to write anything in the log.

Code:

private void Test_Click(object sender, EventArgs e)
{
FileInfo l = new FileInfo("Log.txt");
StreamWriter Log = l.CreateText();
Log.Flush();
try
{
Log.WriteLine("Hello World iam there =D");
}
catch (Exception)
{
Log_screen("Whoops test failed, (dammit)!");
}
finally
{
Log.Flush();
Log_screen("Nothing went wrong will it work?");
}

Thx in Advance!
Mar 18 '08 #1
1 2117
bobido
13
I managed to do so,... =)
Mar 18 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: Abhi | last post by:
FYI: This message is for the benefit of MS Access Community. I found that this prblem has been encounterd by many but there is hardly any place where a complete solution is posted. So I thought...
11
by: Andrew Mueller | last post by:
Hello, Is there any way to make a form part of a windows service application and launch it upon double-click of a system tray icon? I already have the NotifyIcon working and have added an...
1
by: BillZondlo | last post by:
Hi, I am fiarly new to C#. I have been trying to test the results of 2 button controls in a form. A directory is selected with botton1_Click and a filename is selected with button2_Click. I...
1
by: ScottF | last post by:
There was a problem with ASP.Net 1.1 creating/generating bad javascript on html pages that I ran into and on the KB page that I had found at the time it said that the problem was fixed in the .Net...
4
by: Philip Wagenaar | last post by:
I have made a form with a tab that containts groupboxes and those contain checkboxes. When I run the application sometimes the outlining for some groupboxes are not shown, if I switch tabs and...
3
by: Tabi | last post by:
Hi, I have just created a class that removes action attribute from HtmlForm. The code looks like here. namespace ComIT.Applications.Common { public class Form :...
1
by: Lucky | last post by:
hi guys, after long long efforts i got access to the active directory for "Intigrated windows authentication". now i', suppose to get access the network resources. the problem is i'm getting...
6
by: JeffDotNet | last post by:
Writing to a registered source in the Application event log I have an asp.net framework 2.0 app that I created on a winxp machine and now I am deploying it to IIS6 on a win server2003 machine. ...
13
JodiPhillips
by: JodiPhillips | last post by:
G'day, I have a silly and simple problem that I need some guidance with. Due to the way our network is set up, I am unable to use the group permissions for Access and have had to implement log...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.