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# > november 2003 > threads for wednesday november 26

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

How can i aithenticate a user+password
Posted by Henrik at 11/26/2003 11:50:12 PM
If i have a username and Password - How can i check if they are valid in Windows from a C# program ???? Regards,Henrik...more >>


Interfaces (NOOBIE)
Posted by ME at 11/26/2003 11:15:12 PM
I am learning C#. I can't seem to understand why one would use an interface, it doesn't seem to do anything at all. Why not just leave the interface out and just code the properties and what not with out them? I have found numerous articles on the subject but I can't seem to find one that giv...more >>

Interface and static properties
Posted by Paul Selormey at 11/26/2003 10:54:25 PM
I have looked through the documents but could not find any information on this. Is anything like static properties in interfaces? If not, how do I define property in interface to be made static property in an abstract base class implementing the property? The problem is, I have a lot of in...more >>

tblimp is not recognized
Posted by Dave at 11/26/2003 10:40:07 PM
Help! When I try to run tblimp from the command line I get the following error: tblimp is not recognized as an internal or external command. tblimp.exe is not on my harddrive at all. What do I do? Thanks, Dave...more >>

Multidimensional Arrays??
Posted by Joshua Russell at 11/26/2003 10:13:16 PM
Hi, I wish to parse an XML file into some sort or array or multidimensional = storage. The XML file is as follows (without any parent tags just to = give you an idea of the structure)... <Ship Name=3D"Disrupter" Class=3D"CC" PrimaryTarget=3D"CR" = BattleOrder=3D"1" Guns=3D"5" Power=3D"2"></Ship...more >>

Scaling byte to short
Posted by _Andy_ at 11/26/2003 8:58:13 PM
I'm looking for the alogithm to take a piece of 8-bit audio data, and scale it to a 16-bit short. I got as far as: private static short ByteToShort(byte b) { int word = 0; word |= ( ( b & 0x01 ) << 1 ); word |= ( ( b & 0x02 ) << 2 ); word |= ( ( b & 0x04 ) << 3 ); w...more >>

OnPaint() works differently between 2K and XP?
Posted by weixiang at 11/26/2003 8:00:35 PM
Hi, I wrote a progam, which pop up a form that with OnPaint() overrided. It works great in XP but bad in 2K. In 2K, most of the form content will not be displayed until I drag the form a little. And I set a breakpoint to the OnPaint... The breakpoint was hit when the form popuped... But i...more >>

Button focus
Posted by Mike at 11/26/2003 7:52:48 PM
Can I trigger a button press event without putting focus on the button? I am making a form full of buttons that can be used as a keyboard on a touchscreen. If I have a textbox which has focus and I click the 'Q' button on the form which represents the 'Q' key on the keyboard, nothing get...more >>



Nasty flickering by OnPaint Graphics.Invalidate
Posted by Mark Johnson at 11/26/2003 7:32:13 PM
Using: VS 2003 NET C# for Framework and Framework Compact Trying : Moving a Card (Bitmap) as in Solitare (PC + WinCe) Version on OnMouseMove Problem : The affected drawing Area by Invalidate (or Invalidate(Rectangle)) flickers in a nasty way when repainting. This does not happen in the Solita...more >>

Fastest string manipulation object
Posted by Amendra at 11/26/2003 7:13:37 PM
Hi, Whats is the fastest object type or method that can be used for high performance string manipulations. I have heard stringbuilder does. But does any body know anything better. My operation are simple.. this is what I need to do with a least performance hit. //_consoleMsg = new String...more >>

Float/Double Substraction Bug ?
Posted by cybertof at 11/26/2003 6:26:51 PM
Hello, I have the strange beeing : float f1 = 108.88F; float f2 = 111.11F; float f3 = f1 - f2; double d1 = 108.88; double d2 = 111.11; double d3 = d1 - d2; f3 contains -2.23000336 d3 contains -2.230000000000004 instead of -2.23. Am i missing something ? Regards, Cyberto...more >>

TimeZones
Posted by Michael at 11/26/2003 6:12:03 PM
I would like to set the timezone of a thread to allow me to calculate the UTC time for data sourced from a number of time zones. Although this can be done in C and C++, I annot find how to do this is C#. Can this be done ? If so how ? Please note setting the culture does not impact the...more >>

Different set of properties in EnvironmentVariables when run in WindowService
Posted by Bjorn Abelli at 11/26/2003 5:17:39 PM
Hi all, When I run a normal application I can get who started a process with the following example: Process[] myProcesses = Process.GetProcesses(); foreach(Process p in myProcesses) { string user = p.StartInfo.EnvironmentVariables["username"]; } But when I try to r...more >>

accessing web pages and emails from c#
Posted by Duncan Winn at 11/26/2003 5:17:34 PM
Is there any way that my C# application can go to a web page (or email) and copy the information (as a picture) and display it in my application. I want my application to self update it's graphics (based on a surf report) without having to go to web sites directly and copy the information. Sur...more >>

can i hide property?
Posted by KVV at 11/26/2003 5:03:37 PM
Hello, All! can i hide property1 in designer depending on property2 value With best regards, KVV. E-mail: kvv_vlad@ua.fm ...more >>

using c++ .h files
Posted by Rustam Asgarov at 11/26/2003 4:58:21 PM
Hi. How can i use function and other things defined in c++ header file.? ...more >>

System.Array inherits from IList ???
Posted by Chris at 11/26/2003 4:52:45 PM
Hi, the specs for System.Array are : public abstract class Array : ICloneable, IList, ICollection, IEnumerable but I can't use any of the functions presented by IList in my code System.Array numbers = new int[5]{1,2,5,6,7}; numbers.Add(1) --> NOT POSSIBLE Compiler error :...more >>

interlocking namespaces
Posted by Abdessamad Belangour at 11/26/2003 4:35:57 PM
Hi, The namespace property of Type class returns the namespace of a given type. is there any function to test that a namespace is nested within an other namespace ? Thanks in advance. ...more >>

USB Foot pedal
Posted by William Doman at 11/26/2003 4:25:01 PM
I'm looking for information on how to interact with USB foot pedal device(s) in C#. Anybody have any suggestions? Thank you for your time ~William ...more >>

How can I rotate an image by certain degree
Posted by Mullin Yu at 11/26/2003 3:51:55 PM
I can create an image object with a string printed on it. But, how I can rotate the whole image 270 degree clockwise static public Bitmap createSerial() { Graphics objGraphics; string strSerialNo = "20031124123456-1"; // Create a bitma...more >>

isNumeric, among others
Posted by Bernardo Heynemann at 11/26/2003 3:51:50 PM
I couldn´t find the isNumeric function last night. So I did my own. But what do you think of Common Functions? What´s the best way to keep them in my ASP.NET (C#) project? One class PublicCode with them all? Just spread among all classes? Thanx for any help! -- Bernardo Heynemann Develop...more >>

C# and Bluetooth Development
Posted by DJCR at 11/26/2003 3:36:17 PM
Does anyone know of any resources for developing bluetooth enabled applications in C#. Microsoft really seems to be missing out on this, I can't find anything information on this topic, it's all just Bluetooth and Java. I would appreciate any information. Thanks. ...more >>

Is there some way other than IsSelected in a DataGrid?
Posted by Tom_Graves NO[at]SPAM i2.com at 11/26/2003 3:29:51 PM
Hi, I have been through all kinds of documentation on the datagrid and dataviews. I have many expensive books that I have looked through. But nothing has really helped. I want to find out and retrieve copies of any selected records that are in a dataview. One thing I have done is used the Mou...more >>

Blocking stream & converting
Posted by Guy Korland at 11/26/2003 3:28:20 PM
Hi, 1. How can I read stream in blocking mode? Meaning stop the thread till it get a new line sign? Or getting an event from the stream on new income data? 2. How can I convert 2 bytes to char? Thanks Guy ...more >>

How to view a page after logon...
Posted by Lorenzo at 11/26/2003 3:13:29 PM
Hi i'm writing some code that retrieve the html source code of an asp page. The problem is that if i go directly to this page the browser redirect me to a login page where are two textbox in a html form. <form action="/admin/login.asp?aktion=login" method="POST" name="login"> <table border="...more >>

Problem with ListView and OnSelectedIndexChanged
Posted by maxwellpatten NO[at]SPAM hotmail.com at 11/26/2003 2:58:08 PM
I'm having problems with the OnSelectedIndexChanged event firing twice when a ListView item is selected and not at all if I click on an already selected index. I've read older postings and other people seem to have experienced the same problem, but it seems that it hasn't been addressed. If ...more >>

Generated XSD wrapper public?
Posted by JPRoot at 11/26/2003 2:01:05 PM
Hi, When I generate a dataset from an XSD, is there a way that the generated Dataset is internal rather than public? This is particularly problematic for me since I am making DLLs. I don't want to change the generated code since my changes will be overwritten each time I make a modification t...more >>

Type Conversion Problem
Posted by george r smith at 11/26/2003 1:28:55 PM
Hi all, Need some help on a C# problem. Playing with chess stuff - great fun to learn with. int sq; sq = 0; UInt64 bb = 0; sq = 1; bb |= (1ul << sq); sq = 6; bb |= (1ul << sq); sq = 57; bb |= (1ul << sq); sq = 62; bb |= (1ul << sq); Console.WriteLine(bb); // this prints 4,755,801...more >>

Problem loading embedded resource
Posted by Drew at 11/26/2003 1:15:43 PM
Assembly asm = Assembly.GetExecutingAssembly(); me = new Bitmap(asm.GetManifestResourceStream("me.gif")); I have used this before without any problem, but now I get: An unhandled exception of type 'System.ArgumentException' occurred in system.drawing.dll Additional information: 'null' i...more >>

BUG Compiler
Posted by discussion NO[at]SPAM discussion.microsoft.com at 11/26/2003 1:12:36 PM
Hi, Repro: Make a call to the Cursor ctor like this.Cursor = new Cursor(GetType(), "SomeCur.cur"); DO NOT have the following line in the program... using System.Reflection; Watch the Cursor ctro FAIL yet no compiler warning. Add the using System.Reflection; reference ...more >>

Dataset thread: how thread safe?
Posted by JPRoot at 11/26/2003 12:56:15 PM
Hi All MSDN documentation explains the thread safety of the Dataset (and the underlying rows and tables) this way "This type is safe for multithreaded read operations. You must synchronize any write operations. Does this means that the following code is thread safe public class Class privat...more >>

Fully Qualified Class Name via Reflection - Namespace.Namspace.ClassName
Posted by Jeff Molby at 11/26/2003 12:47:09 PM
Sorry for the crossposting guys. I figured this one might be a little tricky, so I'm calling upon the C# brains out there to help out this poor VB developer. I know enough C# to translate any code you can offer, if necessary. I have a very loosely coupled WinForms app written in VB.Net, Framew...more >>

Edit a cell in DataGrid
Posted by Pranav Shah at 11/26/2003 12:43:33 PM
I have a Windows DataGrid with 6 columns. The DataSource is a DataTable that gets populated based on user request. Column 5 & 6 are Expression columns based on Columns 1 & 2 and Columns 3 & 4 repectively. In the DataGrid I wanto do a few things. 1)Allow user to modify columns 3 - 6. 2)When t...more >>

Outlook AddIn
Posted by Pete Davis at 11/26/2003 12:41:56 PM
Using this as a guide: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q302896 I am trying to implement an AddIn for outlook using C#. The sample is in VB.NET, so I assume this has to be possible in C# as well. I've added references to the AddInDesignerObjects, Outlook, annd Office...more >>

Win32 service
Posted by Marek Benes at 11/26/2003 12:07:27 PM
Hi, we created win 32 service in C#. The win2k server on which this service is installed logs into eventlog message "Service <name> hung on starting" while te machine is booting. Nonetheless the service is OK and running. In OnStart() procedure we are just trying to read some settings from regis...more >>

XmlDocument persistent errors
Posted by Philip Townsend at 11/26/2003 11:54:53 AM
I am attempting to parse through an XML document using the XmlDocument object. I keep getting a NullReferenceException. I have even tried using the fully qualified name, but with no luck. Here is the code: private void Page_Load(object sender, System.EventArgs e) { StringBuilder sb = n...more >>

Executable name
Posted by Aryeh Katz at 11/26/2003 11:40:51 AM
How can I determine the full name of a c# executable, like the c GetModuleFileName? Thanks. Aryeh ...more >>

Jeffrey Tan MSFT forget me? Virtual Override Events Inheritance
Posted by JPRoot at 11/26/2003 11:21:07 AM
Hi M. Jeffrey Tan, Just hopping you didn't forget me? :) Thanks JPRoot ----- \"Jeffrey Tan[MSFT]\" wrote: ----- Hi, I have reviewed your post. I will do some research for you. I will reply to you ASAP. Best regards, Jeffre...more >>

Tables wihout addition of new lines
Posted by Stephan at 11/26/2003 10:58:18 AM
Hi there, I am trying to show a table with C# where the User cannot add new lines. And, it should also not be possible to change the width of the rows. Tried everything, this makes me crazy! Is there a possibility to link dataGrids directly to just normal Arrays or must I use these weir...more >>

Argument Out of Range
Posted by Dave Bailey at 11/26/2003 10:45:49 AM
When I execute the following code: private void mrGrid_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { if (e.CommandName == "PR") { string targetPage = "prDetailsForm.aspx?PR=" + e.Item.Cells[5].Text; Response.Redirect( targetPage, tru...more >>

cursor Resources elp
Posted by discussion NO[at]SPAM discussion.microsoft.com at 11/26/2003 10:28:04 AM
Hi, I have a user control and i have added .cur cursor files to the project and trying to set .Cursor to new Cursor(gettype(), "cursorname.cur"); and I am getting An unhandled exception of type 'System.ArgumentNullException' occurred in system.windows.forms.dll Additional information: ...more >>

BUG and FEATURE REQUEST in designer properties
Posted by discussion NO[at]SPAM discussion.microsoft.com at 11/26/2003 10:23:22 AM
Hi, I have an enum (a bitfield with Flags attribute) that is in a user control and at design time the form does NOT permit setting of multiple bits. Will this be possible in future designers? Thanks. ...more >>

Trace.Assert to console
Posted by S. Han at 11/26/2003 10:19:49 AM
I use Trace.Assert() through out my app and it's such a great way to debug a program. My question is is there any way to redirect the assertion pop-up to the command line output in my console application? ...more >>

http Post
Posted by Wobbly Bob at 11/26/2003 10:13:22 AM
Hi, I'm trying to write a program to test an asp based web site. I need to mimic form data being posted to a page and have tried the following code, based on the documentation. I get this error: The remote server returned an error: (405) Method Not Allowed. The original web page does a form...more >>

Granting privileges using C#..
Posted by pdabak NO[at]SPAM yahoo.com at 11/26/2003 9:43:46 AM
Hello, Is it possible to programatically grant privileges like SeAssignPrimaryTokenPrivilege to a Windows account from C# code? I don't want to call down to WIN32 functions -Prasad...more >>

Can I use the "Idle" process to figure out why my processor utilization has been?
Posted by johngilmer NO[at]SPAM yahoo.com at 11/26/2003 9:30:52 AM
I don't want to know what the CPU utilization is right now. I want to get the average utilization over the last, for example, hour. So I came up with a method where I would get a Process object representing the "Idle" process. I would figure out what percentage of time the idle process has been ...more >>

Looking for Advice on Thread.Sleep
Posted by cider123 NO[at]SPAM hotmail.com at 11/26/2003 9:25:13 AM
I ran into a situation where my Window Service had to process 100,000+ files, when I first noticed I needed to tweak various routines. Everything runs fine, but here's what I ran into: In the routine that loops through the file buffer: for (int i=0;i < _Buffer.length; i++) { // Code he...more >>

Combo Box Update Problem
Posted by db_from_mn at 11/26/2003 8:16:27 AM
I have a combo box in which I've set the DataSource to an instance of an ArrayList. The contents of the ArrayList is managed in a timer control's timer_elapsed event handler. The number of items in the ArrayList may increase or decrease. When the contents of the ArrayList changes, I try to...more >>

use reflection to get back original object from interface
Posted by smith at 11/26/2003 7:35:32 AM
How can i convert an interface object back to it's original object, without knowing original class name.... interface ITest { int some_method(); } public class Test : ITest { int some_method() { return 0; } int some_newMethod() { return 1; } } public cla...more >>

Splitter and panels
Posted by Bevo at 11/26/2003 7:17:56 AM
I have two panels on my form with a splitter between them. The top panel is docked Fill and the bottom is docked Bottom. The splitter is docked Bottom. When I run and try to move the splitter the System.Windows.Form.dll throws an SEHException at me. Is this a .NET Framework bug and does a...more >>

Overloading problems
Posted by anonymous NO[at]SPAM discussions.microsoft.com at 11/26/2003 4:49:15 AM
Hi, For some important reasons I've implemented a new type as a class instead of a struct. The type is called NKTd and I've overloaded the == operator as follows public static bool operator==( NKTd a, NKTd b ) { return ( a.value == b.value ); } Now, if x is a NKTd (or pointer t...more >>

convert a number to its ascii value
Posted by questions at 11/26/2003 4:32:58 AM
How do I convert a number to its ascii value in c#? What is the equivalent of VB's chr() function in c#? thanks in advance...more >>

Source code generation in VS.NET IDE
Posted by Yaser Zia Sistani at 11/26/2003 4:13:59 AM
I have wrriten a custom combobox control which only have the name of months in it. public class MonthCombo:ComboBox { MonthCombo() { base.add("Jan"); base.add(..... ..... } } and nothing more than this When I Used this control in mt form Every time that i...more >>

Rationale behind int to enum casts
Posted by ah2003 NO[at]SPAM gmx.net at 11/26/2003 2:59:17 AM
Hi there Spending half an hour searching through the archive I haven't found a rationale for the following behavior. using System; // note the missing Flags attribute enum Color { Red, Green, Blue } class Whatever { static void Main() { // The following ca...more >>

Extender Provider not saving value
Posted by Steven at 11/26/2003 2:27:07 AM
Hi, I have implemented the IExtenderProvider interface (and inherited from Component) in a class that I am using with ASP.NET controls. The field shows up fine in the VS.NET properties grid, however the value are not persisted anywhere (I would have expected it to show up in the VS.NET desig...more >>

How can I draw single 1x1 pixel "dot" in window?
Posted by John at 11/26/2003 1:10:57 AM
How can I draw single 1x1 pixel "dot" in window? Not a line, I really mean "dot"....more >>

Help On Object Oriented Programming
Posted by Naren at 11/26/2003 12:54:45 AM
Hi, i am developing one application,that is completely object oriented application.the main purpose of this applicaiton to completely maintain the database operations for the project. i created one class for the database connection(sql server database).i want to use that database connect...more >>

Control Data Binding Question - Please Help!
Posted by PCC at 11/26/2003 12:48:30 AM
I am using the Infragistics UltraWebNavigator menu control and am having trouble building my menu hierarchy either by data binding or coding it manually. I have included a sample of my Menu table schema and contents so you can see what I am looking to build it from. Any advice, samples, articl...more >>


DevelopmentNow Blog