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 2005 > threads for monday february 21

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

Problems with Kernel32 ReadFile!
Posted by Chua Wen Ching at 2/21/2005 11:55:01 PM
Hi, I have doubts. From p/invoke and most site, they recommend to use this. Example1: [DllImport("kernel32.dll")] static extern bool ReadFile(IntPtr hFile, byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead, IntPtr lpOverlapped); But I only want to read 1 ...more >>

Formatting Now
Posted by reidarT at 2/21/2005 11:47:33 PM
I use this in a label DateTime d1 = DateTime.Now; this.lblTime.Text = d1.ToString(); but I get the date and time in this format 21.02.2002 23:45:00 I only want 23:45 regards reidarT ...more >>

webclient downloads
Posted by justinpatterson NO[at]SPAM gmail.com at 2/21/2005 10:15:25 PM
i am using a webclient to download a list of wavs and mp3s from a web site but it is very slow. From my browser i can download it in about 15-30secs.In the program it can take up to 3 or 4 minutes. Is there more overhead with webclient is is there something else slowing down? I tried to watch th...more >>

Use of language files
Posted by reidarT at 2/21/2005 9:27:28 PM
Is there an easy explanation on how to use resource-file or different languages on labels, buttons and so on? regards reidarT ...more >>

Basic serialization question.
Posted by BFlaherty_2003 NO[at]SPAM yahoo.com at 2/21/2005 9:15:23 PM
I have a basic serialization app. I am able to serialize my struct with varying level of success. The problem that I am seeing is that when any of the values in my class (see below) are not assigned values, there is no XML generated for this field. For example, if I only assign a value to Num...more >>

WindowsIdentity.Impersonate() vs ImpersonateLoggedOnUser()
Posted by BLiTZWiNG at 2/21/2005 8:51:01 PM
After playing with the code shown and utilising Willy Denyottes' help, I have come to the conclusion that there is some form of difference between the managed WindowsIdentity.Impersonate() over the unmanaged ImpersonateLoggedOnUser(). Below is my code showing a file copy to a remote compute...more >>

A timer that do not work.
Posted by MA at 2/21/2005 7:19:54 PM
Hi all! I have a webservice that checks for mail every x seconds with a timer. I had it set up on a win xp computer and it was working fine. When I recently moved my webservice to a win 2003 server, it seems like the timer stops working after a while. I have no idea why. How can it just ...more >>

Best start on coding C# .net
Posted by Kasper at 2/21/2005 7:02:47 PM
Hey dudes and dudies .. Im pretty new in this area. So I was wondering if anybody know a site on the internet that can give me a good start on coding C#.net ? Regards Kasper ...more >>



Create contrasting Color
Posted by Joe at 2/21/2005 6:05:21 PM
I don't know if contrasting is really the right word but here's what I mean. Take a normal Listbox (or similar) when the test is selected the text turns blue. If the background is blue the text turns white. This happens in different combinations of forecolor - backcolor combinations. How can...more >>

Overriding methods on an interface
Posted by byoukstetter NO[at]SPAM hotmail.com at 2/21/2005 6:02:59 PM
So, I have an interface with several overriding methods: using System; using System.Collections.Specialized; namespace some.name.space { public interface IVrsPersistenceProvider { string[] Select(string idName, string tableName, string whereClause); string[] Select(string idName, str...more >>

Newbie question about persisting data
Posted by RonL at 2/21/2005 6:00:45 PM
I have a Windows App with a class that reads configuration data from an XML file and then makes the data available to other classes via properties. My question is how do I read the XML file only once and make the properties persist each subsequent time the class is instantiated? Static variabl...more >>

SqlServer ??C#
Posted by perspolis at 2/21/2005 5:41:47 PM
I used SqlSerlver as a database in my c# program. I made a connection string ot connect to my database. I want to use authentication and login name. If in connection string wizard I use Windows Authentication ,I can connect to it, but if i want to use sql server login I can't :(. with predefine...more >>

Need some infor about.. MCSD
Posted by Naveen Mukkelli at 2/21/2005 5:05:01 PM
Hi, I would like to prepare for MCSD exams from home. Could you please suggest me the best books, methods and any other tips for self preparation. Cheers, Naveen....more >>

Marshalling strings as fixed length WITHOUT null terminator.
Posted by Tajmiester at 2/21/2005 4:26:28 PM
Hi, And thanks for any help. I am having trouble declaring a struct containing strings that can be Serialized using the following functions. It works, but the strings wont store the right number of characters, they store one less with a null at the end! Whats the point in a marshalling as f...more >>

c# calendar
Posted by Tom Riddle at 2/21/2005 2:51:42 PM
hi I need to create a custom calendar control.., does someone know of any code example on the net which I can use does the .net framework has the necessary classes to implement the same thanks in advance Tom ...more >>

BinaryReader got Exception error
Posted by Yuki at 2/21/2005 2:49:03 PM
I tried to open a binary file use BinaryReader. BinaryReader binReader = new BinaryReader(File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.Read)); This file is open by another process at the same time. An exception is generated said "This file is being used by another process"...more >>

Is there a way to change the font or color of a DataGrid single li
Posted by Raul M. Colon at 2/21/2005 2:35:03 PM
In my web application the user need a visual indication when an item of a DataGrid meets some condition. Is there a way to change the font or the forecolor of the text of DataGrid lines that meet some condition? (Something like the Conditional Formatting of Excel) Thanks! Raul...more >>

Find Today? Date Using Code
Posted by Tim Whelan via DotNetMonster.com at 2/21/2005 2:11:22 PM
Hi, I?m programming a web app using c# and asp.net and I am trying to display a list of performances that are scheduled in the next month, in a listbox. So I need to get today?s date in my code and compare it to the dates of all the concerts and display the appropriate ones. My main problem is g...more >>

Off Topic
Posted by Abhishek at 2/21/2005 2:06:51 PM
Hi! This is a bit offtopic. I am trying to create an autorun.inf file for my CD I can create and execute properly when i am creating it for the file kept on the root. but when i point it to a file in the subfolder it gives me an error. How can I achieve the following 2 scenarios. 1) I want to...more >>

Arrays and dataset
Posted by Trond at 2/21/2005 1:33:07 PM
I have a webservice that is returning a dataset. In dataset there is a table with 4 columns. (LDate, LTime, LDepth and ServiceNumber) I then try to read only 2 of the columns into array (double[][] valuesArray;) but i cant get it to work. It is LDepth and ServiceNumber. Both columns has numbers ...more >>

Format for File Name
Posted by Jim Heavey at 2/21/2005 1:17:04 PM
I want to place the location of a file that I am going to read into my config file, but I can not remember the proper format for "share name, folder name". I thought I would specify something like "file///MyShareName/MyFolderName" but it does not like this format and a couple other variati...more >>

Database design question?
Posted by perspolis at 2/21/2005 1:09:54 PM
hi everyone In my accounting database ,there are several account like Persons,Banks,.... I design them in separated table. in your opinion ,it's better to have all in one table or separated table?? thx in advance ...more >>

MSMQ Question - Please Help
Posted by T :-) at 2/21/2005 12:59:18 PM
Hi, how can i enable / disable MSMQ triggers from code ? Thanks. ...more >>

¿¿help in column expression :((
Posted by perspolis at 2/21/2005 12:52:21 PM
hi everyone I have a table in Sql that have 2 columns name qunatity and Unitprice; In my application I create an additional column name Total and set it's ColumnExpression just to show quantity*UnitPrice and in sqlDataAdoptor's commands I just update the first 2columns(mean quantity and UnitPri...more >>

data in grid
Posted by Hrvoje Voda at 2/21/2005 12:29:55 PM
I'm reading information from store procedure and I would like to put the result in dataGrid. In all examples and books about working with store procedures is the example only with console. I'm using windows form. My code: void SearchSastojci(string sastojci) { SqlConnection conn = nu...more >>

WebBrowser Scrollbar Document Positioning
Posted by Freddie at 2/21/2005 12:09:01 PM
I am using the AxWebBrowser component in my C# .NET application and am navigating to an outside .HTML file periodically. Whenever I refresh the WebBrowser with the updated HTML file by using Navigate method, it displays it from the top. How do I automatically scroll the view down to the last...more >>

Do you validate incoming parameters?
Posted by Julia at 2/21/2005 11:51:41 AM
Hi, When writing class library do you validate ALL incoming parameters? Is this a good approach,to valid them ALL!!!,and throw exceptions? I realize that if I am not validating them,than my logged exceptions ,raised from objects or calsses which uses them,are some what more hard to disse...more >>

HELP!!! - Move a print job from one printer to another
Posted by Mike Kline at 2/21/2005 11:25:53 AM
Hi There! How can I move a print job that is in a queue of a printer to another identical printer? Thank you all in advance!!! MK ...more >>

DataTable weirdness
Posted by Stephan Steiner at 2/21/2005 11:21:22 AM
Hi I have written a .NET service that uses two DataTables to store runtime data. One column in one table is periodically updated (every 10 seconds, and upon user request), another is updated upon user action. The code works fine most of the time. I've had it running on a W2K server for over...more >>

Memory Leaks
Posted by Bhargavan at 2/21/2005 10:52:15 AM
Hi group, I have created a User control and whenever I use that usercontrol in a form, there is a memory leak. When I open and close the form, the form along with my user control is not disposed. It does execute the dispose methods in my form and in my usercontrol. I am sure there is somethin...more >>

How to realize a palette
Posted by Just Me at 2/21/2005 10:41:25 AM
I asked this in the VB NG and didn't get a response. I think this NG is no apt to know this kind of thing so I'm trying here. Trying to display the palette that is on the clipboard. I get a palette from the clipboard and I want to make the picturebox display it and realize it as its palett...more >>

Process.Start() in windows service on Windows Server 2003, problem
Posted by Tobias Johansson at 2/21/2005 10:18:23 AM
Hello, I'm having what I believe a security problem to execute an executable file from a windows service in windows server 2003. It works fine in WIN XP SP2 The program(the service) itself just continues as if nothing where wrong after process.Start is executed and I get an Exit code fro...more >>

How to handle File Pointers (*File) from C++ dll?
Posted by Wes at 2/21/2005 10:17:06 AM
Hello, I am writing a class in C# that uses [DllImport("dllname.dll")] to call functions from a C++ dll. Evenything seems to work fine call the functions except one of the functions takes a *File as a parameter. Many of the functions also used char* and int* and I used string and IntPtr...more >>

How to catch a failing thread.
Posted by Frank Rizzo at 2/21/2005 9:38:34 AM
Hello, I have a bunch of thread in my app doing variuos things. One of them is failing at some point in the app and I can't (actually don't know how) figure out which one it is. Is there a way to set a application wide exception handler that would catch exceptions from other threads? Is t...more >>

convert to utf
Posted by Albert Jan at 2/21/2005 9:34:20 AM
Hi, I have text from mime email messages with different encoding that I want to convert to utf-8, but I'm relatively new on encoding problems. I use the following code, but this doesn't seem to work (the in and output remains the same): string x=toUTF8("=?GB2312?B?s8q5q8u+vq3A7aGissbO8bK...more >>

Get Inheriting types
Posted by Jeremy at 2/21/2005 9:27:23 AM
Hi Guys, How do I get all the inheriting types of a specific type I guess I can get this using reflection... Could someone pls point me to an example or resource thanks ...more >>

"new" on value types
Posted by Jamie Julius at 2/21/2005 9:16:28 AM
Consider the following struct: struct TestStruct { public int a, b, c; public TestStruct(int a, int b, int c) { this.a = a; if (b == 6) { throw new ArgumentException("I don't like 6", "b"); } this.b = b; this...more >>

Need Custom Calendar Control for ASP.NET (C#)
Posted by charliewest at 2/21/2005 9:09:07 AM
Can someone recommend a fairly easy to use ASP.NET custom calendar control that makes it easy for the user to select the month and year - versus the inherent "paging" that is used in the default Web Control? For example, when i need to select the DOB (April 4, 1970), i need to page "left" ...more >>

Cannot create WebApp ??
Posted by () at 2/21/2005 8:35:03 AM
Hi, I get following error when creating an ASP.NET project : named "http://localhost/WebApplication1" --> ERROR : "URL:'http://localhost/WebApplication1', 'HTTP/1.0 503 Service Unavailable" No error though when I create like this : http://127.0.0.1/WebApplication1 I checked the fil...more >>

Timer Bug.
Posted by theinvisibleGhost at 2/21/2005 7:57:55 AM
I think I've found a bug in the timer control. I've got a class which uses a timer control. It imports it from System.Windows.Forms This timer ticks once a second, and then updates a label which represents a clock on a form, to which the original class has a reference. (MVC style) If the...more >>

I have a .dll that is c++ (not .net) with an #include file (...h).
Posted by trint at 2/21/2005 7:37:46 AM
how can I make it work with my c# .net app? or is it possible? I really need this one from Microsoft, it is bidispl.dll and bidispl.h. Thanks, Trint ...more >>

Error while using COM component
Posted by Reshma Prabhu at 2/21/2005 4:49:10 AM
Hello, I am using a COM component in an ASP.Net application. I have properly registered it. But at some instances it throws follwoing exception: [COMException (0x80010012): The callee (server [not server application]) is not available and disappeared; all connections are invalid...more >>

C++ or C#
Posted by John Salerno at 2/21/2005 3:25:12 AM
Hi all. I'm interested in learning a little programming, mainly as a hobby, and I was wondering which of these two languages you would recommend. I know C++ is the most popular, but I've heard that C# might become the most popular in the next couple of years. I'm wondering if C# is good enou...more >>

Reducing Code
Posted by jez123456 at 2/21/2005 3:05:02 AM
Hi, I have the following method which contains some repeated code. Could this be reduced somehow? Thanks. private void chooseDatabase() { string dbFile = GetPath(); string systemDB = GetSystemDB(); try { if (File.Exists(systemDB)) { string UserID = GetUser(); string Pwd = GetPwd(); pr...more >>

appending rows to datatable
Posted by shankar at 2/21/2005 2:15:04 AM
Hi all, This is the way to append the rows from one datatable into another with the same schema. Here Temp and Temp1 are the datatables For Each rows As DataRow In tempTable.Rows Temp1 .NewRow() Temp1 .ImportRow(rows) Next -Vignesh.S...more >>

RE: Globalization.Calendar
Posted by Islam Elkhayat at 2/21/2005 1:47:02 AM
I know how to load Cultures & resources but I'm still unable to load my custom calender Cultureinfo ci= new Culureinfo("ar-EG"); Thread.CurrentThread.CurrentCulture = ci; ci.DateTimeinfo.Calender = new myproj.MyCal(); i get an error say that my calender is not correct for the specified cult...more >>

use WSE verify webservice connection
Posted by David at 2/21/2005 12:38:10 AM
Hi, I have a problem. How should I use WSE (I install 2.0) to verify outside-user connect my web service (e.g. username & password)? Somebody would give me simple sample? Thanks, David. ...more >>


DevelopmentNow Blog