all groups > c# > april 2007 > threads for wednesday april 25
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Burning CDs and DVDs
Posted by Joachim at 4/25/2007 10:56:00 PM
How can you easily burn CDs and DVDs using C# and .NET?... more >>
Web Service
Posted by Adarsh at 4/25/2007 9:10:02 PM
Hi all,
I am trying to create a webservice using C#,visual studio 2005.For
that i am following the steps as follows..
File menu-->New-->Web Site-->ASP.NET Web Service.
Location:-->http://localhost/Webservice1
Language-->Visual C#
after OK is pressed i get the following message,
Config... more >>
How can I break into a worker thread with the debugger?
Posted by Zytan at 4/25/2007 7:20:29 PM
Whenever I press pause, it goes to Application.Run(), because the main
thread is sleeping, while the worker thread is going.
Zytan
... more >>
How to get rid of Bad Coding Habits /// return status
Posted by sloan at 4/25/2007 6:51:19 PM
Does anyone have any good articles on Exception Handing in DotNet.
As a "get rid of the API mode of knowing if something worked, we're not in
VB6 land anymore Dorothy".
I have a few people at work who keep writing code like below.
public string UpdateEmployee
{
string returnStatus ... more >>
How to detect closing a file opened by a Process?
Posted by Henk van Winkoop at 4/25/2007 5:22:56 PM
Hello,
I would like to open a 'Help.chm' file on a button click.
I got the advice to use a Process object.
//create a process
Process prc = new Process;
//add filename to the process
prc.StartInfo.FileName="Help.chm";
//open file
prc.Star... more >>
Break debugger into worker thread?
Posted by Zytan at 4/25/2007 4:56:55 PM
Can I break the debugger into a worker thread? Right now, my app is
freezing, and when I press pause, it stops on:
Application.Run(new MyForm());
I don't know what that means. I know the application starts there.
But why would the debugger stop on it? Why doesn't it stop where the
code i... more >>
Question about multi-threading
Posted by Diego F. at 4/25/2007 4:54:45 PM
Hello. I have a doubt about multi-threading, if it is or not the best way to
achieve the following:
I have a server application that listens a port through a socket.
A client will send messages to that application (many messages).
Because the amount of messages is huge, the server application... more >>
String.Format: What is "{0}"
Posted by randy1200 at 4/25/2007 4:22:01 PM
I have the following:
String.Format("{0}", myNumber);
What is {0} called? The reason I ask is that I want to look up how present
myNumber as 2 digits in the string. For example, if myNumber is 3, the string
should be 03. If I just use something like {0:2}, I get a space preceeding
the 3.... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Encrypting data
Posted by SeeSharp Bint at 4/25/2007 4:13:34 PM
Visual Studio 2005, dotnet, c#. Microsoft SQL Server. Windows XP forms
application.
Temporarily, for my database application, I have been storing the various
elements of database connection items like datasource,password,userid as
plain strings in the registry.
I'd now like to make these s... more >>
Creating DLL with C# according to 3rd party specs
Posted by vikrampant NO[at]SPAM gmail.com at 4/25/2007 3:48:23 PM
I was hoping someone could point me in the right direction as to
setting up a class file in my DLL. (I am using a third party toolbar
builder and I have a limited set of instructions on the DLL I can
create to extend some of the button actions.)
The 3rd party app's documentation for DLL is as... more >>
Strange Deserialization problem.
Posted by TheSteph at 4/25/2007 3:37:57 PM
Hi,
I have a small serializable struct :
[Serializable]
public struct TestStruct
{
public string Title;
public int Age;
public string Name;
public string Surname;
}
I "binary" Serialize it in a file without any problem.
I can desreialize it in the SAME application w... more >>
INI files in CSharp
Posted by Dom at 4/25/2007 1:16:26 PM
I used to love the INI files in VB, even though their use was
deprecated. It was a great way to save application information, like
the last position and size of the main window, and it never taxed the
system the way using the registry might.
Can I get something like GetPrivateProfileString in... more >>
C# Extending Excel
Posted by Joseph M. Newcomer at 4/25/2007 1:06:16 PM
I've written a couple C# apps, but this question is beyond anything I've done. A friend
called me and asked me if I could help, and while I can help with some of the C# stuff,
the infrastructure is where I have no experience.
Problem statement:
An extension to an Excel spreadsheet written i... more >>
Read the connection strings in all web.config files in a box
Posted by Sbatchu at 4/25/2007 12:32:04 PM
How will i read connection strings in all web.config files in one particualr
machine?... more >>
Ordering the event handlers
Posted by Dom at 4/25/2007 11:55:31 AM
I'm teaching myself c#, but I have a VB background.
I noticed that c# just inserts the event handlers into you code in the
order in which you create them, unlike VB which always sorted them.
VB had a good approach, since all the events for btnNext, eg, were in
the same place.
Is there a way... more >>
The use of #region
Posted by Dom at 4/25/2007 10:38:41 AM
I'm teaching myself C#, was a very experienced VB programmer. I like
the #region thingy, but I try to keep all the events in a single
region, like #region EVENTS. The problem is C# adds the events in the
order in which you create them, unlike VB which used to sort them. So
if I create a #regi... more >>
How to format a date to look like 2006-04-16T19:45:42Z
Posted by pamela fluente at 4/25/2007 10:10:22 AM
Hi,
I wish to create a string from the current date now() so that it looks
like
the format used by Excel, for instance:
2006-04-16T19:45:42Z
How would I achieve that?
Thank you,
-Pam
PS
Btw does that format has a name?
... more >>
System.Diagnostics.StackTrace is wrong sometims
Posted by Zytan at 4/25/2007 10:02:10 AM
I use System.Diagnostics.StackTrace to get the stack trace of the
current function, to print out the function's name to the log, and
sometimes it shows that a function that doesn't even write to the log
is what is writing to the log. This just can't be, so
System.Diagnostics.StackTrace must be ... more >>
Adding an unmanaged DLL
Posted by ba.hons at 4/25/2007 8:57:27 AM
Hello,
wondering if somone could clear something up for me as i have been
reading around this subject for a while and am still confused.
I have a DLL from a hardware vendor but i dont know what language the
DLL is written in.
I would like to use this DLL from managed code (c#). From what ... more >>
Getting rid of / Minimizing a lot of if statements?
Posted by XSler at 4/25/2007 8:50:01 AM
I have some code that works fine, except for the fact that it has a lot of
embedded if statements. I don't think that this would be practice code, but I
wanted to tap into the knowledge of this group, and see what is the best way
to handle it. Basically, the if statements are used to check sev... more >>
recursive locks work do not deadlock! why?
Posted by Zytan at 4/25/2007 8:38:41 AM
This program DOESN'T deadlock due to attempt to reenter the same
lock! Why?
private static object m_lock = new object();
static void Main(string[] args)
{
lock (m_lock) { MyFunc(); }
}
static void MyFunc()
{
lock (m_lock) { Console.WriteLine("Hello"); }
}
Zy... more >>
Simple Regex Question
Posted by bg_ie NO[at]SPAM yahoo.com at 4/25/2007 8:32:26 AM
I have the following Regex -
oldString = @"C:\ta";
Regex regexEndsInBackslash = new Regex(oldString + @"\\",
RegexOptions.Singleline | RegexOptions.IgnoreCase);
Any ideas why none of the following are true -
if (regexEndsInBackslash.Match(@"C:\ta\").Success == true)
....
if (regexEndsIn... more >>
Adding an unmanaged DLL
Posted by ba.hons at 4/25/2007 8:18:43 AM
Hello,
wondering if somone could clear something up for me as i have been
reading around this subject for a while and am still confused.
I have a DLL from a hardware vendor but i dont know what language the
DLL is written in.
I would like to use this DLL from managed code (c#). From what ... more >>
Pause Debugger in worker thread possible?
Posted by Zytan at 4/25/2007 8:10:25 AM
I have code running in the debugger as I type. I press pause, and it
pauses on:
Application.Run(new myForm());
*I believe* a worker thread is in deadlock (it's in a lock, but calls
another function that tries to use the same lock). If the main thread
was deadlocked, I think the debugger w... more >>
Referencing question...
Posted by Joe at 4/25/2007 7:56:01 AM
I'm trying to figure out the best way to do this.
I have a Windows Service with a namespace called WSSynch that currently
has a variable (iTimeDelay) that holds the current time delay for when the
next synchronization takes place.
I want to add an app that will run that will allow me to chan... more >>
change .net application into native code application, possible?
Posted by fairyvoice at 4/25/2007 6:50:01 AM
abviously you need to intall the .net framework to have a .net application
run, but is there anyway i can change .net application into native code
application so that it can run directly without the .net framework?
it seems dosen't make any sence, but for some reason i have to do in this
way ... more >>
Backup MSSQL db from C# code using SMO without knowing server version
Posted by Olegus at 4/25/2007 6:36:56 AM
Hello,
in order to perform backup/restore MSSQL database using SMO, one needs
to reference several namespaces in a backup class :
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;
Unfortunately, MSSQL 2005 and MSSQL Express keep them in different
place.
... more >>
new Class Library project
Posted by rodchar at 4/25/2007 5:52:02 AM
hey all,
i compiled my Class Library in Release mode but whenever i add a reference
to this dll it adds that extra .pdb file. how do i keep it from adding that
..pdb file?
thanks,
rodchar... more >>
When objects are set to null...removing events
Posted by MikeT at 4/25/2007 4:35:48 AM
This may sound very elementary, but can you trap when your object is
set to null within the object?
I have created a class that registers an event from an object passed
in the constructor. When my object is destroyed, I want my object to
un-register this event. If I don't then the object wou... more >>
how to allow DataGridView for DragDrop
Posted by nerella.sabarinath NO[at]SPAM gmail.com at 4/25/2007 4:30:42 AM
Hi,
i am trying for dragging a node from treeview and dropping in to
datagridview.
can anybody help me in this issue?
... more >>
Testing ListBox.SelectedValue after index changed event
Posted by RichGK at 4/25/2007 4:29:17 AM
The first time I run my code the list box sends a selected index
changed event even though at this point there has been no activity
with the mouse. The value returned from SelectedValue according to the
debugger is System.Data.DataRowView.
How can I either stop this initial selected index chan... more >>
Testing ListBox.SelectedValue after index changed event
Posted by RichGK at 4/25/2007 3:30:31 AM
The first time I run my code the list box sends a selected index
changed event even though at this point there has been no activity
with the mouse. The value returned from SelectedValue according to the
debugger is System.Data.DataRowView.
How can I either stop this initial selected index chan... more >>
Socket Async Send I/O - Resource Leak / Callbacks not getting called?
Posted by dennis.richardson NO[at]SPAM gmx.net at 4/25/2007 2:55:03 AM
Greetings all.
Here's a problem that's been driving me nuts for the last 48 hours.
I'm hoping that someone has come across this before.
I have a C# Application that reads a UDP broadcast (asynchronously).
Then it repackages these UDP packets and sends them to a subscriber
via TCP.
Now, I... more >>
get "default" text from the console
Posted by per9000 at 4/25/2007 1:20:53 AM
Hi,
can I print some default text on the console when doing a ReadLine?
A silly example below shows two small scenarios. In the first a user
is told what he appears to be called, and asks for a name.
In the second case I want the the user to be able to just press return
to accept the userna... more >>
Console application failing to catch errors
Posted by Mantorok at 4/25/2007 12:00:00 AM
Hi all
I have a console application that runs every night via a scheduled task,
there is a try-catch block in my Main class, whenever an error is caught it
is written to a log file and then emailed to several people. The
application is run using a domain service account, if the program is ... more >>
Problem with WebService
Posted by cinias at 4/25/2007 12:00:00 AM
Hi,
I'm writing application for Windows CE 5.0. in C#. My app is using
WebService which I wrote in Delphi 2006. When I start app I want to read URL
to my WebService from XML file. Problem is that I do not how to do it. I try
to do it in this way:URL Behaviour I set to "Dynamic"
string We... more >>
Control Array Problem
Posted by Toni at 4/25/2007 12:00:00 AM
I have ImageButton array. I have defined onClick event and it works. But in
this function I can not use control propetries. I want to use index of
ImageButton which is clicked and ImageURL property. How to use this?
protected void Page_Load(object sender, EventArgs e)
{
Imag... more >>
C# Noob: Calling base class constructor
Posted by Richard Coltrane at 4/25/2007 12:00:00 AM
Hi there,
In vb.net, if i inherit from a class then the first i generally do in a sub
classes contructor is MyBase.New(..);
Whats the pattern in C#? It seems to do these things automatically; I didn't
think C# did "anything" automatically?
Thanks
Richard
... more >>
Save Word document to Database in memory,
Posted by cgd at 4/25/2007 12:00:00 AM
how to do
Save Word document to Database in memory,
not through the disk
... more >>
|