.net

Putting IME in a custom text box, derived from Control

I have created my own single-line textbox control in C# .net 3.5 I've written this completely from scratch, including my own selection code, scrolling, copy/paste etc. It can even select left-to-right text, not that I'd ever use that... The problem I'm having is with IME (input method editor) integration. The IME does work to an extent...

WCF: reducing first call delay. Best practice

I have WCF client that connects to server in Intranet. The very first call takes significant time and user waits patiently until it completes. Second, third calls are at least 30% faster. What is the best practice to keep WCF client ready to call? I'm thinking about background thread that pings server from time to time (or may be the ve...

C# project 2010, standalone executable on other computer

Hi All, I have a C# project that I have created in Visual Studio Express 2010. This program uses a 3rd party C# class that relies on/calls a C++ dll. I just copied the filename.dll into the bin/debug and bin/release folders of the project folder, and the application ran fine. I am under the assumption that I can copy the release execut...

In which namespace is the DelegateCommand in?

I am trying to work out an example from ".NET Domain Driven Design with C#", which contains a code example where you can see declared some attributes of type DelegateCommand. Now, I've tried googling it up, but I can't find its reference anywhere on MSDN (actually, I found this article, but not DelegateCommand's article itself). Is the...

Do the webservices are truely stateless.

Its a well know fact that webservices are stateless. Its written in every text that deals with WCF basics. But I need to know, Are they truely stateless. I was reading about the PerCall WCF webservice, which destroy the service instance for every call. I am not able to comprehend the use of Percall service. If webservices are stateless,...

Entity Framework/L2S creating new table in DB and Load it to the context?

Is it possible to create a new table programatically in EF or L2S and load it to its context? We have this application that requires to create a table at runtime and do some CRUD activities to that table. Is this possible? If not, any advice? ...

Which class should be used as base class of custom exception in .NET?

Possible Duplicate: Should I derive custom exceptions from Exception or ApplicationException in .NET? I've found two controversial thoughts in MSDN for this matter. If you are designing an application that needs to create its own exceptions, derive from the ApplicationException class. Source For most applications, de...

Lambda expressions and how to combine them ?

How can I combine two lambda expressions into one using an OR ? I have tried the following but merging them requires me to pass parameters into the Expression.Invoke calls, however I want the value passed into the new lambda to be passed onto each child-lambda.. Expression<Func<int, bool>> func1 = (x) => x > 5; Expression<Func<int, boo...

What does .NET's String.Normalize do?

Hi everyone, The MSDN article on String.Normalize states simply: Returns a new string whose binary representation is in a particular Unicode normalization form. And sometimes referring to a "Unicode normalization form C." I'm just wondering, what does that mean? How is this function useful in real life situations? ...

getting back default button properties C# - Windows forms

In my Form1 I am trying to change around 50 button images as follows: button1.Image = new Bitmap("C:\\x.jpg"); button2.Image = new Bitmap("C:\\y.jpg"); button3.Image = new Bitmap("C:\\z.jpg"); ..... etc.... on another event I want all the 50 buttons to have their default ...

Extension method to remove items from a list that exist in another

Hi, I am attempting to filter a list based on a predicate Func. I use Func to filter the complete list and return the result of the operation. I then need to determine which MachineActions appear in the complete list but not the filtered list. static void Main(string[] args) { var allActions = new List<MachineAction> ...

"Alone" programmer, what should I learn?

I just have been hired by a company, not a software company, but, kinds of service company. We here get requests, develop them into services, forward these services to sales department, and then start new one...Here, we use no standard: design, code contract, test,... Everyone gets his job's requirements, does it, separately, then report...

how to get the last accessed action in asp.net mvc

How can I get the last accessed 'Action' in a asp.net mvc app. Example I have a menuItem called 'Add to Favourites" when clicked is navigated to a page in which I need to populate a textbox with this url ...

NHibernate: Generate mappings for stored procedures

I need to call some stored procedures via NHibernate (not necessarily for CRUD-operations). Is there a freeware/open source tool which can generate mappings (a hbm.xml) for stored procedures and tables? ...

Right to left support Components for .Net

Hello, i am searching in internet to find Right to left support component packages. as You know there are many packages there (like devexpress, Component one, Netadvantage, .... ) i dont know any of them, would you please tell me which one of them is rtl support ? because i want to use them in a Persian (Farsi Language) project. Than...

Datalist in asp.net? ItemCommand event not firing?

hi, in my web application i have a datalist in that i am binding some images. in datalist itemcommand event i write code some code which is not firing, i mean the itemcomand event is not firing. can u help me. this is my source code DataList control: <asp:DataList ID="DLQuickVideos" runat="server" RepeatColumns ="2" CellPadding="0" ...

.NET... How to TDD with flat files

I have a project where most of the challenges are to ensure software works correctly with flat text files outputted by several external systems. Mangement made decision to introduce Agile and TDD as a particular implementation. I found that mocking input from the flat files makes no sense because the main issue to resolve is exactly co...

How to make the startup form initially invisible or hidden

How to make the startup form initially invisible or hidden I have a GUI project with 2 form and the forms have to be displayed separately. i.e. When form 1 is shown, all the other forms must be hidden. I can hide all the other forms, but I cannot hide the startup form.so that my application's icon in the System Tray. For example, fir...

What statements does Linq to entities support?

Does anyone know where I can get a full list of supported statements for linq to entities, this is statements that will be translated and run on the database...? ...

.net Winform with Modal window when Minimized using user32dll.ShowWindow() loses its open modal windows on opening!!

we have a weird requirement where our apps executed in the Sandbox environment are manipulated by some other app. The outer app modifies the visual style of the windows using ShowWindow() of the user32 dll. When a .net app with MODAL windows opened is Minimized and maximized by the Outer app, it loses all the modal windows which were op...