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 thursday november 27

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

PropertyGrid and object fields
Posted by Eric Eggermann at 11/27/2003 11:02:46 PM
Hello, I'm using a PropertyGrid on my form in lieu of a big ugly dialog box, or rather several large dialogs, so the user can manipulate some objects. I've got a font field that displays with a nice little drop down feature showing the font properties slightly indented from the other properties....more >>


OnPaint() works differently between 2K and XP? (post again)
Posted by weixiang at 11/27/2003 10:41:42 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 >>

ListView and Scrollbars
Posted by Gawelek at 11/27/2003 10:16:24 PM
Is it possible to get to know if certain scrollbar is hidden or not? Of course without using WinApi :) -- Gawel ------------------------------- Pierwszy ³yk z pucharu nauk przyrodniczych czyni ateist±, ale na dnie pucharu czeka Bóg. Werner Heisenberg ...more >>

compare two dates?
Posted by Dirk Reske at 11/27/2003 10:08:40 PM
Hello, I have two dates. How can I check if the second date is the day after the first date? thx -- ---------------------------------------------------- I'm from Germany, so excuse my english :-) ICQ: 97255866 ...more >>

Cannot modify the return value of...
Posted by Daisy at 11/27/2003 9:53:33 PM
I came across this problem at work, and now at home... I've got an object that stores its position in a Vector3 object. Looks like this: public class Object3D { Vector3 _position; public Vector3 Position { get { return _position; } } } But when I try setting ...more >>

Creating an instance of a no-constructor-struct with reflection
Posted by Carl Rosenberger at 11/27/2003 8:44:56 PM
Hi all, I would like to create an instance of a struct with reflection. The way I am used to doing this with classes: - get a ConstructorInfo from the Type - call Invoke() However, if a struct does not have a constructor declared, I don't get a single default constructor. Here is a sho...more >>

How can I draw any thing within "for" loop?
Posted by John at 11/27/2003 8:42:35 PM
How can I draw any thing within "for" loop? I tried the below but it doesn't draw anything. What should I do? **** Code **** Graphics g = this.CreateGraphics(); Bitmap bm=new Bitmap(1,1); bm.SetPixel(0,0,Color.Black); for (i=1;i==2;i++) { g.DrawImageUnscaled(bm,500,500); }...more >>

Dispose or not??
Posted by qrli at 11/27/2003 7:03:07 PM
I used to think that all objects that implement IDisposable should be disposed. But I found 80% of the classes implement IDisposable. But when I looked into the samples, most objects are not disposed. Generally, they're Gdi objects, form controls, most components, etc. So why? How can ...more >>



Extracting VC# Code into a text file?
Posted by Tobias Froehlich at 11/27/2003 7:00:38 PM
Hi! is it possible to extract all the code of a project (or a single .cs file) into a text file? I mean of course I can just do ctrl-c and ctrl-v, but it would be great if the colors would be kept and if it would be somehow structured.. the problem is that I need to show someone the code o...more >>

UTF-8 or Default Unicode - Which one should be taken
Posted by Jazper at 11/27/2003 6:39:26 PM
hi i'd like to save a textfile within my program. i read that ascii or ansi not should be taken anymore for storing textdata to a file. people should take unicode encoding. so with .net i can easely use... System.Text.Encoding.Unicode or System.Text.Encoding.U...more >>

Indexers
Posted by Alvin Bruney at 11/27/2003 6:01:31 PM
In later versions of the framework is it possible to have indexers on properties for member fields? Say for example I have private ArrayList blah; and a propget public object Blah[int index] { get { return blah[index]; } } ...more >>

Capturing windows events (hooks)..
Posted by Mohit Sachdeva at 11/27/2003 5:14:50 PM
Hello folks. I want my app to process windows events first, so that it has some kind of a "global hook". The scenario is - i want my app to process all messages for "F3" key (or any other key for that matter) first before any other window does it. This has to happen whether my app is minimized, ...more >>

lpt and com interaction class
Posted by Brian Henry at 11/27/2003 4:29:23 PM
does anyone have a class to interact with a com or lpt port? I need to be able to send hex codes through the data lines D1 - D8 on a LPT port... or D1-D4 on serial... i have seen classes in the past for VB.NET or C#.net, if you know of any or a way of interacting since whidbey is still unavaiblab...more >>

Implement Action in Java using C#
Posted by linkspeed2000 NO[at]SPAM yahoo.com at 11/27/2003 4:22:37 PM
Hi, All: Is there any implementation in C# similar to "Action", "TextAction" in java? Cheers linkspeed...more >>

Does IMessageFilter work?
Posted by Michael Culley at 11/27/2003 4:22:28 PM
I've added an IMessageFilter to my app but I don't get messages or I get only a few and then it stops. My code is very simple. Am I doing something wrong? public class MF : IMessageFilter { public MF() { } public bool PreFilterMessage(ref Message m) { if(m.Msg == 15) { Console.WriteLin...more >>

Sort properties inside a category
Posted by Polo at 11/27/2003 4:16:25 PM
Hi All, I have defined some properties on a object with a category Attribute How can I use a custom sort inside a category ? See below By default : General information <- Category Adress Name ID Private Information <- Category Email Phone number I would lik...more >>

Default method parameter?
Posted by RA at 11/27/2003 3:23:06 PM
Hi What is c# default parameter passing for a method ? Is it ref? Is this valid to change the object info in a method? Class1 { public string name; int temp; } class test: { Main () { class1 cs = new class1(); Update (cs); //I sho...more >>

How to add new row in a datagrid without using DATASET
Posted by Ramki at 11/27/2003 3:08:50 PM
hi guys, How to Add a Blank row in a datagrid without using dataset Please reply ASAP. Very urgent. Thanks inadvance. Vaj ...more >>

Global Variable
Posted by report_1979 NO[at]SPAM yahoo.com at 11/27/2003 2:33:25 PM
hi, I have a global variable(integer) in my webservice. Iam incrementing it every time the webservice is called. There may be more than one call to the webservice at the sametime. I want increment the integer in a synchronized way. How can i do this. Thanks sendhil...more >>

updating ArrayList
Posted by Rustam Asgarov at 11/27/2003 2:31:07 PM
Hi. I have ArrayList that contains structures... I need to iterate through all structures in this array and update one of members in this structures... The first thing that comes to mind is just use foreach, store struct in temp variable , update it , then write it back to array to the same...more >>

Events and Delegates
Posted by Nicholas Beenham at 11/27/2003 2:21:52 PM
Okie next problem: I have 2 classes one of which fires an event to the other public delegate void class1eventHandler (object sender, EventArgs e); public class Class1 { public event class1eventHandler class1Event; protected virtual void OnChanged(EventArgs e) { if...more >>

help with Pen
Posted by KVV at 11/27/2003 2:21:48 PM
Hello, All! SolidBrush brush =3D new SolidBrush(SystemColors.Control); e.Graphics.FillRectangle(brush,Rect); Why this code draw=20 and this Pen pen =3D new Pen(brush,drawWidth); pen.Alignment =3D PenAlignment.Inset; e.Graphics.DrawRectangle(pen,Rect); draw ?(take a look on small rose pix...more >>

everyday a new file?
Posted by Dirk Reske at 11/27/2003 2:14:45 PM
Hello, I write an app that, logs events. how can I make, that everyday a new file whould be createt, with the date as name? thx -- ---------------------------------------------------- I'm from Germany, so excuse my english :-) ICQ: 97255866 ...more >>

Paint on lostfocus
Posted by Tamir Khason at 11/27/2003 2:05:09 PM
Why when I lost focus (go to back) on form all GDI+ paints disappears..... BUG or I do something wrong???? TNX ...more >>

Threading Question. Passing parameters to a function.
Posted by rollasoc at 11/27/2003 1:52:22 PM
Hi, Having a slight problem with how to pass parameters to functions between threads. I have a form with a progress bar and a description label on it. It has a public function IncrementProgressBar() that just calls performstep on the progress bar. On my main form I create a thread whi...more >>

How: To get true dynamic polymorphism (i.e. smalltalk)
Posted by Yechezkal Gutfreund at 11/27/2003 12:27:25 PM
I have two subclasses of SpriteModel (1) LocalSprite (2)Sprite Both implement a method called .ToXml() which returns an XmlDocument. But they are different. I instances of these objects stored in a Hashtable. Extracting them from the Hashtable means that I get a object that is tentatively a...more >>

This may be a duplicate :(
Posted by Nicholas Beenham at 11/27/2003 12:16:14 PM
Thanks for the help guys though now i have another related problem when trying to AppendText to a multiline textbox. An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll Additional information: Index and length must refer to a location within the stri...more >>

Assembly Programming
Posted by Dharma at 11/27/2003 11:40:40 AM
Hi! I am trying to learn assemblies. I created a DLLServer and DLLClient. I compiled DLLServer fine and got a dll. But when I compile DLLClient using the command >csc DllClient.cs /r:DllServer.dll it says 'DllServer' is inaccessible due to its protection level, can someone please help me with ...more >>

What is the best way to handle browser crash or browser close?
Posted by Champika Nirosh at 11/27/2003 11:37:22 AM
Hi All, I have a asp .net app and it is a online test application so tracking the user behaviour is very important. The problem is in what way I can identify the user logoff time if it happens to loggoff due to a browser crash. Nirosh. ...more >>

HELP! SET TRANSACTION ISOLATION LEVEL query.
Posted by Eric Porter at 11/27/2003 11:15:43 AM
Dear All, I have a VB6.COM program using a VB6.COM DLL, which in turn uses ADODB that performs various bits of SQL. I have re-written the VB6.COM DLL in C#.NET (with a VB6 shell), which uses the ADODB.Interop library supplied with .NET. The VB6.COM program above calls this C#.NET library i...more >>

Owner change in an inherited form
Posted by Wojciech Trelak at 11/27/2003 11:11:32 AM
Hi, Does anyone know how to change an owner of a control inherited from the base form? In code it's simple, but the real question is how to force designer to do this? Is it possible? I tried to play with the Component Designer Generated Code Best Regards Wojciech ...more >>

DataSet and View
Posted by Krzysztof at 11/27/2003 11:06:14 AM
How can I fill DataSet witch data from view? Sample: daDictionary = new OleDbDataAdapter("select * from " + viewName, myConnection); daDictionary.Fill( myDataSet, viewName); What must be done to do it? Regards Krzysztof ...more >>

Namespace error
Posted by Dharma at 11/27/2003 11:02:35 AM
Hello, I am trying to compile this "hello world" program but it gives me this following error, "A namespace does not directly contain members such as fields or methods" Can someone pelse help me with this? Here's my code: Using System; namespace Helloworld { class Helloworldindos ...more >>

Error Compiling
Posted by Seelan Rajagopal at 11/27/2003 10:41:30 AM
Hey Guys! Im Compiling a simple program is the command promt. I have set all the paths needed to run the compiler. But when I use csc myprogram.cs, it says that the program does not have an entry point defined. Can someone please help me solve this problem? Thanks ...more >>

temporary freezing in my application.
Posted by t_o_n_y_h_o NO[at]SPAM yahoo.ca at 11/27/2003 10:16:17 AM
I had a very strange problem with my application (using dotNet remoting). It is a client-server application. The server started first and is avaiable for access from an icon in the Windows task tray. The client is a GUI application which accesses the objects in the server via remoting. Most of t...more >>

Looking for help/resources on Writing a nice detailed design / tech design for vb.net code
Posted by spamproof2005 NO[at]SPAM yahoo.com at 11/27/2003 9:49:35 AM
I'm looking for an example of a detailed design that I can follow or get ideas from before programming in vb.net. Currently, I'm using this outline approach that describes my Project, Classes, Methods, properties etc and it goes something like this... I. Project: ProjectName A. Class: Cl...more >>

GDI object count
Posted by Niall at 11/27/2003 9:38:28 AM
We want to add a GDI object count (like that seen in Task Manager) to our application's error reporting information. Is there a way to programmatically get the number that task manager presents? I had a look through performance monitor, but I couldn't find a category with GDI objects as an optio...more >>

C# language
Posted by p988 at 11/27/2003 9:36:39 AM
When we talk about safe code regarding C#, what do we realy mean? Is safe code the same as managed code literally? Why people say that C# is a component-oriented language? What differences there exist between an event and a method in C#? What differences there exist between a properties a...more >>

MultiCast send and receive on same XP machine?
Posted by athordarson NO[at]SPAM landsteinar.je at 11/27/2003 9:24:50 AM
Hi All. I have this weird problem that on my devlepment machine (Windows XP) I don't receive MultiCast messages that I send from my machine. This means that my two processes can't communicate using MultiCast if they both run on the same machine. I have created a small MultiCast "server" whi...more >>

Using .Net Windows controls from COM (VB6)
Posted by Jaime Soto at 11/27/2003 9:06:08 AM
Hi, I have created a .Net Windows control and I want to be able to use it from VB6. I have spent a lot of time trying to me it work but no success. I've been using attributes (ComRegisterFunction, ComUnregisterFunction), Regasm, strong key but no results. Can anybody tell me or provi...more >>

ASPX page resize
Posted by Fabrizio at 11/27/2003 7:48:56 AM
Hi, can and aspx page be resized depending on the requester dysplay resolution? how? Thank you, Fabrizio...more >>

Accessing a VBA module from VB or C#. Maybe a better solution?
Posted by mike_kenyon NO[at]SPAM tiscali.co.uk at 11/27/2003 7:48:22 AM
Hi, This does sound like a bit of a weird thing to ask so I will state my question and then further down explain why I am trying to do it. So if you have the answer then reply! Or if you understand what I am trying to do and can suggest a better solution then reply also! Question --------...more >>

"Error creating window handle."
Posted by Arne at 11/27/2003 6:57:42 AM
Hi, I keep getting "Error creating window handle." now and then while running my C# application. I've tried to figure out why, but I'm stuck. What is the usual cause of this error ? The error occurs during a this.PointToScreen( newPos )-call, and "this" is referencing a instantiated Fo...more >>

C# to COM interop call returning an array of objects.
Posted by Interop newbie at 11/27/2003 5:55:49 AM
Hello, The following code makes an interop call to a Com object from C#: //Create a Bom object NewsBusObjsRCW.NewsBomObjClass myNewsBom = new NewsBusObjsRCW.NewsBomObjClass(); //Get the parts array NewsBusObjsRCW.NewsPartObjClass[] myNewsPartArray = myNewsBom.theNewsLocObject.the...more >>

c# to vb net
Posted by fivemagic at 11/27/2003 3:14:12 AM
someone knows how to convert c# code to vb net automatically? ...more >>

PassingValues from a class to a form
Posted by Nick Beenham at 11/27/2003 2:59:14 AM
Can anyone give me a tip on how to pass a value from a class to a windows form. e.g. adding text to a textbox. public class AnotherClass { //usual class code public void AddText() { Form1.TextBox.Text = "InsertText here"; } } It keeps asking for an object referenc...more >>

Binding DataRow Array to ComboBox
Posted by Shravan at 11/27/2003 2:49:23 AM
Hi, How can I bind DataRow array to ComboBox. I tried setting DataSource -> DataRow Array DisplayMember -> ColumnName But it was showing "System.Data.DataRow" for every item in the combobox instead of fetching the value from the row using the given column name. Can anybod...more >>

High Memory Usage ... dont know whats the problem
Posted by daniel NO[at]SPAM oxigem.com at 11/27/2003 2:24:44 AM
Hi NG, first of all i am new to OOP and C# so maybe thats my whole problem :) i wrote a small timer application, like i did if i was starting with programming in vb long time ago. the vb application (few years old) has memory usage around 7.000 K ... my new written C# Application around 18.00...more >>

Possible Threading Issue
Posted by Nicholas at 11/27/2003 1:21:42 AM
I have this class that provides a disk-based queue for storing various items. As items are queued the event delegate is called and the consumer dequeues the object and processes it. This seems to work off and on. Sometimes the queue does not pick up a queued item until another item is queued. Ca...more >>

Problem calling method in DLL
Posted by daniel NO[at]SPAM mediaworker.net at 11/27/2003 12:13:55 AM
Good morning! Now I'm sitting over 2 hours on a problem calling a method in the logitech SDK DLL. Everything is working fine, but calling one method I fell in a problem. I'm not that old with C# so i hope somebody can give me a hint in 1 min where I need 2 hours :) I get the error message: ...more >>


DevelopmentNow Blog