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# > november 2006 > threads for thursday november 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

Q: Array question.
Posted by Martin Arvidsson at 11/2/2006 11:10:12 PM
Hi all you gurus! Whats the biggest difference between using a string[] x; or an ArrayList x; When to use wich? Regards Martin ...more >>


what property or method should I use in combo box to
Posted by Amanda at 11/2/2006 10:53:54 PM
User is going to be transferring items out of combobox to listbox and vice versa keeping ascending and desending order respectively at all time. If user selects the last item in combobox, the program is supposed to display a message box stating that there is no more item in the combobox with...more >>

Oracle Stored Procedures with Enterprise Library June 2005 Version
Posted by ssp at 11/2/2006 9:55:17 PM
Hello there, I am trying to do very simple thing in trying to return results from an Oracle (10g) Stored Procedure using the Enterprise Library June 2005 Version. The stored procedure first: ============================================ CREATE OR REPLACE PROCEDURE AGENCYSELECTALL(p_cursor O...more >>

CloneMenu
Posted by Lev Elbert at 11/2/2006 9:45:58 PM
Hi, all! Right to the topic: In the main menu of the form I have View->Image-> and then 4 submenu items (let's call them original submenu). I want the same submenu as a Context menu. To do this I use such construct: foreach (MenuItem mi in this.menuImage.MenuItems) { mi.Enabled = im...more >>

GraphicsPath.IsVisible(): Unexpected Results
Posted by Martijn Mulder at 11/2/2006 8:50:39 PM
/* GraphicsPath.IsVisible() gives unexpected results. I fill a System.Drawing.Drawing2D.GraphicsPath-object with PointF-structures that define the unit-square (0,0), (1,0), (1,1) and (0,1). Then I test 3 different PointF-structures to see if they fall inside the unit- square and the result...more >>

Assemblies in dedicated bin directory for application
Posted by Anders Borum at 11/2/2006 7:36:47 PM
Hello! I guess this is a silly question, but I've asked google with no luck .. so here goes: Is it possible to place the assemblies associated with a .NET client (i.e. winform / console) application in a dedicated "bin" directory as is the case with ASP.NET applications? Although I ha...more >>

ArrayList.AddRange()
Posted by Ant at 11/2/2006 7:27:01 PM
Hi, I was wondering why it is that when adding a collection of controls to an array list, you must use AddRange, instead of Add. Thanks in advance for any ideas Ant...more >>

How can I locate and fix the random errors with my .vshost.exe fil
Posted by Pucca at 11/2/2006 7:21:02 PM
I'm getting the follow error message randomly and then my application crashes. How can I locate the bug code and how can I fix this? Managed Debugging Assistant 'DisconnectedContext' has detected a problem in 'C:\Projects\UnityAdmin\bin\Release\UnityAdmin.vshost.exe'. Additional Informati...more >>



How can I mimic a container to run multiple copies of my C# applic
Posted by Pucca at 11/2/2006 6:57:01 PM
Hi, I have created an application that displays various information about Active Directory objects. Is there a control or a way to mimic the "Windows" command on the Active Directory's Users and Computers MMC Snap-in, where user can select to create a new window inside of the snap-in. This...more >>

Datagridview doesn't display context menu?
Posted by Brett Romero at 11/2/2006 5:04:01 PM
I have a simple test app with one form, one datagridview, and a contextmenustrip. I've assigned the menustrip to the datagridview and given the grid one column. There isn't any data in the grid. I never see the context menu appear when I right click the grid. Any suggestions? Thanks, Bre...more >>

move from Java to C#
Posted by razor at 11/2/2006 4:52:38 PM
Is it simple or difficult? I have a chance to start coding business applications in C# (and totally move from Java to C# (and other MS technologies) I've 4 years experience in Java (J2SE, J2EE, JSP/Servlets) -- razor...more >>

storing credentials for a windows service
Posted by Christof Nordiek at 11/2/2006 4:09:47 PM
I'm writing a windows service wich shall be able to access certain resources (files etc). So accessrights will have to be configurable by a local administrator. One option is to use the account under wich the service runs wich can be set while installation or in the services window. Anot...more >>

Forms and resolution independent display
Posted by eljainc at 11/2/2006 3:28:43 PM
Hello, I have developed a simple c# .NET program in VS2005. It runs fine on one PC. However, on another PC, the form displays too small. It does not stretch to fill the screen and resize proportionately. Is there a library available to do this or how can I do this in code so that the form w...more >>

Testing data type
Posted by AAJ at 11/2/2006 3:04:57 PM
Hi has anyone come across a function to check if a particular string can be safely converted to a datatype i.e. i would like to check things like TypeCheck("1/1/2006",datetime) -> returns true TypeCheck("fred",datetime) -> returns false Typecheck("100"),int32) -> returns true Typ...more >>

How to avoid ContextSwitchDeadlock when debugging
Posted by Waldy at 11/2/2006 2:43:28 PM
Hi there, every time I try stepping through C# projects in VS 2005, I am plagued by the ContextSwitchDeadlock error messages. Is there any way of avoiding this? ...more >>

Socket packages
Posted by Ole at 11/2/2006 2:34:40 PM
Hi, Is there a way to prevent Socket from assembling the packages it receives? short explanation: I have an application A that sends like this: for (i0; i<4; i++) { MySendSocket.send(sendBuffer, count, SocketFlags.None); } ....and a receiving application that receives like this: wh...more >>

goto case null
Posted by Clive Dixon at 11/2/2006 2:19:56 PM
If C# (VS 2003) allows switch on null, why does it not allow "goto case null": switch (someString) { case "BlahBlahBlah": break; case null: break; default: goto case null; } Compiler error: "No such label 'case 0:' within the scope of the goto statement" Is this an...more >>

How can I safely turn this into threaded code?
Posted by Jamie Risk at 11/2/2006 2:11:12 PM
I'm attempting to improve some serially executing code (that uses the SerialPort class) bogging Windows down when it runs. To do the 'antibogging' I'm following the example from MSDN Windows.IO.Ports.SerialPort page and use threading. I'm not sure if I'm creating problems with this implemen...more >>

why am I getting squiggly blue?
Posted by Amanda at 11/2/2006 1:34:26 PM
On .Friday and .Saturady and .Sunday in thie followign if statement (The code is form deitel book; I am writing the same code on my own) if ( dropOffDate.DayOfWeek == DayOfWeek.Friday || dropOffDate.DayOfWeek == DayOfWeek.Saturday || dropOffDate.DayOfWeek == DayOfWeek.Sunday) ...more >>

is Keyword Question
Posted by jm at 11/2/2006 1:22:27 PM
>From MSDN: http://windowssdk.msdn.microsoft.com/en-us/library/scekt9xw.aspx C# Language Reference is (C# Reference) Checks if an object is compatible with a given type. For example, it can be determined if an object is compatible with the string type like this: if (obj is string) { ...more >>

IP Header Checksum Bad
Posted by rdherric NO[at]SPAM gmail.com at 11/2/2006 12:54:10 PM
Hello -- I have code that sends an SNMP packet using the Socket.SendTo method. When we sniff the packets using Ethereal, the UDP header checksum appears to be all right, but the IP header checksum is 0x0000. This results in my SNMP packets being rejected at the server. Does anybody know an...more >>

Error Creating Window Handle
Posted by Pucca at 11/2/2006 12:47:01 PM
I'm gettting this error at "Application.Run" in the code below. The error message also says "Out of Memory". How can I find out more about what's causing this error? It just breaks there with no further information. static void Main() { Application.EnableVisua...more >>

Scrollbar mystery
Posted by MrNobody at 11/2/2006 12:31:03 PM
I have a mystery where my scrollbar behaves differently from when I use it's slider/arrow keys compared to when I manipulate it's value with a onMouseWheel event... When I manipulate my scrollbar's controls (the slider or the arrow key) to go to the bottom, Once it reaches the bottom and c...more >>

How to create a loop in a Windows NT Service
Posted by Todd Jaspers at 11/2/2006 12:08:02 PM
Hey guys, I've written several NT services before using Delphi. When I did, I would typically use the timer component and have a particular procedure run every, say... 30 minutes. What would the code (in C#) look like in order to create a loop under the Service1 procedure that would ru...more >>

Managed way to log out?
Posted by Frank Rizzo at 11/2/2006 12:05:38 PM
Is there a managed way to code a logout? I have it currently using ExitWindowsEx winapi, but I'd like to switch to managed. Thanks...more >>

Detecting keystrokes
Posted by Frank Rizzo at 11/2/2006 11:24:56 AM
I'd like to detect a condition when a user presses a predefined keyboard combination. For instance, left shift + right control + 5 on the number pad. I've tried the KeyDown event on the form. But I can't determine which shift (or control) key was pressed (right or left). I've tried e.K...more >>

newbie question: generic collections cast
Posted by carry at 11/2/2006 11:23:02 AM
I'm passing instance of List<DrawNode> to my method AddRange(IEnumerable<DrawObject> objects) But I got this error: Argument '1': cannot convert from 'System.Collections.Generic.List<MyNamespace.DrawNode>' to 'System.Collections.Generic.IEnumerable<MyNamespace.DrawObject>' I don't under...more >>

MD5 Problem
Posted by Chris Newald at 11/2/2006 11:15:36 AM
Hello there, Not sure if I'm in the right newsgroup but here it is anyway... I store web passwords by encrypting them using a simple MD5 .dll I wrote a little while ago using C#. User passwords are stored as binary data in the database. When a user enters his/her password the newly entered...more >>

Question about resource files
Posted by Jason at 11/2/2006 10:37:59 AM
Greetings , I'm studying for a MS exam and I'm a little confused about assemblies. Not what they are but just a specific comment that I'm reading and it doesn't make sense to me. It reads "Assembly resource files are preferred for use with localized data that is not tied directly to the ...more >>

accessing remote documents
Posted by offa23 NO[at]SPAM hotmail.com at 11/2/2006 10:36:06 AM
hi all ive got a winform that displays a list of word documents that are stored on a remote server. when he clicks an item on the list, the requested document should open (as a read only) so he can view it. to access the remote documents i had to create a web service (for securiry issues) and ...more >>

Why can only call SwitchDesktop once (calling again throw error)?
Posted by John Smith at 11/2/2006 10:26:06 AM
I have a DLL that checks to see if a user has locked their desktop. The code is below. When i use this code a command-line, everything works perfectly every time. I can lock the desktop and it returns "true" every time. However, when I install it as an NT service, it works the first time and the...more >>

Problem with Development
Posted by Lucas Davenport at 11/2/2006 10:24:01 AM
We have an application developed originally by a third party developer (who is out of the picture now). The application is a combination of several projects, a web service, and a web site application. The application was written in VS2003 and C#. Upon receipt of the application, I converted...more >>

form id, this.Controls ... ?
Posted by Arman Sahakyan at 11/2/2006 9:45:01 AM
Hi, While writing code for creating aspx controls dynamically, I noticed some strange (at least to me) behavior. Look at this code; // FreeQuery : System.Web.UI.Page // void cmdDo_Click(...) GridView grid = new GridView(); grid.DataSource = source; this.Controls.Add(grid); // HERE ...more >>

Databinding to Array of objects
Posted by david.kao NO[at]SPAM opco.com at 11/2/2006 9:15:01 AM
Hi All: I have array of objects that binds to a list box control on win form. My problem is I do not want to display every object in the array on the list box. Is there an event or function occurs in the data-binding object, which allows me to control actual items that display on the screen. ...more >>

Creating a new font via tranformation
Posted by k at 11/2/2006 9:14:28 AM
Hi, I'm trying to migrate from Java to C# and have encountered a problem. I can't seem to find a way to create (ultra)condensed fonts for later use in a program. In Java I had a really nice method some_font.deriveFont(AffineTransform), which would return a new font. (AffineTransform was jus...more >>

Any benefit for fixed size hashtable?
Posted by chrisben at 11/2/2006 9:03:02 AM
Hi, If I am not sure how many items will be in my Hashtable/ArrayList dynamically (multiple threads can add/remove/check the item), however, I can estimate the total number will not exceed 60000. How much can I gain in term of performance if I decalre the hash as Hashtable h = new Hashta...more >>

ImageList issues...
Posted by stumorgan NO[at]SPAM gmail.com at 11/2/2006 8:34:43 AM
I'm trying to make a configuration menu similar to the one in the Firefox options screen, with an icon-based toolbar at the top. I'm using the ToolBar object which gets the icons from an ImageList. However, the PNG files that I am putting in the ImageList look all crappy compared to the origina...more >>

Visual studio debug question!
Posted by DBC User at 11/2/2006 8:04:06 AM
I am using VS2005 c# project. While debugging my program, (pressing F10) after a while the debug disappears(the yellow line is gone). Does anyone know what causes this to happen? It is not happening in a same line, it is happening in a one method but arbitary lines. Any ideas/suggestions? T...more >>

Custom Active Desktop Application
Posted by Olie at 11/2/2006 7:46:21 AM
I need to create a application that acts as an Active Windows Desktop. I can currently get a form with controls to behave like the desktop and I use API functions (SetPosition()) to force it to always be on the bottom. The problem is that the code to force it to be on the bottom does not always ...more >>

Creating IndexOf in a custom collection
Posted by Dale at 11/2/2006 7:42:02 AM
I have a design question. I am creating a custom collection of products. The unique key for the products is productId which is an integer. By default, IndexOf(object obj), when obj is an int, would return the value of obj because it returns the index of the item at position obj. Though...more >>

.Net Listview Woes
Posted by Michael.Suarez NO[at]SPAM gmail.com at 11/2/2006 7:26:32 AM
Is it me, or does it seem like they put no effort into creating the listview control in .Net. >From what i can see, it is actually LESS powerful than the vb6 listview. A few gripes I have with .Net listview that aren't present in vb6: -Inability to set tooltiptext of subitems (without the...more >>

IStream.Read Memory Leak?
Posted by KWienhold at 11/2/2006 6:55:12 AM
I'm currently writing an application (using Visual Studio 2003 SP1 and C#) that stores files and additional information in a single compound file using IStorage/IStream. Since files in a compound file aren't really useful to a user, I use the IStream::Read function together with a StreamWriter t...more >>

Sockets Question
Posted by John F at 11/2/2006 6:52:02 AM
Hello All, My question is about the proper way to setup a listening socket. I have the following code that works fine: IPAddress localAddr = Dns.GetHostEntry(strHostName).AddressList[0]; Int32 port = 25001; TcpListener tcpServerListener = new TcpListene...more >>

Very large dataset
Posted by eladla at 11/2/2006 6:18:02 AM
Hi! I am currentlly working on a project where I need to query the database and this query returns around 1M rows that I then need to process. I`m currently holding it all in a datatable, but I have a feeling that this type is very unefficient. Does anyone have an idea of a more efficient way...more >>

XmlSerializer Empty Element - NULL value
Posted by kumar.senthil NO[at]SPAM gmail.com at 11/2/2006 6:12:47 AM
Hi, I'm using XmlSerializer to create an object from the XML string. I would like to know whether I can get a null value for an empty XML element. Actually the XmlSerializer assigns "" (empty string) for a string if the corresponding element is missing in the XML. Input XML: <DemoClass><...more >>

Windows Service not getting installed
Posted by rohan_from_mars at 11/2/2006 4:25:17 AM
I have a Windows Service Application having 2 windows service classes. In the first one I have this stmt: ServicesToRun = new System.ServiceProcess.ServiceBase[] { new RequestProcessorService(), new EmailSenderService()}; System.ServiceProcess.ServiceBase.Run(ServicesToRun); inside the ma...more >>

file rename woes - want atomic operation...
Posted by spacehopper_man NO[at]SPAM yahoo.com at 11/2/2006 4:13:48 AM
no "rename" operation in C# !!! - this has been covered in this group before, but I can't find any good answers. what I am trying to do is refresh the content in a file with minimum performance impact on any read operations to that file - a common task right.... in the unix world the way...more >>

Meaning of lang-codepage
Posted by gopal at 11/2/2006 3:14:43 AM
Hi, Please can anyone tell what is lang-codepage peovided in VerQueryValue method when one is trying get the FileVersionInfo for a particular file - say DLL. I need a simple definition of what is "lang-codepage"? Thanks JP ...more >>

Share your bookmarks - XSD to a Windows Form
Posted by Jeroen at 11/2/2006 1:47:12 AM
Does anyone have a good starting point or bookmark for creating a windows form that allows inputting a xml according to a known schema? PS. For now, I'm still with Studio 2003. I have found the XSD.EXE, is that perhaps what I need? ...more >>

UDP Connection
Posted by Rain at 11/2/2006 1:44:02 AM
Hi, I need help on this one. Any help would be appreciated. Im doing a UDP client - server connection. I want a client with only one instance of the UDP and binds the port to do both sending and listing. And have a server with 2 instances one for sending and one for listening whic...more >>

How to get emails into database from outlook using C#.net
Posted by Amit at 11/2/2006 1:43:01 AM
I want to get the mails etc. from applications like Outlook,BullHorn in Database of SQL server or Oracle using C#.net .Can any one help me in this matter?...more >>

Empty XmlElements creating new line
Posted by Zief at 11/2/2006 1:41:54 AM
Hi, I am having a strange problem that is probably very easy to correct. This is using the Compact Framework for Windows Mobile if that makes any difference. I am changing some text of an XmlNode that has some data, to "". The original line in the file looks like: <Movement_Date>26/10/2006...more >>

Error handling in .Net Remoting
Posted by suhas at 11/2/2006 1:08:25 AM
Hi We have .net remoting applications (using .net framework 1.1) I want to implement error handling in much better way to conclude about the problem/failure occurred. What are the standard or Microsoft recommendations when communication fails due to several reasons like Server or Client ...more >>

NUnit Test result directory
Posted by Udi at 11/2/2006 12:44:36 AM
Hi, I need to copy several files as a post build step of the Test project, to the 'Out' directory of a running test. (The current directory of a running test) Is there any simple way of knowing in the build process what will be the output directory? Thanks ...more >>

Determining owner of lock
Posted by Adam Benson at 11/2/2006 12:00:00 AM
Hi, An app deadlocked and I took a full process dump of it using cdb. I can see no end of threads backed waiting for a lock on an object but no thread seems to own the lock - they all seem to be stuck on the lock(me) statement. Using Wnddbg or cdb is there any way to dig down and discover ...more >>

Simple cryptography
Posted by Peter Hartlén at 11/2/2006 12:00:00 AM
Hi! Could someone please point me out in the right direction here. I have a 32 character long hex-number, and a 11 digit long "key" and want to create a one-way hash number of a not to extensive length (4 digits would be perfect). Is this doable, and where should I start looking (names ...more >>

Word Bookmark
Posted by Alan T at 11/2/2006 12:00:00 AM
How do I make use of the Bookmarks property so that I can write a text at/below the position of a particular bookmark or the first bookmark ? private Microsoft.Office.Interop.Word.Document myWordDoc = new Document(); myWordDoc.Bookmarks ...more >>

Resources
Posted by Kimmo Laine at 11/2/2006 12:00:00 AM
Hi! How can i add existing resource file to a C# project in VS2005 without breaking the connection? Lets say that i have a resource file, "MyStrings.resx", with one single string resource MY_STRING = "Hello!". When i create this file, VS will automatically add another file to my project ...more >>

Listview Tile Size Question.
Posted by Adrian at 11/2/2006 12:00:00 AM
I have a form with two list views. In one list view the tile size is set to the default value 0,0. I have not made any changes to these values. In the other list view the tile size has values. I want to reset those values to the default values. However if I enter 0,0, those values are found ...more >>

WTSOpenServer Windows 2000 Professional issue
Posted by Manu at 11/2/2006 12:00:00 AM
Hi, To get the USERNAME of all process running in local/remote system I am using the WTSOpenServer and WTSEnumerateProcesses API's but when I invoke the WTSOpenServer in Windows 200 Professional it s returning 1722(The RPC server is unavailable.) error, but the same program is working ...more >>

can i import header file for dos in dot net
Posted by somequestion at 11/2/2006 12:00:00 AM
i'd like to import header file for dos in .net project such as lib.h file...it is usally for dos is it possible...more >>

Data pair mapping data structure
Posted by Alan T at 11/2/2006 12:00:00 AM
I have pairs of data: peter - manager mary - secretary john - accountant alan - security What data structure is suitable for storing these data pairs so that I can get the counterpart ? If I have peter then I want to know he is a manager. ...more >>

MailMerge Microsoft article problem
Posted by Alan T at 11/2/2006 12:00:00 AM
I am working and tried to start and read an article from MS: http://support.microsoft.com/kb/301659 I followed the step to add reference to my dummy application, Microsoft Word 11.0 Object Library. Also add the - using Microsoft.Office.Interop.Word At the beginning of the code from the ...more >>


DevelopmentNow Blog