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 thursday february 10

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

Help with Cursor position
Posted by Keith Smith at 2/10/2005 10:43:49 PM
How can I force the position of my carat to the end of the text in the typing field without sending an "end" keypress? ...more >>


Object reference not set to an instance of an object
Posted by julien at 2/10/2005 10:27:21 PM
Hello, I got the error "Object reference not set to an instance of an object" in this piece of code: Assembly asm = Assembly.LoadFrom(location); System.Attribute[] attributes = Attribute.GetCustomAttributes(asm); I checked: * location: this is the full path + file name of a dll * asm is ...more >>

Events and GUI question:
Posted by Naveen Mukkelli at 2/10/2005 9:49:02 PM
Hi, I'm trying to update my GUI when an event is raised in my one of my dlls. my example code is: ------------------- In GUI: someLable.Text = " "; --- --- someObj.UpdateEvent += new UpdateEventDelegate(UpdateGui); someObj.UpdateCompleted += new Upd...more >>

Doubt on Interoperability
Posted by thomson at 2/10/2005 9:15:24 PM
Hi all, We all know that in .net , we can use any languages , for eg in vb.net or c# , i hope you can do multiple forms in multiple languages[Not clear though] Or reference dll written in Vb.net in C#..Ok Is there any contraints in by doing this, such as any precautions, that...more >>

Update a DataSet
Posted by Kyle Rowe at 2/10/2005 7:58:48 PM
How do I Update a dataset into a DB if the orginal SqlDataAdapter I used to fill the dataset is gone? ...more >>

can't select dataSet from DataGrid
Posted by Enuar Lastamp at 2/10/2005 6:08:13 PM
Hello, I'm programming in C#, If I put dataSet1 (declared public) in Form2 and dataGrid1 in Form1 when I clic on dataGrid1 and I select DataSource (from properties) I can't see and select dataSet1, how can I select dataSet1? thanks ernuar ...more >>

System.Web.Mail
Posted by Zach at 2/10/2005 6:00:52 PM
Sending an email via System Diagnostics has text length limitations and therefore won't do. My Visual C#.Net 2003 does not recognize System.Web.Mail is there a reason for this? Alternatively: I am looking for a code example for sending emails other than by System Diagnostics. Please help...more >>

Objects in Treeview
Posted by Ricola ! at 2/10/2005 5:58:09 PM
Can I store objects in treeviews ? -- Texeme Textcasting Technology http://texeme.com Indie Pop Rocks @ SomaFM http://somafm.com/ ...more >>



Dataset question.
Posted by objectref at 2/10/2005 5:38:57 PM
hi to all, let's say i have the following code: SqlDataAdapter da = new SqlDataAdapter(cmd.CommandText, cnn); DataSet ds = new DataSet("ds"); TestData.DataSource = ds; da.Fill(ds); the abvoe code is working and fetch the data in a datagrid but it displays a plus sign on the upper lef...more >>

KeyDown / KeyUp / KeyPress
Posted by Keith Smith at 2/10/2005 5:29:22 PM
Is there a sure-fire way to trap keypress events no matter which control has focus? ...more >>

PrintDocument class in c#
Posted by enahar at 2/10/2005 5:15:37 PM
How to print the list view control columns using PrintDocument class in csharp dotnet framework Thanks Regards, Ekta ...more >>

Modular application
Posted by Hernán_Freschi at 2/10/2005 4:44:38 PM
Hi all. I'm writing a program which I would like to make "modular", that is, being able to add plug-ins for new functions. Basically, the plug-ins will add new MenuItems to the main MenuBar. How can I make that kind of thing? Regards, Hernán Freschi...more >>

float do decimal
Posted by Hrvoje Voda at 2/10/2005 4:37:43 PM
I have a variable in sql table with float type. I would like to read a value to numericTextBox in my Application. Hrcko ...more >>

Which IDE is better for C#, Borland C#Builder or VS.net 2003?
Posted by smartwolf agassi via DotNetMonster.com at 2/10/2005 4:24:59 PM
I'm a C# language learner. I want to know which IDE is better for C# programing, Borland C#Builder or VS.net 2003? -- Message posted via http://www.dotnetmonster.com...more >>

c# MP3 Player, is there a dll, or decoder thats free
Posted by Tim Geiges at 2/10/2005 4:23:37 PM
I am learning c# and wrote a couple of little apps, and am trying to learn to use dll's I got snmp.dll to work which was really cool, but I think I want to play around and write a little MP3 player. Is there a dll I can interface with for MP3 playback that is free? and any basic code example...more >>

EnumMonitors in c#
Posted by Brad M at 2/10/2005 3:55:55 PM
Hi there, I am trying to retrieve a list of installed printer port monitors, this was relatively easy in c++, but I can't seem to figure out the API call in c#. From MSDN the API call is... BOOL EnumMonitors( LPTSTR pName, // [in] server name DWORD Level, // [in] i...more >>

How can test the pw for Sql Server 2000
Posted by ad at 2/10/2005 3:51:52 PM
I want a user input the password of sa of Sql Server 2000. How can I test if the password is correct? ...more >>

How to print contents of DataGridView
Posted by Sharon at 2/10/2005 3:38:47 PM
Hi All. Is there a way to print the content of DataGridView, Without using Graphics.DrawString on every row? Thanks, Sharon. ...more >>

Which book?
Posted by jeffc at 2/10/2005 3:36:12 PM
Another book recommendation request. I've looked through the old archives but can't find any consensus at all. I'm currently a C++ developer, and I know that on the C++ newsgroups there is a general consensus among the top handful of best books, depending on your experience level and needs. Ma...more >>

Name of main form in app
Posted by Paul Aspinall at 2/10/2005 3:17:56 PM
Hi I have an app which consists of several forms, some of which are hosted as MDI in the main form, which is the MDI parent. The initial 'main' form in the app is instanced via [STAThread] static void Main() { Application.Run(new frmMain()); } I want to access some of the p...more >>

How to capture Mouse Single click and mouse double click event
Posted by Sakharam Phapale at 2/10/2005 3:00:59 PM
Hi All, How to capture Mouse Single click and mouse double click event on Commnad Button. I am doing as follows. Private void Button1_MouseUp(Object sender, System.Windows.Forms.MouseEventArgs e) { If (e.Clicks = 1) {MsgBox("1");} Else {MsgBox("2");} ...more >>

SqlAdapter not returning value
Posted by lekshmi at 2/10/2005 2:57:45 PM
Hi, I have an application written in .Net and my database is SQLserver. In my application i am using SqlAdapters to get the values from the database. But sometimes, values are not returned properly to these adapters and there are no exceptions also. At this time, all database queries wi...more >>

PropertyGrid question
Posted by Frank Rizzo at 2/10/2005 2:49:45 PM
I added a PropertyGrid control to my form and set its SelectedObject property to one of my objects which exposes a lot of properties of type System.Drawing.Color. The System.Drawing.Color display fine, but they don't have a dropdown where I can select a new color, like in the VS.NET. How c...more >>

if else ...
Posted by Hrvoje Voda at 2/10/2005 2:47:06 PM
How can I use in If statement Or? for example. if (x>10 or y>10) { .... } Hrcko ...more >>

Inherited from a base form
Posted by ad at 2/10/2005 2:42:09 PM
I have a base form, there a textbox on it, I set the textbox to protected. The properties of the textbox can't be modified when I inherited a form from the base form. I want to modified some properties of the textbox of the inherited form, how can I do it? ...more >>

Trickey problem with editing enum based properties
Posted by thechaosengine at 2/10/2005 2:35:42 PM
Hi all, I have a problem that I havent really come accross before. I need to be able to allow the user to set a dropdown control to a particular colour value. The permissable values come from the Color enumeration and unfortunately I can't change this implementation detail. My question...more >>

COM Component and C#
Posted by abcd at 2/10/2005 2:18:50 PM
I am novice C# programmer. I have written a com component using Visual C++ ATL. I want to use it using C#. My questions 1. How do I use it. 2. what are the comands to create the ojects. 3. How should I debug my component from C# program thanks ...more >>

How to free komputer memory after dispose
Posted by Robert at 2/10/2005 1:46:03 PM
I wrot program wich is included to the other program by using createobject() function. This object somtimes is showing a form with some information. After closing a form and calling a Dispose() metod, the komputer does not free memory and the object takes mor memory afret showing a form again. T...more >>

PLS HELP - Forcing Gobal Garbage Collection
Posted by MuZZy at 2/10/2005 1:35:19 PM
Hi, I got a situation here :) an dwonder if someone can help me. I have an MDI app and say, the child form has a button, clicking on which calls a database transaction - grabbing a lot of tables to the form's TDataSet variable. One transaction grabs about 10 or more Mb of data. If i do seve...more >>

odd question: how to "read" letters from an image?
Posted by VMI at 2/10/2005 1:34:12 PM
Is it possible to "look" at an image and "read" the letters inside of that image? For example, if I have several images of exactly the same size and each has two lines of letters (Name, telephone) that always start and end in the same exact position, is it possible to analyze that part of the ...more >>

Declaring a const array
Posted by Edward Diener at 2/10/2005 1:08:44 PM
If I write: int[] x = { 1 }; that is fine with the compiler, but if I try to declare the array as const, meaning that it will not be changed: const int[] x = { 1 }; I receive the error message: error CS0623: Array initializers can only be used in a variable or field initializer. Try...more >>

copying the listbox behaviour in "Add/Remove Programs"
Posted by Dan Bass at 2/10/2005 1:02:26 PM
[Problem] I'm looking to develop a listbox with in-place editing where as each item is selected, it grows to fit in all the text boxes. When the item is deselected, it shrinks back to its original size. The editing bit is not a problem, but I can't get the selected item to resize, as the list...more >>

How to remove namespaces from XmlDocument???
Posted by Richard at 2/10/2005 12:21:04 PM
Hi, I would like to strip all of the "xmlns" attributes out of an XmlDocument. I coded a function that recurses nodes and calls: XmlNode n = node.Attributes.RemoveNamedItem("xmlns"); After this call n is NOT NULL - indicating that "xmlns" was removed. However when I look at the outer ...more >>

Source of a frameset at run time...
Posted by Yuki at 2/10/2005 12:17:04 PM
hi all ! I need a help... I have a html page, with a frameset in it... in the "banner", I have some buttons inside a repeater control.. when I click any button, I need to change the source of the one of the frames of the frameset... I try to do: private void rpt_ItemCommand(object source, ...more >>

Full Screen Mode
Posted by Roman at 2/10/2005 11:47:14 AM
Hello, I have one pictureBox with the jpg file.How can I put it to whole screen? Do I have to use API function? R. ...more >>

C# Hexadecimal conversion
Posted by Nadav at 2/10/2005 11:39:08 AM
Hi, I want to WriteLine a number in hexadecimal ( e.g. %x ), how would I do that in C#? -- Nadav http://www.ddevel.com...more >>

CollectionBase Update
Posted by Franck Diastein at 2/10/2005 11:31:46 AM
Hi, I have create a TypeSafe collection with CollectionBase, but I don't know how to update an object... Let's say I have an Animal class with Animals collection. Animal has a property named Number that's unique in entire collection... I would like to do something aka in my form: private ...more >>

Reading an xml file into Dataset
Posted by ALI-R at 2/10/2005 10:54:42 AM
Hi All; I'm reading the following xml file into a Dataset but there are only 4 datatables in my dataset (which should be 5) Is that because I have two nodes with the same name (detail) in my xml file? how can I fix this? Thanks for your time. <?xml version="1.0" ?> - <report> - <su...more >>

Best serial rs-232 class
Posted by Davide Bettio at 2/10/2005 10:51:56 AM
Hi! Can you tell me the best managed classes free to use the serial port? (rs-232)...more >>

How to: set the selected "drop down list" value at run time.
Posted by charliewest at 2/10/2005 10:31:06 AM
I need to set the selected drop down list value at run time. I am aware of the method "SelectIndex" however this works only if you know the precise location of the value within the ListItem collection. Otherwise, what is the recommended approach? I have managed to set the appropriate value ...more >>

Compiling problem, or is it?
Posted by Daniel Billingsley at 2/10/2005 10:22:37 AM
I have a solution consisting of 9 projects with various references to each other (clean though, no loops, etc.). Visual Studio sometimes gives me weird errors that it can't find one of the referenced assemblies, can't write one, or now most frequently (almost 100% of the time): "A failure occur...more >>

Why am I getting a
Posted by Frank Rizzo at 2/10/2005 9:51:17 AM
I try to open a file using this line: FileStream oStream = File.Open(FileName, FileMode.Open, FileAccess.Write, FileShare.None); When I try to open a file "\\CON-GELBR\TRAFFIC_LOAD\01012605.trf", I am getting the following error: System.UnauthorizedAccessException: Access to the path ...more >>

HttpResponse.WriteFile sends uncomplete file
Posted by perlesnews NO[at]SPAM gmail.com at 2/10/2005 9:46:41 AM
Hello everybody, We have a problem sending a file to the browser from our aspx. The problem is that the file received is uncomplete. The browser shows the first characters of the file. No exception or any kind of error is shown on server nor or browser. It works properly locally, but it fails...more >>

Hardware
Posted by Demetri at 2/10/2005 9:37:02 AM
In C# how would I determine what type of machine a user is running my application on? I'd like to know if it is a tablet PC, a desktop PC, or a Notebook. Thanks -- -Demetri...more >>

How to set the background color of a MDI Parent from?
Posted by ad at 2/10/2005 9:35:33 AM
How to set the background color of a MDI Parent from? The setting of background color is ineffective. ...more >>

Object reference not set to an instance of an object.?? Please Help
Posted by frawls NO[at]SPAM gmail.com at 2/10/2005 8:06:39 AM
Hi, I get the following error when trying to run a search on my aspx site, this error only occours if the product im searching for does not exist. Can anybody explain this please and help me with a solution, i know its probably simple but im new to the game...Cheers ------------------------...more >>

Service takes 1 min 34 sec to start
Posted by Sam at 2/10/2005 7:48:05 AM
Service properties ------------------ Log On As: LocalSystem Logon account has full admin privileges. OnStart() routine ----------------- { EventLog->WriteEntry ("Commencing..."); .... A Spawn1() Spawn2() EventLog->WriteEntry ("Completing..."); .... B } In Automatic mod...more >>

How to implement a menu with panels
Posted by Erich at 2/10/2005 7:45:03 AM
Sort of a beginner question - What might be the best way to design a windows form that contains a menu, whose items are loading different content in the form. I'm used to do that via panels (visible attribute). I guess thats not a good way. Would it be better, to use a new form for each ...more >>

How to get memberOf groups for a user in ldap ?
Posted by Henrik at 2/10/2005 6:27:01 AM
Hi, I am trying to autheticate a user in ldap and get a list of all the groups the the use is a member of. My problem is that i only get one groups from the request, although i know i am memeber of several groups. Can anyone see what i am doing wrong here? public bool IsAuthenticated(st...more >>

OpenFileDialog - how to select files by coding???
Posted by Sharon at 2/10/2005 6:05:02 AM
I’m using OpenFileDialog class in a specific InitialDirectory and I want that files will be selected in the opened dialog when I call ShowDialog(). Actually I wish to select all files in the directory automatically by code. Is it doable? How?? -- Regards Sharon G....more >>

loop througth Literials using foreach!!
Posted by Islam Elkhayat at 2/10/2005 5:16:22 AM
In my web application i use satalite assembly to localize my web form.. Instead of set the each control text to the resourcemanager getstring() method i try to use foreach loop private string rmg(string key) { return resource.GetString("key"); } private Literal ctrl_txt() { f...more >>

Put a binary image into HtmlGenericControl
Posted by Josema at 2/10/2005 4:47:02 AM
Hi, I have in a database models of cars, CarID int CarName varchar CarFeatures varchar CarImage binary I have a class Car that have the properties: ID int Name string Features string Image byte[] My problem starts here: i have into a page a <span id=CarGenericControl r...more >>

Strings
Posted by jez123456 at 2/10/2005 4:09:07 AM
Hi I have the following vb6 code that I need to convert to c# strDBPath = Left(strDBPath, InStrRev(strDBPath, "\")) Thus if I pass in C:\Test 5\Taster.mdb the output should be C:\Test 5 I've tried String.LastIndexOf and String.Substring but can't seem to get them to work....more >>

DIfferent Validation on two datagrids
Posted by Stephen at 2/10/2005 3:47:03 AM
I have two datagrids on a page and each of them allow the user to add rows. On each datagrid I have validation (required field, reg expressions etc) and my problem is that I only want the validation to work on the datagrid which I click add in. At the moment if I click add in one datagrid and...more >>

Write XML file on remote machine
Posted by Himanshu NO[at]SPAM Newgen at 2/10/2005 3:33:01 AM
Hi, How can I write an XML file on a remote machine in the same network? I tried passing string "\\machinename\directory\filename.xml" in XMLTextWriter constructor but it failed even if I had full rights on the directory. Thanks Himanshu...more >>

Reg Expression
Posted by Stephen at 2/10/2005 3:19:01 AM
I was wondering if anyone knew how to write a regular expression which validated that a field was 200 or less characters long. Its this part i'm interested in working out. Can someone help me please. ValidationExpression="^{0,200}$" <asp:regularexpressionvalidator id="Regularexpressionvali...more >>

Error while using COM component
Posted by Reshma Prabhu at 2/10/2005 3:07:02 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 >>

Can we add an event handler that has different delegate?
Posted by Tee at 2/10/2005 2:35:13 AM
Hi, As topic, Can we add an event handler that has different delegate? Example: I have a method that takes no parameter: public void xyz() I would like button1 to fire that method onclick. button1.Click += new EventHandler(xyz) I understand that button click event should has para...more >>

COM Server boject
Posted by znappa at 2/10/2005 2:31:05 AM
Hi. I would like to create an instance of a COM server from C# code. I now use the System.Runtime.InteropServices.Marshal.GetActiveObject() function to get the running instance (but this implies that there is an instance running). But I would like to check (at the start of my code) wether th...more >>

Button ToolTipText
Posted by Ryan Joseph So at 2/10/2005 2:03:11 AM
Is it possible to add a tooltiptext on the button control? How? Ryan. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!...more >>

Disable control's paste contextmenu
Posted by Ryan Joseph So at 2/10/2005 2:03:07 AM
Is it possible to disable the paste contextmenu of a control without creating a new contextmenu to handle this, so i wont be able use to paste on that control. Ryan. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!...more >>

String Syntax
Posted by jez123456 at 2/10/2005 2:01:01 AM
I have the following code which runs ok Jet OLEDB:System Database=C:\\Test\\system\\Sys.Mdw; When I use Jet OLEDB:System Database=@C:\Test\system\Sys.Mdw; or Jet OLEDB:System Database=@"C:\Test\system\Sys.Mdw"; It dosn't work correctly, any ideas? ...more >>

Can we pass a method to another class?
Posted by Tee at 2/10/2005 1:14:54 AM
Hi, Can anyone tell me if it's possible to pass a method to another class? Example of what I would like to do: class1: public void MyMethod() { code here } class2: public void CallThisMethod(something MethodName) { MethodName(); } Then I will call this code from class1: c...more >>

Hyper-threading
Posted by Illumineo at 2/10/2005 12:19:43 AM
My application uses multiple-threads and is a kind of AI simulation or ALife. This works fine but I was wondering if and how one can make use of hyper-threading in C#? Thanks for any hint, Francois ____________________________ The Netron Project, http://netron.sf.net ...more >>

Is C Sharp the way to go ?
Posted by Dallas Dahms at 2/10/2005 12:09:54 AM
Hi. Is C Sharp the way to go for learning dotnet programming, or would VB.net be equally as rewarding to learn? My experience is limited to BASIC and PYTHON programming. Thanks. Dallas ...more >>


DevelopmentNow Blog