I have a picturebox where I change the BackgroundImage frequently. I have a the BackgroundImageLayout set to Zoom.
The problem is that when an image does not have the same scale as the picturebox, the picture is drawn in the middle. That is, the top and the bottom padding of the picturebox is always the same.
I would like for the Bac...
Should I call .Dispose() after returning an object that implements IDisposable?
myDisposableObject Gimme() {
//Code
return disposableResult;
disposableResult.Dispose();
}
In other words, is the object I return a copy, or is it the object itself? Thanks :)
...
how to enable paging in rdlc report viewer in .net 2008?
...
In LINQPad is there any way to access either the SYSOBJECTS table or the various INFORMATION_SCHEMA.xxx views using LINQ?
I spend a lot of time searching through our huge company database for partial names as there are too many tables and Stored Procedures to remember the names of them all.
I know I can enter and run SQL in LINQPad but...
I'm trying to get my head around the right use cases for Reactive Extensions (Rx). The examples that keeps coming up are UI events (drag and drop, drawing), and suggestions that Rx is suitable for asynchronous applications/operations such as web service calls.
I'm working on an application where I need to write a tiny client API for a R...
I am moving and old asmx webservice to a new server with IIS7.
This webservice basically sends a big dataset (10mb+) to a winform application.
The old solution was implemented using a custom soap extension which compressed the content before sending the stream to the client. The client, of course, implemented the same custom soap extensi...
I have a WCF SOAP 1.1 Webservice with the configuration specified below.
A concurrent call to any method of this endpoint hangs until the other returns when called remotely (from another computer on the network).
I cannot replicate this when these methods are called locally (with a client located on the same machine).
I tried to incr...
Hi,
I'm looking to create a wrapper control for JQuery date time picker control to be used in asp.net website. Once the user control is ready, it will be used in simple web forms / grids / data lists or repeater controls. User control will also expose below mentioned properties for customization.
TimeHourFormat: "12" or "24" (12 (AM/...
I have had a project for quite a while using C# winforms. I implemented a drag-drop function before windows 7 was release. Worked like a charm. However, when using windows 7 it does not work. The event doesn't even get triggered.
AllowDrop is set to true. When subscribing to DragEnter it does not get called in windows 7 (not sure about ...
How does OfType() Work?
I read this link about what's going on but how exactly does the LINQ provider know how to get all objects matching the specified type. I know the IQueryable<T> "chains" up requests and then evaluates when GetEnumerator() is called (right?).
Specifically I want to know how does the framework quickly do type comp...
Hey everybody,
I have a class in c# that implements Iserialzable.
I'm using a XMLSerializer that produces a XML from instance of that class.
I get the following XML:
<?xml version="1.0"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SessionConfiguration>
...
I have created an array of threads and started all of them. How to know whether all threads have completed work. I don't want to use thread.wait or thread.join.
...
I work in a group of 4 .Net developers. We rarely work on the same project at the same time but it does happen from time to time.We use TFS for source control. My most recent example is a project I just placed into production last night that included 2 WCF services and a web application front end. I worked out of a branch called "prod...
Hi there
Can someone explain the differences between an Observable and a ConnectableObservable? The Rx Extensions documentation is very sparse and I don't understand in what cases the ConnectableObservable is useful.
This class is used in the Replay/Prune methods.
...
Hi,
I have a windows service and I need to create directory to store some info. The directory path must be relative to the windows service exe file.
How can get this exe file path ?
...
Im using c#.net windows form application. I have a xml file. I have loaded unique node names into a tree view. Here is the xml file: Hello.xml
-
-
abc
hello how ru
-
def
i m fine
-
ghi
how abt u
-
asd
aaaaaaaaa
I have loaded the node names into a tree view. The code I have used is:
string x...
I know this is not a hell of an useful question but I can't help being bugged by it.
So,
Why said method (in *Command classes) is called
ExecuteNonQuery instead of ExecuteQuery?
Aren't those SQL statements we throw at DBs, queries?
...
Long-delayed update
I'm accepting MUG4N's answer to this question, and I also want to respond to some of the criticisms that were raised against it.
ChrisF said:
...you can't make UI calls directly from background threads.
This is a blanket statement, and is not 100% true. Let me just point out a few facts:
You can actually mak...
Hello, I am working on a custom control where I am using Rectangle to show some data. Now, lets say the width and height of the rectangle is set to 100.
If I have less amount of data, then its fine, I can make it draw using DrawString method. But, sometimes Data is bigger and so it gets clipped.
I have tried using MeasureString Method,...
I have a web based CRM system that stores all the client data from all the clients into one database (MS Sql Server). We need to build a system that maintains a local copy of the data for each client. So basically the client database will have all tables and columns except for the ClientId that is in ever server table. I am aware that I ...