all groups > c# > march 2004 > threads for friday march 5
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 31
C# + Directoryservice + Data Grid
Posted by Justin Rich at 3/5/2004 11:59:35 PM
I would like to find a way to use the data grid to hook in to the AD. Was
looking at the choices for data sources and i didnt see a way to do it, but
figured i would ask to see if i missed something
using C#, connecting to the AD with System.Directoryservice and would like
to use a data gri... more >>
changing a filename in C#
Posted by J. Marshall Latham at 3/5/2004 11:58:57 PM
I can't seem to find any resources to help me change a filename using C#. I
see a Path.ChangeExtension, but it only takes the full path as a string and
changes that string. It doesn't actually change the file (at least not from
what I have seen). I tried moving the file into the same directory... more >>
horizontal line
Posted by Nick Warrington at 3/5/2004 11:29:24 PM
OK, I give up, whats the windows form control that gives the nice
3d horizontal line common on so many dialog boxes.
Anyone?
TIA
Nick... more >>
run exe from server on client?
Posted by Sput at 3/5/2004 10:56:08 PM
What is needed to be able to run .net app located on server from client
computer(s)?
WinXP OS
... more >>
Using NetworkCredential then a Redirect to the site requiring the credientails
Posted by Jay Douglas at 3/5/2004 9:38:04 PM
Hello all.
Ever since the latest patch for IE 6 it is impossible to pass the
username and password to Exchange 2000 (or any site) in the url (i.e.
http://username:password@exchangeserver.mydomain.com) ... so I've possibly
came up with a solution (which I'm sure is thought of and implemente... more >>
Asynchronous Socket Problem
Posted by Robert at 3/5/2004 9:21:05 PM
Hello
I am working on a Telnet Server using asynchronous sockets. The problem I am running into is that the Receive Callback functions are not being called until Enter is pressed on the client. This is not the normal method of Telnet. I need to be able to process each packet as it arrives, no... more >>
Edit Web.Config Programmatically
Posted by Stewart Armbrecht at 3/5/2004 9:04:35 PM
Does anyone know of an example application that demonstrates how to edit a
web.config file programmatically using c#?
... more >>
What's the difference, here?
Posted by Jon Shemitz at 3/5/2004 7:52:59 PM
Why is the cast in Child.Test valid and the cast in Base.Test is not?
"C# Language Specification" section 6.4.4 makes me think that perhaps
the Base.Test cast is ambiguous in some way, but I don't see it. I'd
expect an implicit conversion of Value to long, Derived.Derived() to
turn that into a D... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Faster XML Processing...
Posted by DMan at 3/5/2004 6:51:52 PM
Need some help on how to make the following faster....
Public XmlDocument ProcessXML( XmlDocument xmlData )
{
XmlNode originalXML = xmlData.Clone();
try
{
// Process XML data here...
}
catch
{
// if ANYTHING goes wrong with XML processing
... more >>
Variable representation in StringBuilder
Posted by ola at 3/5/2004 6:51:13 PM
How can I replace the character literals in the stringbuider below with variables?
StringBuilder sData = new StringBuilder("<CABDETAILS CabNumber=\"43877\" CabSKU=\"6633\" ExpDate=\"0106\" />");
For example, I will have a variable representation of "43877" in the stringbulder. variable already de... more >>
Forms design and resizable functionality
Posted by misop NO[at]SPAM gmx-dot-net.no-spam.invalid at 3/5/2004 6:39:48 PM
Hello,
I have interesting problem. I need to create MDI application with
custom MDI child's windows. MDI childs should have rounded corners
and border with own style (not like windows default style). So I need
to cut corners, cut title bar (instead use own). But, when I cut all
borders (or use... more >>
[OT] About VS.NET
Posted by C# Learner at 3/5/2004 6:17:04 PM
It's a _great_ IDE. It has so many handy features! To top it all off,
it's super-fast on here. It usually loads up in less than 1000ms,
presuming it's going straight to the Start Page and not initially
loading a project.
It's so versatile too -- I use it to write HTML, XML, and even surf... more >>
Writng the Binary Data into Registry
Posted by Saradhi at 3/5/2004 6:14:30 PM
Can any one put me a piece of code to write binary data into Registry?... more >>
Try, Catch... whats the point of Finally?
Posted by Z D at 3/5/2004 6:08:17 PM
Hi,
I was wondering what's the point of "finally" is in a try..catch..finally
block?
Isn't it the same to put the code that would be in the "finally" section
right after the try/catch block? (ie, forget the finally block and just end
the try/catch and put the code after the try/catch block)... more >>
Serial port component?
Posted by MuZZy at 3/5/2004 5:11:35 PM
Hello,
Does anyone know any open-source serial port communications component?
google didn't really help me with that...
Thank you,
Andrey
... more >>
ComboBox
Posted by RF at 3/5/2004 5:03:26 PM
Hi,
Maybe someone can help me? I have a combox filled with a couple of items
(DropDownStyle=DropDown):
- combobox:
- abc
- def
- ghi
When I type an existing item, lets say 'ghi', the cursor will automatically
move back to the first position? What is that? Ho... more >>
Form not closing
Posted by MFRASER at 3/5/2004 5:02:09 PM
I have a form where I dynamically add a control to a panel based on a menu
selection.
Problem is that if I attempt to close the form after changing the control
the form does not close
Here is my code
This function adds the control and then at close I have tried the following
this.close()... more >>
Can I Select specific column in listview
Posted by Isman at 3/5/2004 4:51:03 PM
I was trying to find a way to select specific fields in listview with
multiple column. but I can't seems to find a way to this without selecting
the whole row. Any suggestion anyone..
Thanks in advance
... more >>
c# syntax
Posted by suzy at 3/5/2004 4:18:32 PM
hello,
i have seen places where the following syntax similar to the following is
used:
param={0}, sParam
where {0} is replaced by sParam.
How can I do that with string concatenation. I want to simplify the
following command:
sText = "Hello my name is " + sName + ". I am " + nAge + ... more >>
FileSystemWatcher Class.. Filters?
Posted by Ryan Rogers at 3/5/2004 4:15:03 PM
The FileSystemWatcher Class has a filter property where you can tell it what
files you want it to watch for. I need it to watch for *.p** and *.f**
files both and have tried giving the filter the following strings
"*.p**;*.f**" and "*.p**,*.f**" and Each one on its own. Only when I supply
each... more >>
DateTime: Huh?
Posted by ChrisM at 3/5/2004 4:01:51 PM
Could anyone please tell me the difference between these 2 lines:
myDate = DateTime.Now;
and
myDate = DateTime.Parse(DateTime.Now.ToString("dd/MM/yyyy"));
Seeing as later on in the code, the ExecuteNonQuery works with the first
option, but not with the second. (I get : {"Data type... more >>
CSV to XML?
Posted by David Gouge at 3/5/2004 3:54:59 PM
Hi All,
We are using a web service and one of the methods returns a comma delimited
file as a string. What I would like to do is then get that data into a
datatable so that I can store it in a database somewhere. What would be the
best way to get the csv data into a datatable and how would I... more >>
HOWTO: use ArgIterator
Posted by Vladimir at 3/5/2004 3:53:04 PM
SGVsbG8sIEFsbCENCg0KSSBoYXZlbid0IGZvdW5kIGFueSBleGFtcGxlIG9mIHVzaW5nIEFyZ0l0
ZXJhdG9yIGFuZCBSdW50aW1lQXJndW1lbnRIYW5kbGUgaW4gTVNETi4gQXJlIHRoZXkgYW5hbG9n
b3VzIHRvIGVsaXBzaXMgKC4uLikgaW4gQysrPyBDYW4gSSBjYWxsIERMTCBleHBvcnRlZCBmdW5j
dGlvbiB3aXRoIGVsaXBzaXMgdXNpbmcgQXJnSXRlcmF0b3I/DQoNClJlZ2FyZHMsDQ... more >>
Numeric index into HashTable
Posted by _eee_ at 3/5/2004 3:37:35 PM
I'm looking for a way to step through a hashtable while adding items
to the table (This precludes using enumerators. They don't like
HashTable alterations while they are active). There must be an
internal structure that can be accessed sequentially, like an array.
Is it accessible?
Or maybe... more >>
aplication path ?
Posted by genc ymeri at 3/5/2004 3:29:16 PM
hi,
What is the command of finding out what is the path of the application ?
thanks in advance !
... more >>
the position of new added row in datagrid
Posted by Bamse at 3/5/2004 3:18:44 PM
hi, i have this problem:
at runtime i add rows to a grid (actually to a datatable, that the grid is
binded to)
but the row is added down, after the existing rows and i want it to be the
first shown in grid;
i tried with dataview.sort = "<field> DESC"; but it didn't work
i tried using
d... more >>
a very strange problem
Posted by Wajih-ur-Rehman at 3/5/2004 2:47:00 PM
string val = reader.ReadElementString(localName); //reader is XmlTextReader
if ( val != null )
{
if (val.Length != 0)
{
}
}
If the value of val comes out to be an empty string, it still goes in both
of the if conditions :| :| :| :| ( I have even tried val... more >>
Debug & continue
Posted by Juan Ignacio Gelos at 3/5/2004 2:42:52 PM
What's the current status of this feature for Visual C#? I guess Microsoft
knows there's a heavy demand for it from the VC# community. Is it planned
for inclusion in Whidbey?
Juan Ignacio Gelos
... more >>
method that returns more than one value?
Posted by VM at 3/5/2004 1:26:37 PM
In my Win app, I have an event that calls method myMethod.Process() which
returns a struct. This method Process() is composed of several other
methods: openDB(), checkDB, expireDB(), etc... and all these methods return
0 (Success) or 1 (Fail). If any of these methods return a 0, the process is
... more >>
Simple Question! - Streaming a small image to the browser in c#
Posted by chakachimp NO[at]SPAM yahoo.com at 3/5/2004 1:22:59 PM
I've seen several posts around the Internet and many of them either
don't work or only partially work. All I'm trying to do is record some
action asynchronously from an html file, a sort of logging mechanism.
The product is a CD catalog that will be delivered to many customers
and they want the ... more >>
IDataBindingsAccessor
Posted by Ian Frawley at 3/5/2004 1:07:32 PM
Anyone know how to use the IDataBindingsAccessor interface>
I am trying to check if a System.Web.UI.WebControls.WebControl that I
generate on the fly has DataBindings
--
Ian
... more >>
Formatting numbers right-justified
Posted by Julian Nicholls at 3/5/2004 12:26:21 PM
Hello Everybody
Am I missing something, or is there no way to format numbers right-justified
using Console.WriteLine(), i.e.
23
223
1023
I can get zero fill on the left, but not space fill.
Best Regards
Julian N.
... more >>
Debugger and Exception in static class initializer
Posted by Charles.Gimber at 3/5/2004 12:26:06 PM
Set "Common Language Runtime Exceptions: When Exception is Thrown" to "Continue"
Execute button1_Click
Debugger should break on line "SHOULD BREAK HERE" and not on line "SHOULD NOT BREAK HERE"
Debugger breaks on correct line for normal class initializers
class Ab
static Abc... more >>
Compiler Constants from a Macro ? Help needed !
Posted by Benne Smith at 3/5/2004 11:45:06 AM
I can't seem to use my normal compiler constants from inside a macro ?
It's possible to define NEW constants inside the macro, but this is not what
i need.
Does anybody know a way to get to them from inside the macro ?
Thanks,
Benne
... more >>
What is Marshaling?
Posted by VM at 3/5/2004 11:37:26 AM
What's marshalling? I've had to use it extensively for a project but I don't
know what it means. I tried to look for a definition in the Internet but I
couldn't find anything that would explain what it is.
Is converting a C-style struct to a C# class (or struct) marshalling? And
what about the f... more >>
JIT Compilation for win form app
Posted by Big D at 3/5/2004 11:11:24 AM
I am working on a win app, and when testing it, I encounter an error that
results in a dialog opening and giving me a generic error (object ref not
set to instance of an object or the like). It doesn't tell me what the ref
or obj is, and doesn't give me a line number. Isn't this part of JIT??? ... more >>
Server Side Word to PDF conversion
Posted by Curtis Justus at 3/5/2004 10:56:43 AM
Hi,
We have a project that requires a .NET service to convert a Word document to
a PDF document. Basically, a person would create a mail merge template in
Word and through automation, we merge the data and spit out one or more PDF
documents. It appears that the best thing for me to do is get... more >>
thread starting then stopping immediately - access to socket denied?
Posted by karl.holzman NO[at]SPAM tricaresw.af.mil at 3/5/2004 10:50:09 AM
I have a windows service that creates a monitor thread which in turn
creates 4 worker threads. Each thread is based upon a derived class
(HL7Listener) of the TcpListener class. When running this service on
my workstation I have no problems whatsoever. I then deployed this to
another server an... more >>
Link XML file to a datagrid
Posted by Hugh Creswell at 3/5/2004 10:25:12 AM
Hi there, I wonder if anyone can give me some help here?
I am a newbie at csharp, and am translating a C++ app that I wrote into
csharp.
What I have is a and XmlDocument in memory, referenced by a variable
m_loadedFile = new XmlDocument();
This is then loaded from an Xml file, whose structu... more >>
Zugriff auf Checkbox in Vorlagen-Header
Posted by joern.duwe NO[at]SPAM web.de at 3/5/2004 10:00:22 AM
Hallo NG,
ich habe lt. meinem Verständnis einen einfachen Sachverhalt, komme
aber einfach nicht auf die Lösung. Hoffe, jemand kann mir helfen.
Ich habe ein DataGrid (WebForms) mit einer Vorlagenspalte, bei der ich
in der Vorlage dafür eine Checkbox bei ItemTemplate eingefügt habe,
damit ... more >>
Object Array Error
Posted by Ryan Rogers at 3/5/2004 9:48:50 AM
I'm trying to create a FileSystemWatcher Array, however I am new at C#... I
know its not instanciating form somereason or not getting the reference
because I'm getting the
System.NullReferenceException and Here is bascially what I have for my code:
FileSystemWatcher[] watcher = new FileSystemW... more >>
Windows Date Picker...
Posted by Jim Heavey at 3/5/2004 9:42:01 AM
Hello, I am trying to alter the default date format shown in the date
picker control (windows) . I am using the "Custom Format" property and
setting this value to "ddd M/d/yy", but this has no effect. What am I
doing wrong?
Thanks in advance for your assistance!!!!... more >>
Threading question - please help!
Posted by Edward at 3/5/2004 9:41:05 AM
Hello
I hope someone could help me
I'm trying to prevent code from running before the thread I created completes. Here's the code snippet
DataTransformerWorker dtw = new DataTransformerWorker(strApplicationFolder, strSupplier
strFile, lblProgress, ProgressBar1)
//create new threa
ThreadSta... more >>
Threading / random number problem
Posted by Mark Rae at 3/5/2004 9:26:15 AM
Hi,
My R&D department has asked me to look at threading in a Web Service written
in C#, so I came up with the following code:
using System;
using System.ComponentModel;
using System.Threading;
using System.Web.Services;
namespace CWSThreading
{
public class CThreading : System.Web.Se... more >>
StringWriter to Text file
Posted by Robert Linder at 3/5/2004 8:46:05 AM
I am trying to write
'StringWriter SW = new StringWriter();' to a FileStream.
The code writes the text to file, but NotePad does not see the NewLines.
Below is the code snippet taken from a large project
////////////// Main ////////////////////////////////////////
StringWriter DataWrit... more >>
ADSI Query to filter out machine accounts in the domain
Posted by prasadkkn NO[at]SPAM hotmail.com at 3/5/2004 8:42:16 AM
I have the following C# code to enumerate the list of groups in a
domain using ADSI. The problem is if the domain contains machine
accounts ($) it get those accounts too.
Can somebody help me here to filter out the machine accounts so that I
get only the NT group objects.
public ArrayList G... more >>
Images Not Being Displayed IN ASPX pages With .NET 1.1
Posted by James Lennon at 3/5/2004 7:46:06 AM
I developed a series of ASPX pages using VS 2002 and 1.0 version of the framework. These pages save the sessions state information InProc. I have upgraded to VS 2003 and 1.1 of the framework and have run into the following problem. When I save the session state in proc, the images on my page ar... more >>
Regex for removing all special characters from a string?
Posted by SStewart at 3/5/2004 6:41:51 AM
Does anyone know a good regex expression for removing all special characters
from a string, allowing only alphanumeric?
... more >>
Testing equality of Pen objects
Posted by tristan_sehgal NO[at]SPAM yahoo.co.uk at 3/5/2004 6:24:04 AM
Hi,
I'm trying to test if two Pen objects are equal as shown below:
Pen p1 = new Pen(Color.Black);
Pen p2 = new Pen(Color.Black);
if (p1.Equals(p2))
{
Console.WriteLine("These pens equal");
}
The problem is that the if statement doesn't return true, I would have
thought that p1 and... more >>
About new object at run time using C#
Posted by billgay_hk NO[at]SPAM yahoo.com.hk at 3/5/2004 6:22:47 AM
String Information;
Information=touristSpotInformation;//touristSpotInformation is a class
name
Type myType=typeof(Information);
Object o=Activator.CreateInstance(myType);
But "Information" not a class;
How to change "Information" to class?
I have try to do this:
Type myType=Type.getType... more >>
stack trace and stack frame
Posted by anonymous NO[at]SPAM discussions.microsoft.com at 3/5/2004 5:17:16 AM
Hi all i posted this question yesterday. no answers yet.
please do reply if you have any ideas. thanks a lot.
Subject: stack frame stack trace
can the information from the stack be obtained only when
exceptions are thrown? kindly reply.
..
... more >>
Downloading a CSV File
Posted by news.west.earthlink.net at 3/5/2004 3:50:44 AM
All code-behind written in C# but not certain it is a C# issue...
I have a page that dynamically creates a csv file (maillist.csv) in a
users' directory by selecting current data from their database. A hyperlink
to this file is generated on the same page.
If I look in the directory on the ... more >>
CreateInstance problem
Posted by Hans Berende at 3/5/2004 3:41:05 AM
Hi all
I have read the posting of Chris Bamford, but I still get the problem...
Here are some pieces of code
file IPlugin.cs
public interface IPlugi
string SayHi()
file Class1.c
public class Class1: IPlugi
string IPlugin.SayHi(
return "Hi"
These excerpts ar... more >>
Testing equality of pens
Posted by Tristan at 3/5/2004 2:56:07 AM
Hi
I'm trying to test if two Pen objects are equal as shown below
Pen p1 = new Pen(Color.Black)
Pen p2 = new Pen(Color.Black)
if (p1.Equals(p2)
Console.WriteLine("These pens equal")
The problem is that the if statement doesn't return true, I would have thought that p1 and p2 are the s... more >>
Enumerates COM Port
Posted by SS at 3/5/2004 2:43:51 AM
How do I enumerate all available serial/COM port in my
system ?
Thanks.... more >>
Private Constructor
Posted by Q2004 at 3/5/2004 2:02:55 AM
What's the significant of private construtor ?
public class Car{
private string m_strName;
private string m_strType;
private int m_nID;
private Car(string name, string type, int ID)
{
m_strName = name;
m_strType = type;
m_nID = I... more >>
Drawing column headers...
Posted by Yaron at 3/5/2004 1:31:07 AM
Hi
I'm creating a control very similar to the ListView in Details mode. I'm confused as to how to go about drawing the column headers at the top
As the column headers are static and stay in one position (hence, they do not need to be scrolled by the system when the AutoScrollPosition is changed)... more >>
About get method at run time using C#
Posted by billgay_hk NO[at]SPAM yahoo.com.hk at 3/5/2004 1:08:01 AM
my code is here
String information;
public Class temp{
infomation=touristInformation;
Type myType=Type.GetType(Information);
Object o=Activator.CreateInstance(myType);
..
..
..
}
touristInformation is a class name (touristInformation.cs)
is it possible to do that to create touirstInfo... more >>
Selecting DLL's during program excecution
Posted by albert duffus at 3/5/2004 1:01:26 AM
Selecting DLL's during program excecution
Let's suppose I have 2 dll's. One is my.dll, the other
is my2.dll.
During program excecution, when those dll's are called
for use, how can I select my2.dll first, and if that is
not found, select my.dll?
Do yo have a short snippet of code ... more >>
|