all groups > c# > december 2005 > threads for friday december 2
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
XML Processing and c#
Posted by Tarun Mistry at 12/2/2005 11:14:42 PM
Hi all, just looking for a little guidance with xml procerssing.
Imagine the scenario, I have a XmlDocument object populated with XML. I need
to find and replaces some of the text in one of the nodes, i.e. the basic
XML below, I want to substitute _replace_with_value_ with some data,
<root... more >>
overload constructor
Posted by Doug at 12/2/2005 10:19:13 PM
Hi
I am working through a learning module privately where there is discussion
about overloading the constructor.
Could someone please let me know the benefit or purpose of doing this in a
class?
Thanks
doug
... more >>
SqlTransaction problem???
Posted by perspolis at 12/2/2005 7:28:49 PM
Hi all
I have a master-detail tables in sql server.
I use SqlTransaction to insert data into both tables.
it works well but if I check the "Cascade Delete Related Records" option in
it's realtion in sql server my SqlTransaction dosen't work and get timeout
error..
please help me
thanks in ... more >>
Process ExitCode 1 for batch file execution from C#
Posted by Zeya at 12/2/2005 7:07:23 PM
I have created a very simple batch file and trying to retrieve the
standard output but everytime I run the code it returns ExitCode as 1.
I have created a batch file as simple as ping localhost or echo hello
world and neither have worked. Note: This is from ASP.Net code. Also,
the batch file r... more >>
Simple Unboxing Question
Posted by Robert W. at 12/2/2005 7:01:01 PM
I have a situation where I have pairs of strings that I want to put into an
ArrayList and then later pull out of it.
To keep things simple I tried this to put them in:
arrayList.Add(new object[] {stringA, stringB});
That works fine. But I can't figure out how to unbox them into the... more >>
Global hotkey
Posted by Marc Gravell at 12/2/2005 6:47:00 PM
Just a thought prompted by the chain "Splitting up a string"; ages ago a
wrote (in VB via Windows API dll calls) a global hotkey app that runs
silently, intercepts [Ctrl]+[Alt]+V, converts the clipboard to a string and
sends [Ctrl]+[V]; I still use it almost constantly, but it is a pain to
m... more >>
windows form datagrid question
Posted by Jason Huang at 12/2/2005 5:12:09 PM
Hi,
In my Window Form, my DataGrid1 uses DataTable MyDT as it's DataSource.
Now MyDT has 3 columns, after the following Column.Add commands,
"Column1","Column2", and "Column3".
MyDT.Columns.Add("Column1");
MyDT.Columns.Add("Column2");
MyDT.Columns.Add("Column3");
How do I add a Da... more >>
Setting UTC time to 1970 (Unix Epoch)
Posted by Maziar Aflatoun at 12/2/2005 4:36:07 PM
Hi,
Can someone please tell me how I can set DateTime to 01/01/1970 (UTC).
Doing the following
DateTime dt1 = new DateTime(1970, 1,1);
Debug.WriteLine("dt1(utc):"+ dt1.ToUniversalTime().ToString());
Doing the following returns 1/1/1970 5:00:00 AM
However, I want to set the DateTime so... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
internetreadfile newline read
Posted by marfi95 NO[at]SPAM yahoo.com at 12/2/2005 4:34:27 PM
Is there a way to make the internetreadfile function read records that
are terminated by newlines instead of reading into a buffer. It would
make it much easier for me to process.
I suppose I could read the whole file and split into an arry, but how
do I split on a CRLF ?
Mark
... more >>
Importing Outlook contacts into my custom software
Posted by Erland at 12/2/2005 4:30:29 PM
Hi all,
I am working on a desktop software and using dot net( C# and its a
standalone software , its not a outlook pluggin). I have to import
Outlook 2003 contacts into my software. How would i go about it?
Are outlook 2003 contacts held in a file, which file is this?
Moreover, what is a PST fi... more >>
Var type
Posted by Maarten at 12/2/2005 4:28:48 PM
HI,
i want to split a variable containing this -----> prog/2
i want to split on the /
the value is entered in a datagrid, but when i declare the collumn fir
stringinputs
i get an error the the inputformat is wrong.
Regex r = new Regex("(/)");
string[] s = r.Split(strvalues);
Messa... more >>
101 Samples for Visual Studio 2005 - Question
Posted by TheCoder at 12/2/2005 4:23:46 PM
OK, so I am sure I am being retarded but I do not see solution files for
many of the web projects within these samples. Is there something that I am
missing? Thanks.
... more >>
Unable to generate schema using XSD.exe tool
Posted by Nathan Wiegman at 12/2/2005 3:47:02 PM
Hi,
I am using the XSD utility to generate schemas for some of the classes that
we serialize in our project. Everything works fine and dandy until I try and
create a schema for a class that spans assemblies.
For example, if I have a class named "ClassB" that resides in "ClassB.exe"
an... more >>
C# BCP API
Posted by Joe at 12/2/2005 3:44:35 PM
Hello,
I'm calling a stored procedure to bulk insert data but the procedure
doesn't like a unc address format being passed to it. I wondered if
anyone had tried to write an API to bcp as I think that could solve my
problem.
Regards,
Joe
Joe
--
Sent via .NET Newsgroups
http://www.do... more >>
mshtml & web browser from dotnet service
Posted by NG at 12/2/2005 3:34:03 PM
Hi All
This is a post further to my previous problem that I solved with the help of
my friends at csharp group.
I have a UI application that has a web-browser. When this application is
run with the URL as one of the command parameters, this application accesses
the web page in its web browse... more >>
Need example: Add password to Excel file.
Posted by vbMark at 12/2/2005 3:20:12 PM
Greetings,
I have an existing Excel file. I need to programatically password protect
the file so that it can't be read unless the password is entered.
Any code examples?
Thanks!
[c# 2005]
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Best free software
http://www.v... more >>
Determining object type from C# at runtime
Posted by Martin Robins at 12/2/2005 3:04:34 PM
I am currently looking to be able to read information from Active =
Directory into a data warehouse using a C# solution. I have been able to =
access the active directory, and I have been able to return =
"DirectoryEntry" objects within the path that I specify (either using =
the DirectoryEnrtry... more >>
DataGridView Cell Position
Posted by Peter at 12/2/2005 2:56:57 PM
How do I get DataGridViewCell cell position in a window? =20
For a button I would do this:
this.Button.PointToClient(this.Button.Location)
But what do I do for DataGridViewCell?
Thanks=20
Peter... more >>
nhibernate - id change
Posted by Roman at 12/2/2005 2:19:13 PM
Hello
i got this simple problem using nhibernate.
I want to chang the id( primary key of the) object
and update it, to change this key.
i me getting nhibernate exception like this:
identifier of an instance of {0} altered from {1} ({2}) to {3} ({4}) // in
place of number, there are values an... more >>
Waking a suspended computer.
Posted by Christopher Stott at 12/2/2005 12:54:01 PM
I'm working on a PIM program, which can function as an alarm clock. It needs
to be able to suspend the computer, and wake it up at a particular time.
As a test, I'm using a Waitable timer (through PInvoke'd Win32 calls) to
trigger an event, say, 30 seconds later. I create a timer, set its
p... more >>
Coding an application to be single instance?
Posted by Jeffery Tyree at 12/2/2005 12:21:50 PM
I am writing an application in C#.NET that is "AlwaysOnTop" and there should
only be one instance of this program running at any given time. The
"AlwaysOnTop" piece is working just fine but I need to know how to prevent
multiple instances of this program from running. I've been away from co... more >>
FileIO Netwk Permissions!
Posted by Vai2000 at 12/2/2005 12:14:23 PM
Hi All, How do I access a shared Drive which requires username and password
to access?
I need to write a file in a folder within it
TIA
... more >>
Command Line Arguments
Posted by Frank Rizzo at 12/2/2005 11:58:42 AM
I am writing a little add-in that needs to read the Command Line
Arguments for the project as defined in the Project
Properties\Configuration Properties\Debugging\Command Line Arguments.
How do I get at from my addin? I've tried looping through
pplicationObject.Solution.Projects.Item[0].Pr... more >>
[Offtopic] Code to scheme tool
Posted by Tom at 12/2/2005 11:55:30 AM
Hi folks,
I'm looking for something to make from my c# project code an scheme with
connections between functions.
It would be than easy to find redundand functions.
An very very very example:
void Main(int t)
{
int f=calculate(t);
}
int calculate(int x)
{
return t*t;
}
would ... more >>
DataGridViwe Find
Posted by Peter at 12/2/2005 11:37:18 AM
How do I do Search in DataGridView and make the found row visible in UI?
Thanks
Peter... more >>
Is there much difference between VS.NET 2002 and 2003???
Posted by Jon S via DotNetMonster.com at 12/2/2005 11:17:51 AM
Hi all
I've taught myself C# 2002 using VS.NET 2002. I've recently brought myself
an ASP.NET 2003 book. I will work through this ASP.NET 2003 using VS.NET
2002 and C# 2002. I don't fully understand the differences between the VS.
NET 2002 and VS.NET 2003.
Will I restrict myself in any wa... more >>
Naming Convention Redux
Posted by clintonG at 12/2/2005 10:54:59 AM
How are you all doing with not using Hungarian as it has been recommended?
// LinkButton
ChannelTitle or channelTitle?
// LinkButton
ChannelTitleLinkButton or channelTitleLinkButton?
Others?
<%= Clinton Gallagher
... more >>
this embedded
Posted by Rosie at 12/2/2005 10:52:10 AM
evening everyone
i want to move some code from in a function thingy to in the class. its
> Bitmap back = (Bitmap)Bitmap.FromStream(this.GetType().Assembly.GetManifestResourceStream("WindowsApplication1.back.gif"));
which loads the embedded resource to a new bitmap but it says that
'this' i... more >>
Formatting issue with PropertyInfo.GetValue
Posted by Learner at 12/2/2005 10:05:58 AM
I am using Reflection to get values of some of the controls in a
datagrid. One of the control is a DropDownbox, but I cannot get to see
the EXCACT "selectedItem" property value using this.
It works, but the only thing is wont seem to keep the ACTUAL format.
For Ex: ViewSource has the value H... more >>
problem with OleDbParameter (using a variable columnname in a sql string ).
Posted by Sagaert Johan at 12/2/2005 9:45:16 AM
Hi
I try to use this as sql string ( The field i compare with is variable. )
"SELECT * FROM FMatrix WHERE @wantedfield=@criteria"
i use the Parameters.Add with OleDbType.WChar .
Why can't i specify the field i want to use as a parameter ?
I have no error,but the query has no result wh... more >>
Snap lines
Posted by Marc Gravell at 12/2/2005 9:31:02 AM
For a bespoke control, how can I implement my own designer snap lines in
VS2005? I remember finding an MS article once, but I now can't re-locate it.
Basically, I have a custom-control that comprises e.g. a TextBox and some
other things; I don't want to do anything too clever - I just want to... more >>
What's better? Graphics.FromHwnd or Graphics.FromHdc
Posted by Benny Raymond at 12/2/2005 9:23:02 AM
I've seen both used... FromHwnd can be called like this
FromHwnd(this.Handle). FromHdc needs a call to
User32.GetWindowDC(this.Handle) - so my assumption is that FromHwnd is
better because it's less calls, but what's really the case?... more >>
Binding / Reflection - Another Question
Posted by Doug Handler at 12/2/2005 8:56:12 AM
Ok,
I think this is my last one - in my app, the user can select via a dialog
box the dll's they want to load. I use a checkbox to track this (no worries
there), but, once a dll has been bound, how can i make sure that during the
session that a dll can't be bound twice? I'm assuming there... more >>
How to use [DllImport("user32.dll")]
Posted by Juan Martinez at 12/2/2005 8:54:33 AM
In a form i have a drawing control called VectorDraw and a textbox. The
text box is disable, when i am using the drawing area i can write some
text, what i want to do is that when i press any key that key show in
the textbox, or if other control has the focus and i press other key
also show in t... more >>
Regex help needed...
Posted by JS at 12/2/2005 8:43:56 AM
I am writing a C# app that needs to parse a sentence entered by the user
for a simple boolean search.
I need to capture all of the AND words that are not inside of double
quotes. However, I am having a heck of a time figuring out a regex for it.
Can anyone assist with a regex to find all ... more >>
Control Event not firing
Posted by Jimmy Jazz at 12/2/2005 8:35:05 AM
Hi,
I've created a webControl with a list of buttons. Each of the buttons has a
CommandEventHandler attached but when they are clicked the corresponding
postback does not enter the associated event mehod, Can anyone help please.
Jim... more >>
Good C# windows forms/GUI design book?
Posted by Macca at 12/2/2005 8:25:02 AM
Hi,
I am looking for a good C# windows forms/GUI design book.
I have seen Windows Forms Programming in C# by Chris Sells.
Has anyone read it?
I'd appreciate any recommendations,
Thanks In Advance
Macca... more >>
GROUP BY
Posted by Roy Gourgi at 12/2/2005 8:05:51 AM
Hi,
Is there a way to group rows by some columns in such a way that I can
clearly see them in a distinguished fashion when I look at a view or table.
This is my code below but when I try using GROUP BY it is not giving me the
desired effect that I would like?
For example, let's say I wo... more >>
Accessing selected text
Posted by CodeRazor at 12/2/2005 7:49:04 AM
How can i retrieve the value of highlighted text within a text box?
thank you.
... more >>
calling outside program and getting its handle
Posted by nikola.bucic NO[at]SPAM gmail.com at 12/2/2005 7:38:10 AM
subject tell everything.
tnx in advance
... more >>
Printing Problems
Posted by MLM450 NO[at]SPAM hotmail.com at 12/2/2005 7:24:38 AM
I have an unmanaged C++ program that displays a printer dialog and then
asks my C# program to perform the printing operation. What printer info
do I pass to my C# program? It looks like I need to establish values in
the PrinterSettings property of a PrintDocument object. But how?
I thi... more >>
what is the meaning of "PublicKeyToken=null is not marked as serializable." ?
Posted by Prakash at 12/2/2005 7:16:26 AM
Hi Friends,
In my C# application, i have tried to serialize some structured data
using Soapformatter. While calling the serialize funciton i got the
exception message like
"mscorlib....The type <Appname>.<structurename> in Assembly <Appname>,
Version=1.0.2162.36249, Culture=neutral, PublicK... more >>
Mysql connection string problem
Posted by Lorenzo at 12/2/2005 7:05:52 AM
I have a problem with oledb connection string of Mysql for .NET
I installed MyOleDB3.exe Mysql server version 4.1.8-nt
I used this connection string :
strConnectionString="Provider=MySqlProv;Persist Security
Info=True;Location=10.0.0.17;Data Source="+strDatabase+";User
Id="+strUser+";Password... more >>
Serialize A Dictionary
Posted by Andrew Robinson at 12/2/2005 7:02:22 AM
I need to serialize a dictionary so I can encode the contents. I have the
following working but the size seems large. I am guessing that I am
serializing the entire object not just the data. Is there a better way?
MemoryStream stream = new MemoryStream();
BinaryFormatter formatter = new Bina... more >>
Create class files from an assembly?
Posted by DapperDanH NO[at]SPAM nospam.nospam at 12/2/2005 6:59:02 AM
Is there a commercial tool or sample code that can take a dll assembly and
create code similar to the interfaces/namespaces/classes within the assembly?
Any products that can do this, particulary with C#?
Thanks,
Dan H.... more >>
How to read a file from network with different ID and Password
Posted by david.kao NO[at]SPAM opco.com at 12/2/2005 6:58:03 AM
I am trying to write a program for a server application that needs to write a
file and read a file from a network driver with different network ID and
password. Here is code
using (Stream stream = new
FileStream(@"\\10.225.1.31\insight",FileMode.OpenOrCreate))
... more >>
Late Binding Question
Posted by Doug Handler at 12/2/2005 6:50:56 AM
In my application several modules are dynamically bound via Reflection to
the main app - this works fine. Is there a way that I can dynamically
unbind a module. Basically, i want a dialog box that the user selects which
modules they want to bind / unbind. Right now the binding happens at
... more >>
File sent only partially
Posted by Piotrekk at 12/2/2005 6:50:23 AM
Hi
I have a question.
Why file, that i wanna send is sent only partially.
When i wanna send 4xx kb only 266 is sent.
Thanks for your help
PK
Here is the code:
if (Client.Connected)
{
String line = null;
file = new ... more >>
How to define and use a property of delegate type,"=" or "+="?
Posted by han zhiyang at 12/2/2005 6:45:03 AM
Hi.
I tried to design a custom web control which can flexibly and
dynamicly let the control user ,for example the web page developer, customize
its layout codes.This control derives from System.Web.UI.Control,and for my
purpose,I define a delegate property in the control's class defini... more >>
How to check for a closed socket
Posted by Nuno Magalhaes at 12/2/2005 6:00:54 AM
How to check for a closed http socket without losing any data? (MSDN
says to send something to server).
Somewhere in my code (after sending the http header in plain text) I'm
doing a loop with:
Loop:----------------
Socket.Receive //receive http data chunks
Socket.Send //'/r/n' data to che... more >>
user control scroll
Posted by edi sol at 12/2/2005 4:54:51 AM
Hi,
I am writing a hex edit control from a UserControl. I use drawtext
method of the graphics object in the OnPaint. When the text which I
draw go out of the visible rectangle of the control I want to create
scrollbars but they don't appear - I set autoscroll to true and
autoscrollmargin to (... more >>
Username, local group, IsInRole
Posted by Anna at 12/2/2005 3:15:04 AM
Hi,
I would like to do the following on the WinXP SP2 using .Net framework 1.1 &
C#:
If I know the username (can be domain user or just local user), I do not
know the password, and I know the group name (local group) and the user is
NOT the current user, how can I determine if:
1. The ... more >>
a simple http server plz help
Posted by lucifer at 12/2/2005 3:05:41 AM
hi,
i am creating an simple http server ie it serves only static pages .
u can compile the code then use ur browser if it is IE then the it
shows the page but the http header is also shown
HTTP/1.0 200 OK Content-Type: text/html
nweb Web Server Sorry:
but if the browser is mozilla/Firefox it s... more >>
C#
Posted by Virajitha Sarma at 12/2/2005 2:53:32 AM
[StructLayout(LayoutKind.Explicit)]
public struct SampleUnion
{
[FieldOffset(0)] public uint dword;
[FieldOffset(0)] public byte[] bytes;
[FieldOffset(0)] public uint byte3;
[FieldOffset(8)] public uint byte2;
[FieldOffset(16)] public uint byte1;
[FieldOffset(24)... more >>
Memory Status
Posted by Rain at 12/2/2005 1:16:03 AM
Does anyone know how i can get my available and total CPU memory status using
C#? Please help. :D badly needed for a part of my module for my thesis. Thank
You so so much!... more >>
Change DataGridView Column Type
Posted by Peter at 12/2/2005 12:09:52 AM
How to I changed bound column in DataGridView from =
DataGridViewTextBoxColumn(); to DataGridViewButtonColumn() ?
Thanks
Peter... more >>
socket -client
Posted by Ankit Aneja at 12/2/2005 12:00:00 AM
i am doing here some some socket-client work in C# windows service
it is working fine for multiple clients
now i want to limit these multiple clients to 25 for example
i want that when service starts objects for all these 25 clients
are created and when client connects it should be accepted an... more >>
It is very strange!!
Posted by Billow at 12/2/2005 12:00:00 AM
The code of characters gotten by ToCharArray in c# are diferent from in
vb.net or vc.
why???
... more >>
Help: how to capture the image of a specific window?
Posted by ÓíÏ£³õ at 12/2/2005 12:00:00 AM
I have a son, and every night I talk with him through IM.
Although, I can see him in display, I want to capture his
photos and save them into harddisk, so that I can see later.
For that, I decide to make a program to do it.
Could anyone help me? Thanks advance!
... more >>
|