James Boman's Q&A profile
Visual C# implementing the Equals method with and w/o override
Hi, I'm using .NET 2003 with .NET Framework 1.1. I have a somewhat stupid question: I created a new class (MyClass) that represent some value and implemented the Equals method the following way: public bool Equals(Object obj) { // code here... } And if I try this code I get 'True' (since they hold the same value) MyClass c1 = new MyClass(<<some value >>); MyClass c2 = new MyClass(<<same value as above>>); Console.WriteLine(c1.Equals(c2)); BUT (!) if I insert c1 into an ArrayList and check: int index = myArrayList.IndexOf(c2); I get -1 on the index variable (c2 was not found). Now, if I add override to the Equals implementation signature: public ...Show All
Windows Forms DataGridView Column identify - VB 2005 Express Edition
Hi, I'm using a databoud datagridview control. The dataset contains all the fields of the table and the grid is associated with that specific dataset. If I want to hide a column on the datagrid I can use the statment: dgvClassLocais.Columns.Item(1).Visible = False It works OK. But if I want to name the field (corresponding column 1 in the datagridview) I cannot. dgvClassLocais.Columns.Item("IDLocal").Visible = False ; gives an error Can you explain why Regards, Pedro Hi, to access a datagridview column by its name you need to pass the name in the cell property not the column property. ie. dim name as string name = DataGridVie ...Show All
Visual Studio Cannot install VS 2005... UDF ISO-13346 issue
Hey everyone, I'm having the devil of a time installing the VS trial version (team package) on my xp pro machine. I've been fiddling with it for the last 2 days and can't get the DVD to even recognize the UDF portion of the disc at all, which is where all the installation files are. argggg... I've tried extracting it with ISOBuster, which fails almost 1/3 of the way through. I've tried ripping it to an image with Nero and fails at 69%... And those are the only two programs that I have that will even recognize that there is a UDF partition on there... Explorer is clueless to its presence. Could anyone help me I would sooooo greatly appreciate. Thanks, Tim Hi, I had the same problem and als ...Show All
.NET Development I fixed by OutOfMemory Exceptions. Can somebody tell me why???
I have written/deployed a C# Windows Service using VS.NET 2003. This service, over a period of several days, would grow in size to over 700 meg and start getting OutOfMemory exceptions. Also, the Page Faults would number in the millions. The problem turned out to be in class level 2 XmlDocument objects. (Note: The class that used these 2 XmlDocument objects was a very busy class). The class would use these 2 XmlDocument objects to manipulate XML strings. The LoadXml() method was used to load the XML and then manipulate the XML as needed. There were 3 methods in this class that used these class level XmlDocument objects. So, I deleted these class level XmlDocument objects and used local XmlDocument objects within each method that requ ...Show All
Visual C# Click Once Deployment error
We have written an internal winform app for our users built on C# and .net 2.0. We are using the click once deployment and it installs fine and the app runs fine. However, when the application is closed an error is generated The instruction at "0x30cb0a4f" referenced memory at "0x00000000". The memory could not be "written". Click OK to terminate the program. We do not get this during design time, but only at run time when it is published. Has anyone seen this problem before I appreciate your help. Brian I get the same message. My VB.NET app is a simple form with a browser control (but has a child form). When I click the "x" it closes - but doesn't leave the task manager - until the ...Show All
SQL Server stupid question on graph width.
when I create graph (Pia) the graph take 80%, and the labels take 15%, example here: http://img2.tapuz.co.il/forums/1_91779074.jpg is it possible to grow the place of the labels I try look on the properties and I didn't find. thanks! thanks , .there is another way more difficulty here: http://blogs.msdn.com/bwelcker/archive/2005/05/20/420349.aspx thanks for the good link. ...Show All
.NET Development StreamReader and nulls (\00
Is there anyway to use the streamreader to read a file that contains nulls (\00) without the streamreader seeing it as an end of file. I have a situation where the file may contain nulls. Should this be done using the binaryreader How do you look at the returned string after reading it Keep in mind that many Windows APIs sees a null character as the end of the string, so if you print the string with Console.WriteLine, Debug.WriteLine or MessageBox.Show it may well be truncated. Instead I suggest you look at String.Length. ...Show All
Visual Studio Team System Data Binding a .CSV file
Hey, I have a webtest which has a single webservice request. I created a .csv file (Users.csv in Users folder) on my C: drive and added it as a datasource and the test connection succeeded and I could see the .csv file as a datasource added to the webtest. I am trying to parameterize the field in the XML (string body)....the xml is something like <Name>CustomerName</Name> which I changed to <Name>{{C:\Users.Users.Name}}</</Name> to bind to the data in the csv file. When I run the test, I get an error "Request Failed:Context parameter 'C:\Users.Users.Name' not found in test context" Can anyone please suggest how to make this work Thanks, I am no ...Show All
SQL Server how to pass report parameter from an ASP page
Hello, I would ask how to pass report parameter from an ASP page Thanks in advance You can pass the parameter in the URL. Read this article on MSDN to find out all the details Good luck!! ...Show All
Visual Studio 2008 (Pre-release) Non-Windows client apps?
What tools are available, from Microsoft or elsewhere, to build WCF/SOA client applications for platforms other than Windows Specifically, we're looking at Mac (probably just OS-X) and possibly Linux. Our preferred development language is C++. Jeff For Linux, may be you want to look at ProjectTango http://java.sun.com/developer/technicalArticles/glassfish/ProjectTango/ ...Show All
SQL Server Programming SQL Express
Hey, i have an installer that places ms sql express onto a machine. thats is fine. i want to create a post setup application that runs after ms sql server is installed. what for example i want to do is be able to create a user and have the DB allow remote connections. i can provide instructions for a 'peon' to make the required post setup changes but i want to see if i can cover that with an application. thanks Charles Rezsonya hey, anyway you can show me a script that would change the server to allow tcp remote connections what application do i run to process the script ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Managed Direct3D 10
Since XNA only supports DirectX 9.0 Where is Managed Direct3D 10 I hope there will be Managed wrapper for Direct3D 10 thanks Thanks Michael, That was the answer I was looking for. (Official MDX10 way cool). I already did check out XNA it is awesome, But XNA is partially crippled because it had to make so many compromises in order to be multiplatform. That is why pure PC managed DX API is imperative in order for PC to remain competitive gaming platform. When creating MDX10 1- making close mapping between DX10 and MDX10 will considerably ease up migration from C++ to C#. 2- following .net design pattern make it much easier for .net programmer to use MDX10 sinc ...Show All
Visual Basic SQL 2005 and MS Visual Studio 2003
After I looked the 'RELATED QUESIONS' my questions were answered. My question was "Can MS Visual Studio 2003 and SQL Server 2005 Express Edition be used together " No they can't be used. Since I just started to learn Visual Studio 2003 and updating from VB 6, I find myself having to stick with this verison of VS. Now my question is there a cd I can get MSDE 2000 I call MS and talk to may people and they seem to think there is no way to get this product. I down loaded MSDE 2000; but, all the other programs that look like should come with this mgr, etc. could not be found on the down loads. Any help would be appreciated. THANKS Ray No, MSDE 200 doesn't include any manager because it's free. B ...Show All
Visual C++ Problems just adding a message to WndProc in a Win 32 API code.
Hi to all, I have add the WM_XBUTTONDOWN message in my WndProc() in this way: switch (message) { case:WM_XBUTTONDOWN: WPARAM wParam; LPARAM lParam; break; ... } but it gives these errors in the same line: (line 151) error C2065: 'WM_XBUTTONDOWN' : undeclared identifier (line 151) error C2051: 'case expression not constant ' I have added "Windows.h" and the folder where it is. Whats the problem Ben Anderson MSFT wrote: Did you add that define before any includes Yes Ben Anderson MSFT wrote: Make sure you're not setting it to a different value anywhere else in your code. If ...Show All
Visual C++ Get and Set properties of static window at run time
Hello Gents, I am developing a desktop PC application. In this application, the user can create static window at run time.That means, the application based on Dialog window, the user click the create button the new static window created. The user can able to change positon ,size , text, color and also move the static window to over the client area. clarification : How can i get the properties ( static window frame border , color ) of static window when the user can change the position,resize that window I am waiting for yours valuble response!!!! Thanks and Reagrds, Vishva If your problem is still not clear... then please specify your exact p ...Show All
