Groups | Blog | Home


Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008


all groups > c# > may 2007 > threads for wednesday may 30

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

Load DLLs compiled using Mingw
Posted by Brandon McCombs at 5/30/2007 11:34:38 PM
Hello, Yesterday I just started using Visual C# 2005 Express Edition and I'm trying to load external DLLs. I started out with trying to load just one like so: [DllImport("libtest.dll")] static extern void connections_init(); However when I call the function that wraps connec...more >>

Using reflection to show all fields/values of a struct.
Posted by Zytan at 5/30/2007 5:24:46 PM
This code works: Type t = myVar.GetType(); System.Reflection.FieldInfo[] fields = t.GetFields(); foreach (System.Reflection.FieldInfo field in fields) WriteLine(field.Name + " = " + field.GetValue(myVar); But, when one of the fields is an array of string, this will just print: field...more >>

Deleting strings from a RichTextBox string array
Posted by Ray Mitchell at 5/30/2007 5:06:00 PM
One more for today.... As I add more and more lines to my RichTextBox the array that holds its strings gets bigger and bigger and the vertical scroll bar gets smaller and smaller until the string array finally runs out of memory. I'd like to set some line limit and once that limit is reach...more >>

pined pnael
Posted by GS at 5/30/2007 4:50:43 PM
in visual studio there are pinned panels. they are very responsive. How can create in my c# application pinned panel that works like vs also? so far I found nothing form google , built-in help. I know on PC's with less capable graphic card, the pinned panel may well become a bottleneck...more >>

Windows Service installation....
Posted by 511 at 5/30/2007 4:43:26 PM
I have written a Windows service which is consuming a webservices. When i am trying ti install the windows service using installutil.exe it gives me an errorr:- Exception occured while initializing the installation: System.IO.FileNotFoundException: File or Assembly name documnets, or one ...more >>

Moving the caret in a multiline RichTextBox
Posted by Ray Mitchell at 5/30/2007 4:07:01 PM
Hello, I'm trying to implement a backspace on the "bottom" line of a multiline text box. I want it to be ignored if it's already at the beginning of that line. I think I've got the part about removing each character from the string that represents that line, but how do I back up the caret...more >>

Attributes to expose C# enum through COM Interop
Posted by predatorsw at 5/30/2007 2:30:00 PM
....just like the MIDL "enum" so I have access to this thing from the host side. Is it as simple as giving the enum a public attribute/guid? thanks! tima at predator dash software dot com...more >>

Calling Event Handler
Posted by Nitin at 5/30/2007 1:33:20 PM
Hey Guys, I have a problem. I need to call event handler of buttons placed on a form on its keypress event. The Problem is i need to read a file which includes the button name whose click event is to be called and the KEY whose press event whould trigger the respective button's click event...more >>



OpenFileDialog Event Handling
Posted by Ray Mitchell at 5/30/2007 1:19:01 PM
I need to use the OpenFileDialog class to get the name of a file, but I don't want it to check to see if the file is really there since I may just want to type an arbitrary name in and create it later. I assume the correct way to do this is to handle the OK button click event. I found the fo...more >>

compare two structs via ==
Posted by titan nyquist at 5/30/2007 12:44:12 PM
I wish to compare two structs via == but it does not compile. I can overload and create my own == but am I missing something that c# already has implemented? ~titan ...more >>

What do I have to write in OracleConnection string for "Data Source" ?
Posted by wersam NO[at]SPAM yahoo.de at 5/30/2007 12:30:25 PM
I tried to connect to an existing Oracle Database with the following ConnectionString: using System.Data.OracleClient; // + Added Reference "System.Data.OracleClient" string cs = "Data Source=XE;User Id=karl;Password=mypasswd"; connection = new OracleConnection(cs); connection.Open(); Th...more >>

How to remove automatic generated lines in Form.Designer.cs refering non-existing objects ?
Posted by m.poppers NO[at]SPAM lycos.com at 5/30/2007 12:15:17 PM
Assume the following sequence of user actions starting with a Form and an e.g. StatusStrip: 1.) User doubleclicks on the StatusStrip 2.) VisualStudio jumps to the new generated source code mystatusstrip_itemClicked() { ..... } 3.) The user deletes this function from source code (because h...more >>

How do I write something into the StatusStrip ?
Posted by c.simi NO[at]SPAM subnet.net at 5/30/2007 12:02:14 PM
I added a StatusStrip "Sstrip1" to a Form "Form1". In the procedure private void Form1_Load(...) I added the following statement: Sstrip1.Text = "Text in my StatusStrip"; Unfortunately this text assignment is not recognized. When I call the program the StatusStrip is empty. How ...more >>

System.Reflection.RuntimePropertyInfo - accessing actual datatype of property
Posted by Jay at 5/30/2007 11:18:53 AM
Is there a way to access the actual datatype of a property when looking at the PropertyInfo? For example: Property defined: public Nullable<DateTime> EndDate { get { return endDate; } set { endDate = value; } } What we would like to do is while accessing the properties contain...more >>

Confused about memory usage.
Posted by Frank Rizzo at 5/30/2007 10:24:09 AM
I have an application (windows service) that in the beginning reads data rapidly into a collection of large object trees. Each object tree in the collection is about 100mb and typically there are 6-20 object trees in the collection. When the application starts and the data is being read in...more >>

Alphanumeric character validation in C#
Posted by kanepart2 NO[at]SPAM hotmail.com at 5/30/2007 10:15:12 AM
Hey all, I have to validate a textbox in windows forms for alphanumeric characters such that non alphanumeric key presses are ignored. Some help would be appreciated ...more >>

Double-Click row in datagrid and trigger function?
Posted by trint at 5/30/2007 9:48:53 AM
Hi, I have three datagrids in a WinForm. I want dataGridView1 to retrieve data and make dataGridView2 visible and the same with dataGridView3. Any help is appreciated. Thanks, Trint ...more >>

How to access a resource string within a DescriptionAttribute
Posted by SteveT at 5/30/2007 8:26:01 AM
I am using [Description("A description")] in my code. I want to be able to reference a text string within my "Resource file" like this: [Description(MyApp.Properties.Resources.strADesciption)]. The issue is that Description requires a constant string. Is there anyway to reference my re...more >>

write data of unbound datagridview to XML
Posted by Anthoni at 5/30/2007 7:00:49 AM
Dear All, I need to export data of unbound datagridview to XML file. Since my DataSource is NULL, What other options do I have? Does i need to make 2 loops (on all the records and inside loop of all the cells) read data and export it to XML? TIA, ...more >>

how to read/write settings (using .ini, xml, whatever)?
Posted by titan nyquist at 5/30/2007 5:49:13 AM
I want to read/write user settings. I thought about using .ini or .xml files. Are there classes in c# to handle this? The stuff I find on the 'net seems old. Titan ...more >>

dataGridView1 column separator help...
Posted by trint at 5/30/2007 5:41:20 AM
Hi, I have a dataGrid that when I try to add a row, I can't keep the data separated into columns. Here is what I tried to separate the columns (a coma): string[] completeProductsString = new string[1000]; DataGridViewRowCollection rows = this.dataGridView1.Rows; completeProductsString[j1] =...more >>

how to test a string if it contains special characters
Posted by titan nyquist at 5/30/2007 4:50:05 AM
How do you test a string to see if it contains special characters? I want to ensure that any names typed into my form has only letters (and maybe allow a dash and an apostrophe). I can loop RealName.Contains("..."), but there must be a more elegant solution. ...more >>

Interop with VC dlls
Posted by swapna_munukoti NO[at]SPAM yahoo.co.in at 5/30/2007 3:42:33 AM
Hi all, I am new to .net and that c#. I am currently working for a project that includes migration from vb6 application to c#. VB6 application communicates with a modules developed in VC++. Now, the same logic I am trying with c#. That is c# application to interact with VC++ modules. I...more >>

Going through hoops to get a registry DWORD to populate a Boolean
Posted by teddysnips NO[at]SPAM hotmail.com at 5/30/2007 3:35:00 AM
I have a notional Boolean value stored in the Registry. Actually it's a REG_DWORD capable of taking values of either 0 or 1. So, I need to populate a checkbox on a form dependent on this value. 1. I tried this: chkLogToFile.Checked = Boolean.Parse(LogFileKey.GetValue("LogToFile")); ...more >>

How to know http method from a webbrowser?
Posted by admin NO[at]SPAM msreader-dot-net.no-spam.invalid at 5/30/2007 2:02:05 AM
Hi, I'd like to know current webbrowser's method ( get or post), how can I know? I looked for a long time, but I still have no idea. who can help? Regards ...more >>

Overloading in generic interfaces
Posted by gleb.alexeev NO[at]SPAM gmail.com at 5/30/2007 1:40:32 AM
Hello everyone! It's my first post here. Could anyone please explain me the behaviour of the following code? <code> interface IFoo<T, P> { void Bar(T t, P p); // (1) void Bar(P p1, P p2); // (2) } class NastyFooImpl : IFoo<int, int> { ...more >>

A hint on marshalling a byte array into a void* pointer
Posted by Beorne at 5/30/2007 1:06:25 AM
I have to pass a byte array as an input parameter to a function in a propertary dll. The c++ signature of the original function is the following: ---------- C++ ---------- int ncWrite(unsigned long ObjHandle, unsigned long DataSize, void* DataPtr) ---------- end C++ ---------- >From ...more >>

BackGroundWorkers
Posted by MarcuEusebiu NO[at]SPAM gmail.com at 5/30/2007 12:12:34 AM
Hello, I have a Queue and 2 BackGroundWorkers. How can I set one worker to Peek in Queue and the other one to Dequeue the first element from queue? Thanks ...more >>

Extracting values from XmlNode/XmlAttribute
Posted by MaxMax at 5/30/2007 12:00:00 AM
If I have an XmlNode/XmlAttribute and I want to convert its value to a "native" c# type (for example boolean), how should I do? I can't (for example) simply use Boolean.TryParse, because Xml Boolean considers 0 and 1 to be "good" values for a boolean type. --- bye ...more >>

Using a transaction to insert into two typed dataset tables
Posted by Simon at 5/30/2007 12:00:00 AM
Hi All, I'm hoping someone could advise me on how to make the following two operations atomic. I have a Places table and a PlaceBoundaryPoints table. When I create a "Place" I need to add a Place row and a number of PlaceBoundaryPoints (e.g. a place is made up of several boundary points...more >>

problem with Select in datatable
Posted by perspolis at 5/30/2007 12:00:00 AM
Hi all I want to select from a datatable like below: mydatatable.Select("Name='"+this.textbox1.Text+ "'"); it works properly but when I edit textbox1 with something like this re'fd that contains ' or " the Select gives me an error "Missing Operand". how can I solve this problem. thanks ...more >>

How do know if a class use operator overload?
Posted by Bengan at 5/30/2007 12:00:00 AM
Hi! Where can you see if a class has overloaded operator(like +,-) in Microsofts NET class library on the net? They list members, properties, fields and other stuff for a class but no operatoroverloading. It would be nice to know if a class uses overloaded opetors so you know if its the ...more >>

Where do i find .NET class libary in Visual studio?
Posted by Jacob at 5/30/2007 12:00:00 AM
Hi! Where do i find .NET class libary in Visual studio? I mean if you would like to browse through the classes and members. Or if you want to search fr specific classes or members. Thanks in advance. Jacob...more >>

Change visible state for a Button
Posted by Geoffrey at 5/30/2007 12:00:00 AM
Hello, On a form, I place a buton with an OnClick event. No problem. I set the visible propperty of this button to false. And reset it so true again, the event isn't fired ans my app same to be crashed ... Any idea? Thx ...more >>


DevelopmentNow Blog