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# > february 2006 > threads for monday february 6

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

User Control MouseUp
Posted by Udi at 2/6/2006 11:51:50 PM
Hi, I have a user control - A that has a panel that contains a list of a different user control - B. When I'm adding a new B to A, I'm subscribing a handler (which is a method of A) to B.MouseUp. However, when I click B the event is not fired. See example: class A : System.Windows.Forms.Use...more >>


Capicom Asn1 error again
Posted by Fafnir at 2/6/2006 11:44:12 PM
Hi all. I'm gettings asn1 error in capicom during the signature verification. The problem is that i sign the document using russian cryptoprovider - CryptoPro and verification also uses this cryptoprovider. Signed files are passed via email(Microsoft Outlook). Some files(small) pass ok and some...more >>

Sort ComboBox
Posted by Peter at 2/6/2006 11:40:54 PM
C# .NET 1.1 How do I sort ComboBox in descending order? Thanks Peter ...more >>

Example code, String divided.
Posted by PioM at 2/6/2006 10:37:31 PM
namespace System { public class Text { public static System.Char Omin='\t',Next=' ',Wciecie='\"',Zamkniecie='\"',Null='\0',Object='ÿ'; public static System.Int32 NextCharacter(System.Int32 i,System.Char[] litery,System.Char wciecie,System.Char nastepny) { for(;i<litery.Length;i...more >>

Textbox Length
Posted by Peter at 2/6/2006 10:28:50 PM
I need to set TextBox length based on the text length in the TextBox, so the entire text in the box is visible. Can anyone point me to an info on how to accomplish this? Thank You Peter ...more >>

Property objects?
Posted by Leif K-Brooks at 2/6/2006 10:19:24 PM
Is it possible to create a class in C# which behaves like another object's property? Here's an example of what I want to be able to do, using made up syntax: class PropertyObject { private int value = 0; public static int operator get(PropertyObject p) { return p....more >>

ndoc status?
Posted by Peter Rilling at 2/6/2006 9:53:21 PM
Any status on nDoc development? Any idea if or when it will support .NET 2.0. ...more >>

Where to Put DAL and Business Objects in WinForms App?
Posted by Smithers at 2/6/2006 9:39:33 PM
In Windows Forms MDI applications... I'm wondering if it is standard practice to create DAL and business objects as static classes. The only alternative (please enlighten me if I'm wrong about this) is to instantiate the DAL and business objects in a Form class - most likely the MDI parent ...more >>



Logginh Function
Posted by Mr. Bean at 2/6/2006 9:25:03 PM
Hi, I use a simple static funtion to output errors, trace messages... However when i call the same function more than one I get an error that the text file is used by another application.. public static void echo(string logMessage){ StreamWriter w = File.AppendText("log.txt"); ...more >>

programmatically add DataGridViewComboBoxColumn
Posted by Rain County at 2/6/2006 7:40:18 PM
I am programmatically building and populating a table and then making it the data source for a dataGridView. I want to add a column to the dataGridView which will be a DataGridViewComboBoxColumn. I wish to populate, by default, all of the ComboBoxes with the same list of three choices. Ho...more >>

How to rewrite this snippet if you must implement IDisposable
Posted by kalamantina NO[at]SPAM gmail.com at 2/6/2006 7:36:02 PM
How to rewrite this snippet if you must implement IDisposable private static void OpenConnection() { string connectionString = GetConnectionString(); StringBuilder errorMessages = new StringBuilder(); SqlConnection connection = new SqlConnection(connectionString); try { co...more >>

date problem
Posted by yoshitha at 2/6/2006 7:17:31 PM
hi db : sql server 2000 lan : C#.net(ASp.Net) in my database table there are 2 fileds of data type datatime. in field 1 i'm storing date in field 2 i'm storing time. in my textbox date is in the format of 2/12/2006 and i'm inserting as it is. and time is in teh fromat of ...more >>

Windows service and net drive
Posted by Ruben Fdez. at 2/6/2006 6:52:19 PM
Hi, I'm in troubles with Windows XP SP_2 I've mapped a net drive to Z: for the machine user Administrator. I've build a Windows service in C# and .NET Framework 1.1. This service must copy several files to this net drive and for that, I use de Administrator account on the machine. And...more >>

DllImport Char* and string
Posted by Gnic at 2/6/2006 6:48:37 PM
Hi, I have a (Complied) C Library that needs to be called using c# code, some of the function require char* parameter(in and out) Here is the problem, There is a function that expect an input char* parameter for example int AddString(const char* someStr) And then there is another f...more >>

Need some help understanding abstract
Posted by Gustaf at 2/6/2006 6:27:31 PM
I have a class that I need to adapt to various scenarios. Some properties and methods will be needed in every case, while other's are unique for one case. So I made a base class, and a set of other derived classes for each scenario. But I don't understand this fully. There are not only meth...more >>

Quick DirectShow question
Posted by Andrew Bullock at 2/6/2006 5:58:39 PM
Hi, I'm trying to use direct show to grab arbitrary frames from a DV .avi. I'm using the PlayWnd code from this example: http://www.codeproject.com/cs/media/directshownet.asp Currently an IGraphBuiler is cast to an IVideoWindow, which is passed the Handle of a picturebox to display the v...more >>

equivalent of with
Posted by Ofer at 2/6/2006 5:58:31 PM
What is the equivalent in C# for VB With <object> .something() End with...more >>

minimize, maximize buttons on the top,right hand corner of my form
Posted by jj at 2/6/2006 5:00:39 PM
I have a single threaded application in c# that scans through a file system. While doing this if I try to minimize, maximize buttons on the top,right hand corner of my form do not do as they are supposed to do. To maximize the window I have to go to "task manager" and double click the applicat...more >>

Dependent assemblies have version conflicts
Posted by Eric at 2/6/2006 4:31:28 PM
After attempting to build a solution, I receive the error message; "One or more dependent assemblies have version conflicts" "Do you want to fix these conflicts by adding binding redirect records in the app.config file?" I received this after changing the assembly version in two of the solu...more >>

URGENT - Rotate a pictureBox
Posted by Const at 2/6/2006 4:28:52 PM
Hi! I wonder how to rotate a pictureBox, welle, the image in the pictureBox ! I watched old post form here, but i can't find any answer for this. I would like to rotate my pic like a sprite, with any angle possible. Anyone could help me please ?? I can't imagine there is only a complicat...more >>

Speed (bandwidth) limit?
Posted by anonymono at 2/6/2006 4:16:06 PM
Can I control the maximum speed that a connection (remoting or sockets) can reach with C#? Thanks in advance. -- ...more >>

Listbox DisplayMember and DateTime Format
Posted by Hoffmania at 2/6/2006 4:11:35 PM
Hello, I am binding a DataSet to a listbox. This listbox is used to set the current binding for an appointment page. A problem I have is that there can only be one appointment per day and I would like the listbox to only display the Date and not the Time. In otherwords, I want the DisplayMemb...more >>

modification of XML file
Posted by Vincent at 2/6/2006 4:01:52 PM
Hi! I'm quite new to C#, and I want to edit an XML file. I followed the HOW-TO here : http://support.microsoft.com/default.aspx?scid=kb;en-us;317666 but it didn't help that much. I work under Linux and MonoDevelop. The file I want to modify is here : http://pastebin.com/542434 Let's say that...more >>

Creating Hyperlinks
Posted by Garth Wells at 2/6/2006 3:36:13 PM
I used the following "classic ASP" approach to build a dynamic menu, but would like to know the proper way to implement the same functionality using a .Net technique (e.g., placing the code in the .cs file and dynamically building the hyperlink controls). The controls need to appear within the...more >>

Invoke member of Userdefined Type
Posted by anthony.wolfe NO[at]SPAM turnkey-gms.com at 2/6/2006 3:33:40 PM
Hello all, I'm hoping that someone could help me with this bit of code. I am using reflection to dynamically call a method within an HttpHandler. When a method returns a user defined type that implements a certain interface, I want to call that interfaces method. The problem is that the lo...more >>

Setting parameters on Crystal Report - Urgent
Posted by Soren S. Jorgensen at 2/6/2006 3:26:24 PM
Hi, I've got a Crystal Report that gets some data from a stored procedure and I need to set some params of the proc at runtime. But no matter what I do, I cannot get the report to eat the params - it keeps showing an error that the proc needs to have it's params initialized. Code's someth...more >>

File Referances debug vs. release mode
Posted by Wayne Sepega at 2/6/2006 3:23:51 PM
We are currently setting up our environment to file reference any assemblies we plan on putting in the GAC. To prevent the developer from having to go get the newest copy of the file and register it in the GAC we are planning on having a common share where these files will live. So what we wou...more >>

working with System.Xml.XmlDocument.
Posted by jens Jensen at 2/6/2006 1:42:41 PM
Hello, I'm calling a webmethod from a webservice written in java. I need to pass an xml file as parameter to the webmethod. I therefore use System.Xml.XmlDocument to load the xml file. The call works when i construct a string representation of the content of the xml and then, use the "l...more >>

How to make the console hide passwords that are typed in
Posted by ryan.andrus NO[at]SPAM netiq.com at 2/6/2006 1:42:22 PM
Hi, I need to make a command line application that I have written support an option that allows the user to use the /p:* switch to specify that they would like to type a password but have it hidden so that each key stroke generates '*' as its output, hiding the what was typed by the user. If ...more >>

Best book on new changes in 2.0 for the .Net 1.1 veteran
Posted by john conwell at 2/6/2006 1:35:05 PM
I'm a fairly seasoned vet with .net 1.1, and want a hardcore, indepth review of the new changes in 2.0, mostly covering the core namespaces and the System.Windows.Forms namespace. I dont really care about ASP.Net. Most of the books on 2.0 take it from the point of a beginner, which is a wa...more >>

WebBrowser - how to intercept and modify HTTP requests?
Posted by Ondrej Dobias at 2/6/2006 1:32:16 PM
Hello, I would like to intercept WebBrowser's HTTP requests in order to be able to supply custom login to the proxy server, as well as choose the right certificate for several specific sites. I'm trying to use the stock WebBrowser control in .NET v2.0 and have no idea how to extend it with ...more >>

Static Functions in Multi-user web app
Posted by WebMatrix at 2/6/2006 1:26:32 PM
Is there any performance considerations or any other concerns about having a Class with private constructor and all static functions? One particular function in question creates a few new instances of COM objects (through COM Interop), and makes lots of calls to these unmanaged COM objects. ...more >>

C++ and C# in same proj
Posted by Pohihihi at 2/6/2006 12:43:47 PM
Is it possible for a project to have both C++ and C# code? How about solution, can we code half in C++ and half in C#? I am talking managed or unmanaged C++. Basic idea is to convert some project that are in C# into C++ and some = C++ projects to C#. Thank you, Po...more >>

GDI+ and GDI font size inconsistances
Posted by chris.dannemiller NO[at]SPAM gmail.com at 2/6/2006 12:24:15 PM
I have the following code public static IntPtr CreateFont ( Font fnt ) { LOGFONT logFont = new LOGFONT(); logFont.lfFaceName = fnt.Name; logFont.lfHeight = -Win32API.MulDiv((int)fnt.Size, Win32API.GetDeviceCaps(Win32API.GetDC(0), LOGPIXELSY), 72); logFont.lfItalic = (b...more >>

Software deployment Liscensing
Posted by DKode at 2/6/2006 12:23:14 PM
Hello, I have built a couple of Active Directory administration tools that I plan to sell over my website. I was planning on making a "Full" version for people who purchase the software, and a "Demo" version which is a completely seperate assembly that is stripped down so noone can take a dem...more >>

How to use variable in case statement?
Posted by Brett Romero at 2/6/2006 12:00:54 PM
If I want to use: switch (AppName) { case ApplicationName.App1: loadApp1Logo(); break; case ApplicationName.App2: loadApp2Logo(); break; } I'll get a ...more >>

Project estimation metrics?
Posted by Ray Stevens at 2/6/2006 11:36:43 AM
I've been asked to come up with a formula for estimating C# projects. Does anyone know of a good source for this? (website, book, etc.) ...more >>

fixed arrays
Posted by leibnizster at 2/6/2006 11:36:15 AM
Hello I have a c++ unmanaged struct that has as one of its components an array of constant length. To transform it in managed array I have to use something like: public struct blabla { .... fixed public char fixedArray[10]; .... } when I use the struct, it is clear that fixedArra...more >>

Where is the app.exe.config supposed to go?
Posted by Richard Lewis Haggard at 2/6/2006 11:31:05 AM
I have a test application that is calling an assembly that reads some strings out of a config file. Normally, this assembly supports a web application and the information can be read just fine. Then I created a C# test application and ran the function. The function fails because the configur...more >>

Debugging when files are out of sync
Posted by Wayne Sepega at 2/6/2006 11:27:53 AM
I have a file referance for some of our assemblies, if someone else changes the code and I try to debug it I receive the following error: The source file is different from when the module was built. Would you like the debugger to use it anyway? If I choose NO and hit cancel then I get the ...more >>

Raising process exit event
Posted by WRH at 2/6/2006 11:14:56 AM
Hello I used the VS designer to set up Process code as follows... the problem is, although the process is executed, when it is shut down I never get the Exited event. .... private System.Diagnostics.Process process1; .... this.process1 = new System.Diagnostics.Process(); .... // proce...more >>

Convert Text (comma delimited) to Access mdb
Posted by jj at 2/6/2006 10:33:17 AM
I have this comma delimited text file. I want to convert it in one sweep to an access DB (mdb) format. I used the following code but it takes forever to convert. Is there a faster way? string strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strAppPath + "\\mydb.mdb"; OleDbCo...more >>

How to RemoveChild from HtmlElement from C#
Posted by Vin at 2/6/2006 10:10:43 AM
Hi, I have a webbrowser control in my winform. There is an html in the webbrowser which has a table, and many child <tr>s and <td>s inside it. I want to delete a specific <tr> node completely from the html. (I dont want to do style = "display:none"). I want to do RemoveChild("id of the tr") o...more >>

Debugging Unmanaged ActiveX or COM
Posted by jpuopolo at 2/6/2006 10:03:34 AM
All: I have developed an ActiveX control using unmanaged C++ (MFC). I have also developed a C# application to server as a test harness. Both ActiveX and test harness application are built in Debug mode. The VS.NET (2005) project is configured for native debugging. In the debugger, when I tr...more >>

App "Freezes" when getting atom feed
Posted by Brady Love at 2/6/2006 10:00:34 AM
I am currently working an an app that will post and edit blogs on blogger. Right now I have it so I can recive a list of the blogs and the content of those blogs using Atomizer. This is my first program where I am accessing data over the net.When I go to retrieve the list of blogs my program act...more >>

Concatenation - String.Concat
Posted by Mythran at 2/6/2006 9:42:07 AM
Out of curiosity, only, which is recommended for SHORT concatenation...or concatenating two or three strings that are relatively small in size? Dim a As String = "bah" Dim b As String = "bah2" Dim c As String = a & b Dim d As String = String.Concat(a, b) string a = "bah"; string b = "bah...more >>

BITS jobs with a status of suspended can't be restarted.
Posted by UJ at 2/6/2006 9:22:03 AM
I have jobs in my BITS queue that have a status of suspended but when I do a resumejob on them, I get an 'Exception from HRESULT: 0x80200003.' Anybody have any idea why this is happening? TIA - Jeff. ...more >>

Decimal Precision - short code, strange problem
Posted by saarcarmi NO[at]SPAM gmail.com at 2/6/2006 9:09:06 AM
Hi Could anyone help me to understand why in the following code sum1 is different from sum2? Basically it's the same calculation done. Keep in mind the x is 28 digits so it's within the range of decimal. <codesnip> decimal x = (-0.0084682975822291150192357277M); decimal sum1 , sum2; s...more >>

RSS Functionality for monitoring
Posted by DKode at 2/6/2006 8:46:48 AM
Hello, I did a little research over the last couple of days about RSS. I use it widely for updating of news articles and various things like that. It made me wonder if it is practical to use RSS within my company to use it for monitoring. Example: Lets say my app performs a certain tas...more >>

Stream pdf to Response
Posted by DC at 2/6/2006 8:17:21 AM
Hi, I am trying to load a pdf file into a memorystream and upload this file to the browser. However, wenn I run the attached code (the ftpStream is a valid stream of the pdf file) I receive an "Application error" in the Adobe Reader. I tried all the default encodings and the windows encoding ...more >>

Modal App, that will freeze Windows?
Posted by jacquesvdz NO[at]SPAM gmail.com at 2/6/2006 8:10:55 AM
Hi Hope you guys can help me with this? I live in a house with 10 people.In the beginning wehn there were only two people, I gave them my password for the use of my pc. But since I got Internet at my home, everybody thinks its fun to use my pc. I cant change my password, cause I have v...more >>

Serialize Class
Posted by Demetri at 2/6/2006 7:09:19 AM
I have a class that I need to serialize. For example if I had a Person class with the properties of FirstName and LastName. Currently when I serialize the class it looks like this: <?xml version="1.0" encoding="utf-8"?> <Person> <FirstName>John</FirstName> <LastName>Doe</LastName> </Per...more >>

Delpoyment Issue
Posted by Mr. Bean at 2/6/2006 6:23:53 AM
I made a small windows C# application that has dB functionality. The dB I'm using is SQL 2000. It worked very fine. The thing I need is to enable the user to enter the sql server's username and password(many users with different priviledges and functionality) at runtime b4 proceeding with the ap...more >>

Create own compiler
Posted by raja_svks at 2/6/2006 4:12:59 AM
Hi Group, I just want to develop a language of my own. Not a big one.. Just I want to write a line like printme("Hello World"); I want to create a compiler to compile this and convert into MSIL. As per CLS, i think we can know what is the format of MSIL. So, if I say, compileprog.exe m...more >>

Expanding a treeview from a path for any number of levels.
Posted by James L at 2/6/2006 3:29:28 AM
I have finally developed some code that allows you to re populate a tree view and re select the last node that was clicked. However, you have to hard code it for the number of levels the tree view could possibly be expanded to. Any ideas? //The test program has a button to set the path and ...more >>

whats wrong with this?
Posted by blah at 2/6/2006 3:21:18 AM
Hello everyone, Ive been trying to get my application to "click" on a button in another application using SendMessage, Ive gotten this far but Im not sure whats wrong with this code, here is the whole application (its small for testing purposes) and it seems that window wraps the text, at least ...more >>

String manupilation
Posted by Wolf at 2/6/2006 3:13:44 AM
Hi Hope someone can help me, I am trying to pass in a string in part nr 2. The string is defined in nr 1.Somehow it breaks because of the ' The string I'm passing in should be something like: John tester's birthday 1)string reminderString = Contact.Name + " " + horizonContact.Surname + "...more >>

Possably Newbe Question ..
Posted by fizgig at 2/6/2006 2:43:49 AM
Hi all, I've been meaning to ask this for a long time, but my computer has been down more then has been up, but my question is when I bought Microsoft Visual C#.NET Standard 2003 Edition I also seen that it came with the msdn library. Does the msdn license with the C# or separate? ...more >>

The abovementioned code
Posted by Alvaro Enríquez de Luna at 2/6/2006 2:37:23 AM
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using Microsoft.Ink; namespace DumbPictureBox { public class Form1 : System.Windows.Forms.Form { private Microsoft.Ink.InkPicture myInkPicture; ...more >>

Inserting rich text into an MS Access memo field.
Posted by ProDevel at 2/6/2006 2:30:10 AM
Hi, I'm desperately trying to figure out how to take rich-formatted text from a rich text box and store it in a memo field (or any other type of field!) in an Access database. Can anyone help?? Cheers :) -- Regards, Ben Foster, ProDevel....more >>

(Me || Compiler) == Stupid
Posted by Steven Nagy at 2/6/2006 1:40:39 AM
private void Test(short i, short j) { short k = i + j; } What the hell is wrong with this code? "Can not implicitly convert type int to short" is the compile error. ASP.NET 1.1 C# Thanks ...more >>

Clearing selection in InkPicture
Posted by Alvaro Enríquez de Luna at 2/6/2006 1:15:26 AM
Hello everybody, I have a simple form where I have added an 'inkpicture' and 2 buttons. One of them changes the inkpicture.editing mode to 'select' and the other one does the same with 'ink' mode. The problem is that when i select a stroke in 'select mode' and then change the inkpicture mode ...more >>

C struct to C# mapping
Posted by Tor Aadnevik at 2/6/2006 12:00:00 AM
Hi, I'm trying to call a win32 function using pinvoke and C# .Net. The function takes a struct reference as a parameter (lpInfo), but on return the struct is not filled with data, and I'm suspecting that I have made a mistake mapping up the struct. DBSTAT DBenum ( XInt32 hDBase, ...more >>

C# newbie question re: communicating 'between forms' (no flames pls)
Posted by bob at 2/6/2006 12:00:00 AM
I'm very new to C# (excuses out of way) I have a somewhat ambitious if not real world app in mind. Essentially my windows form runs a timer and every n ticks I read from 1 DB update some values on the screen and then do a DB write. ( nothing hard here an app that polls ) however I want ...more >>

CSharp namespace chart
Posted by larry at 2/6/2006 12:00:00 AM
Hi, how can I find the CSharp namespace chart on MSDN? I am a VC programmer. VC++ has MFC chart, like the top one is CObject, then.... CSharp got something like that? ...more >>

installing windows service
Posted by Ankit Aneja at 2/6/2006 12:00:00 AM
I am able to make a windows service in C#.NET and also tested it on my own system by installing it this way(installutil servicename.exe) and is running fine now when I want to test it on other system which files do i need to copy or how can I make a project installer which can install it on ot...more >>

System.Object.ReferenceEquals method
Posted by Kiran A K at 2/6/2006 12:00:00 AM
hi, consider the following piece of code: string s1 = "kiran"; string s3 = s1.Clone() as string; Console.WriteLine(System.Object.ReferenceEquals(s1, s3)); The above piece of code gave me true while i was expecting false. s3 is a clone of s1. so s1 and s3 should be separate objects righ...more >>

C5 generic collection library for C# and CLI
Posted by Peter Sestoft at 2/6/2006 12:00:00 AM
We have just released C5, a library of generic collection classes for C# and other CLI languages, as found in Microsoft .Net version 2.0. C5 provides functionality and data structures not provided by the standard .Net System.Collections.Generic namespace, such as persistent tree data structure...more >>

Databinding DropDownList and Label
Posted by Paul Aspinall at 2/6/2006 12:00:00 AM
Hi I'm using a FormView control. In my EditTemplate, I have bound to a DropDownList. This works fine, by having the key in my primary table, which is looked up via the binding to my DDL using the DataSourceID etc.. However, I want to have the value that is in the drop down list to be show...more >>

C++ to C# type mapping....
Posted by SpotNet at 2/6/2006 12:00:00 AM
Hello NewsGroup, Does anyone know where I can find a table of some sort which shows a mapping from C++ types to C# type equivelents? This would be most helpful for API functions, structs, enums, constants,...etc. Learning and figuring this out the hard way is good but sometimes suicidal. ...more >>

appropriate collection class
Posted by Kiran A K at 2/6/2006 12:00:00 AM
hi, suppose in my application i need to perform a lot of insertions and deletions on my data structure. the ideal data structure in this scenario would be a linked list. unlike java, c# does not have a built-in "LinkedList" class. so which collection class should i use in C#? regards, kira...more >>


DevelopmentNow Blog