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 monday may 28

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

strange? by ref instead of by value
Posted by Andi Wolf at 5/28/2007 9:55:51 PM
Hello, as i belived c# will always transfer the variables as by vale if not marked with a ref infront of the decleration. By using the folowing code there seams to be (at least for me) a strange behavior: namespace xyz { public class Class1 { public static double[] Rea...more >>


How to get the date?
Posted by Polaris at 5/28/2007 9:30:26 PM
Hi Experts: Using C#, knowing today's date, how to get the date of NEXT Tuesday? For example, if today is 2007-04-26, I'd like to get the date of next Tuesday which is 2007-05-01. Thanks in advance! Polaris ...more >>

Release build not optimizing
Posted by Brett Romero at 5/28/2007 6:12:42 PM
I'm using MSBUILD to build release and debug versions of a winform project (VS.NET 2005). The project file has conditionals to file reference DLLs depending on the build configuration (debug or release). The generated EXE PDB file for release is 2KB smaller than the debug version. However, t...more >>

Convert string to HorizontalAlign value
Posted by Jeff User at 5/28/2007 5:20:12 PM
Hi all vs2003, .NET1.1 I would like to store alignment values in SQL Server db and then use them in C# to set values of cells in tables. Problem is that a string variable will not work. Is there a way to set Alignment values from a string variable? string sValue = "Center"; //Comes from ...more >>

Streaming a dynamically created xml file (using memorystream) to let the client application pick it up automatically...
Posted by SuperKhoolGuy NO[at]SPAM gmail.com at 5/28/2007 4:58:14 PM
Guys, I have a client tool which runs and accepts files with "amt" extensions. All the "amt" files have been setup to open using my client tool which works great when I double-click on the file in the windows explorer. The way I'm creating the file is completely dynamic depending on the ...more >>

Interfacing with Garmin GPS Device (Edge)
Posted by Joseph Geretz at 5/28/2007 4:50:05 PM
Anyone write code to interface with the Garmin Edge via USB? (Or Forerunner - I think these are pretty much the same.) I'm not looking for real-time GPS feed, but rather I'd like to get the data off the device afterwards so I can plot my rides into MS MapPoint. Thanks for any advice which y...more >>

TypeLoadException struct problems
Posted by Nuno Magalhaes at 5/28/2007 2:29:40 PM
Hello, When I use the following structure at the Load event I get a type load exception. [StructLayout(LayoutKind.Explicit)] public struct TempStruct { [FieldOffset(0)] public int a; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)] [FieldOffset(0)] public string b; }...more >>

BindingSource Removing Current Row
Posted by msnews.microsoft.com at 5/28/2007 12:53:19 PM
Greetings I have a a simple application with 1 form. On my form I use a BindingSource to bind a database table to a "table (gridDataView)" (one in the database, one on my form, 2 different types of tables). I want to remove the current row I tried : GrantsBindingSource.RemoveCurrent();...more >>



How to check if my com add-in already installed in this computer
Posted by Yael at 5/28/2007 12:34:00 PM
in a c# project. string guid = "HKEY_CLASSES_ROOT\MatarotToolbar.Connect" RegistryKey key = Registry.LocalMachine.OpenSubKey( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + guid); 2) my add-in setup name is "Setup.Exe", not unique name. (coded in c#) Mata...more >>

VAB - IValidatorDescriptor is inaccessible due to protection level
Posted by Jay at 5/28/2007 9:49:43 AM
In both of the UnitTest projects that ship with the Ent Lib, (VSTS and Nunit), there is a TestMethod with the name: AttributeWithLowerAndUpperBoundsOnlyCreatesAppropriateValidator. Each of these tests creates a StringLengthValidatorAttribute: ValidatorAttribute attribute = new StringLengthVali...more >>

ComboBox usage
Posted by Cralis at 5/28/2007 8:29:08 AM
I have a List of data objects. I need to populate a ComboBox with the 'Description' field from the objects. I can do that with cmbBx.Items.Add( myObject.Description.ToString() ); myObject has 2 fields for example. id and description. Later, I need to get the id of the selected item in the C...more >>

Why can't a datetime be converted to a double?
Posted by Polaris431 at 5/28/2007 6:35:47 AM
I get a casting error when I execute the following: DateTime d = DateTime.Now; Double f = Convert.ToDouble(d); Why? The Convert.ToDouble has many overloads, one of them being the ability to convert a datetime value to a double. Thanks Johann ...more >>

REG_BINARY to meaningful text
Posted by Srini at 5/28/2007 6:27:49 AM
Hi, Can anyone please tell me how to retrieve meaningful value from registry value in REG_Binary type? I tried to convert REG_Binary value to string using the following code. RegistryKey objKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\ \MICROSOFT\\WZCSVC\\PARAMETERS\\INTERFACES\C...more >>

wierd exception
Posted by dshemesh at 5/28/2007 6:22:02 AM
Hello, I have a C# project with windows forms. I sometimes get unprdictable .NET exceptions. I don't always get them, so I can't reproduce where exactly it happens. I can generally say it happens when closing the application (maybe in the dispose method?). Here are 2 examples: System.Thre...more >>

How to set a Property?
Posted by Phill at 5/28/2007 6:07:01 AM
I am making the transition from VB to C# and am stumped on a seemingly simple task. I have created a class and defined a property using set/get. Now from one of my forms I want to set the property to a value but I get a compile error saying "An object reference is required for the nonstatic ...more >>

forcing combobox elements
Posted by dshemesh at 5/28/2007 5:41:00 AM
Hello, I have a C# project with a windows Form. In the form I have a ComboBox. I would like to force the user to choose one of the entries in the combobox, and not allow him/her to edit the content of the entry chosen. Is this possible in some easy and elegant way? thanks, -- dshemesh...more >>

Data file only opened by 1 app.
Posted by Jesper, Denmark at 5/28/2007 5:35:00 AM
Hi In an app that I', writing, I would like to implement the similar to the functionality in MS Word where Word detects wether a *.doc file has already been opened in another instance of Word. I guess I would set some file attribute like read-only or something on the file - however, does an...more >>

Check if program is already running
Posted by Yael at 5/28/2007 4:43:01 AM
Hi, How can I check from C# code if outlook program if the process is already running? if not, I run outlook with: System.Diagnostics.Process.Start("OUTLOOK.EXE"); Thank you! ...more >>

Thread-Save WinForm GET calls
Posted by abc at 5/28/2007 4:33:20 AM
I have been following all the example about how to SET a form element property in a thread-safe manner (see SET example below), but I can not find any examples about how to GET a form element property in a thread-safe manner. I tried using the code in the GET section below, but I got the error m...more >>

Scale fonts
Posted by iklarri at 5/28/2007 3:51:02 AM
Hi, anyone knows if a Font can be scaled only in one dimension (width or height). The result would be a Font that would have the same height and double wide, for example. Thanks...more >>

Problem with DllImport
Posted by t0x3e8 at 5/28/2007 2:01:19 AM
Hello I load an external library written in Delphi (I don't have any source code of this lib). I do it in this way: [System.Runtime.InteropServices.DllImport("myLib.dll", EntryPoint="externalMethod")] public static extern bool userExist(string userName, string password); Next I launch fr...more >>

Is it possible to run setup file from C# code?
Posted by Yael at 5/28/2007 1:06:02 AM
Hi, I have this method in my c# vs.net 2003 code: ================= Start Code ================= private void isOutlook() { Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\microsoft\\windows\\currentversion\\app paths\\OUTLOOK.EXE"); st...more >>

WSDL
Posted by Dr No at 5/28/2007 12:57:54 AM
Hi I try to use wsdl in my application. In VS2005 in menu: Data->Add new data source i choose - web service...then in URL -I set https://something/abc?wsdl...and there is a problem...because I get an error:The request was aborted:Could not create SSL/TLS secure chanel. Please, help me. I ha...more >>

custom collection editor
Posted by Paolo at 5/28/2007 12:29:37 AM
hi, i want to know if is possible to create a "custom collection editor" anyone know how to? ...more >>

Dispose pattern
Posted by Thore Berntsen at 5/28/2007 12:00:00 AM
I'm trying to understand the IDisposable pattern. In the sample on MSDN they have added a destructor/finalizer like this: ~MyResource() { Dispose(false); } Calling Dispose(false) will only dispose non managed resources. If I implement IDisposable only to dispose managed resources is...more >>

Populating DownloadProgressChangedEventArgs
Posted by MaxMax at 5/28/2007 12:00:00 AM
How can I create and "fill" a DownloadProgressChangedEventArgs class? The WebClient does it... But I can't do it "manually". It doesn't seem to have a constructor, and it's members are protected. It's base class (ProgressChangedEventArgs) has a constructor that can be used. Thanks ...more >>

PageIndexChanging in a GridView
Posted by Jason Huang at 5/28/2007 12:00:00 AM
Hi, In my C# 2.0 web form project, I have GridView1 in Form1.aspx. I am wondering why I can't find the PageIndexChanging event in the Form1.aspx.cs but the GridView1 still can go to other pages. So, where exactly does the C# 2.0 web handle the PageIndexChanging thing? Thanks for help. ...more >>

how to retrieve section CDATA from xml file
Posted by Dariusz TomoƱ at 5/28/2007 12:00:00 AM
Hi, I have got xml document with CDATA sections containing special characters like links to images. All Iwant is to display the content in my div section. I tried like this: protected void Button2_Click(object sender, EventArgs e) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc...more >>


DevelopmentNow Blog