Answer Questions
Simon Sprott Issues debugging COM registered components
HI I am currently looking to expose some of my c# application functionality to excel. I have set "Register for COM Interop" to true and set the start up application to excel. This allows me to run and step through the project debugging the code very nicely, however, every time I run the project I have to reset the dependency within the VBA window in excel. I am guessing that it is registering the component with different guids every ...Show All
ScottL EventHandling problem : Java has solution but what about Microsoft's .Net???
Hi, I have added few of the events in some control, example code is: btnControl.GotFocus +=new EventHandler(EventHandlingMethod); btnControl.Click +=new EventHandler(EventHandlingMethod); lblControl.Click +=new EventHandler(EventHandlingMethod); private void EventHandlingMethod(object sender, EventArgs e) { ....... } btnControl = Button object, lblControl = Lable object Now the problem is: I am adding the same event han ...Show All
johnmont store image
Hi can anyone write an snippet code to store image in database with binary shape(code) not an image seroiusly there must be an easier way to convert a filestream object into a memory stream i'm amazed by how many examples i'm seeing that require us to manually create a fixed length TEMP buffer and move data from one stream to the other. i'm simply amazed, i a bad way :( Thanks my dear I am asking ALLA (God) to g ...Show All
Hank2 A newbie question on Interfaces
hi, I'm new to C# and OO in general. I can't seem to undestand the pertinence of interfaces. From my understanding, the interfaces define the signature of the methods while the class implements these methods. How is this better than simply doing away with interfaces and simply implementing the method in the class Apologies for the rather novice question, an example to illustrate the pertinence of interfaces would ...Show All
Andrei Asayonak store image
Hi can anyone write an snippet code to store image in database with binary shape(code) not an image PJ, can u elaborate on why you have used a memory stream in the following, as opposed to just a System.IO.Stream Image image = Image.FromFile(@"c:\myimage.bmp"); using (MemoryStream stream = new MemoryStream()) { image.Save( stream ); byte [] buffer = stream.ToByteArray(); SaveImage( "myimage", b ...Show All
zombie How do I compare two TimeSpan objects to see if they overlap
Is there a way to compare two TimeSpans to see if they overlap For example: (1/1/2006 - 1/31/2006) overlaps (1/15/2006 - 2/14/2006) (1/1/2006 - 1/31/2006) does not overlap (3/1/2006 - 3/10/2006) . I want to do programatically determine whether two date ranges overlap. How can I accomplish this Unfortunately TimeSpans do not contain dates, instead they contain the span of time between two arbitrary points in time. In ord ...Show All
Jeremy Riley Garbage collector
I have been read about garbage collector and i don't clearly 'stack frame'. And the way garbage collector in stack and heap. If you know, please show me. Vu, thanks a lot. http://msdn.microsoft.com/msdnmag/issues/1200/GCI2/ is a fine article on how Garbage collection works. Thanks for show !!! ...Show All
Yuval124 C# Webmail
Does anyone knows a good webmail client written in C# like UebiMiau for PHP I've already tried DotNetOpenMail... But I didn't like Thanks Check this one out http://www.devmail.net/ Very good, but isn't there a freeone That was what I'm looking for, but I need a free one Don't we all ( need a free one, that is ), but yet we still hope to get paid... ...Show All
Richard Judson Creating a reference to a value type
I need to create a variable that holds a reference to a value type so that something like the following will work: int i = 0; int x = i; i = 2; // i need: i == 2 AND x == 2 This obviously works with reference types: DataSet ds = new DataSet(); DataSet ds2 = ds; ds.Tables.Add("Table1"); // now ds AND ds2 have 1 table (they reference the same object). I thought that boxing a value type would create a ...Show All
ansic deployment project
I want stages how include my project web on internet and how open the project on computer other if was IIS has related I want explain step by step thank you dear ...Show All
doodahman ManagedThreadID doesn't work for interop for SetWindowsHookEx.
I am converting a VB6 program to be C#. Therefore I was looking up how to hook the application for mouse, key activity and I found this article by Microsoft. http://support.microsoft.com/kb/318804/ In the code it uses AppDomain .GetCurrentThreadId() to set a callback thread for Hooking. It uses interop to the user32.dll. I modified/used the code and it works. However, the compiler insists that I should not use this function (GetCur ...Show All
Rturlapati Solution-wide data access
Hi, I have a solution with a main project (my actual application), a plugin handler project and about a dozen other projects that are the actual plugins for the main application project (the main application is fully based on these plugins and only functions as a visual interface for them basically). Now, i have an Access database (although i may move to VistaDB) that is accessed by just about all plugin projects (but NOT the main applicat ...Show All
Sean McLeod Partial Classes and usercontrols
Hi All, I’ve been looking into creating a partial class for a usercontrol but without luck. The ascx.cs class sees the method in the partial class and the partial class can see methods in the ascx.cs file (via intellisense) but when I do a build it says e.g. CallPartialMethod does not exist in the current context . I’ve added some quick sample code below to show what I mean. e.g. test.ascx // standard usercontrol …html & ...Show All
Stormblade Cannot compile project under another configuration when web reference is present!?!
Hi, This is a weird one: I've been unable to compile my solution under Release configuration for ages. Actually, not the entire solution, just one project inside the solution. Today, I decided to try removing a web reference and suddenly the project now compiles under Release configuration as well as Debug conf. Then I put the project (this time I didn't even bother using a full solution, I simply opened the project on its own (it doesn't depend ...Show All
CSharpShooter Which data structure should I use?
I want to use a data structure in memory that models a many-to-many relationship. For example, one URL links to many other URLs and is linked from many other URLs. I envision this like a database table with two columns, linksto and linksfrom , with a compound PK on both columns. This allows me to get all the URLs a page links to by querying the linksto column, as well as all the pages linking to it by querying the linksf ...Show All
