How to find previous active control c#
i am developing keyboard control, very simple embedded on a form. using sendkey class to perform char entry. to make this functional is required to know previous selected control. ...
i am developing keyboard control, very simple embedded on a form. using sendkey class to perform char entry. to make this functional is required to know previous selected control. ...
see also Why do I get InvalidCastException from OperationContext.Current.GetCallbackChannel<>() I wish to pass my own interface to OperationContext.Current.GetCallbackChannel, as I wish to make Asynchronous calls to the client(s) and hence need to add the “BeginMethod()” etc to the interface. I can anexception saying it can’t cast to ...
Does anybody know a free datagrid or listview control with grouping and master/detail capabilites? ...
I would like to read a text file into an array of strings using System.IO.File.ReadAllLines. However, ReadAllLines strips out some odd characters in the file that I would like to keep, such as chr(187). I've tried some different encoding options, but that doesn't help and I don't see an option for "no encoding." I can use FileOpen and L...
I have googled around and just found reams of pages about how to set up a WCF service config which isn't what I want lol. Basically, I have a factory class within my service which reads a Custom property from the config file to determine which Data Access Object to create, however, whenever I try to test it I get a NullReferenceExceptio...
Hi guys, I wrote my first windows service. Create WS project Rename Service Drag a timer into the middle Enable it, tick to 1s Create a logfie in tick when not exists Install the service Run the Service Nothing happens... I try to attach to the service, it's loaded correctly, but with a breakpoint in it, it never hits. Any ideas? ...
Dear ladies and sirs. Observe the following sample code: struct DDD { [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 512, ArraySubType = UnmanagedType.I1)] byte[] x; } struct BBB { DDD x; } struct CCC { DDD x; ulong y; ulong z; } [StructLayout(LayoutKind.Explicit)] struct AAA { [FieldOffsetAttribute(0)] BB...
As far as I know, .NET uses Windows processes. What extra state information & functionality does it add to information contained in Windows thread/process descriptors? And what is different in Linux (on Mono)? ...
I'm busy going through the very anaemic walk-through F# project provided by MS in VS 2010 Beta 2, and came across something that needs some explanation: let rec SumList xs = match xs with | [] -> 0 | y::ys -> y + SumList ys I assume match is something like a switch in other languages, where an empty list results in a 0 ...
There is an XML file with exchange rates http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml: <gesmes:Envelope> <gesmes:subject>Reference rates</gesmes:subject> <gesmes:Sender> <gesmes:name>European Central Bank</gesmes:name> </gesmes:Sender> <Cube> <Cube time="2009-11-26"> <Cube currency="USD" rate="1.507...
I have a dataset with a number of data columns, due to sizing issues I've updated a number of the varchar columns from say VARCHAR(20) to VARCHAR(50). I'd like the DataTable to automatically grab the new column information, is this possible? I'd rather not go through each column in the table and update the length. ...
Hello, I have a class with both a overloaded constructor and a overloaded method. If I initiate the class with parameters, the idea would be that I then didn't need to fill this information into my method. But as things grow it can get a bit confusing. I wanted to know if there is a way of either telling C# or Visual Studio not to sh...
Given an array of points, it is easy to draw a line based on these, e.g. using the GraphicsPath class. For instance, the following array of points... [0]: (0,0) [1]: (100,0) [2]: (0,100) [3]: (100,100) ...describes a line that resembles a Z. But here comes the challenge; I need to draw rounded corners with a radius of e.g. 10 pixels...
It is in Winforms. I have a UserControl that is anchored TOP, BOTTOM and LEFT. I would like to allow the user to drag its right border somehow and resize it horizontally. The control is placed right into the form, no panel or groupbox to place a "Splitter". Any idea how to make a control resizable at runtime by the user? ...
I'm writing a desktop application in Visual Studio 2008 / C# I finished (mostly) writing an engine which generates a working schedule for the week for a small company; a form of a course-scheduling problem Right now I'm designing a form in which the user can determine the initial parameters, or criteria, for the engine to adhere to (as...
Basically I am wondering why MS decided to implement an enumerator that only supports going forward: MoveNext(). Is it not more flexible to also enforce MovePrevious for this widely used interface throughout the .NET framework? I can imagine it making the Linq.Reverse far easier to implement for MS and more efficient in performance, bu...
Hello, I have a queer problem. I was working on a project with firebird 1.5.6 .NET provider and Visual Studio 2005. Everything worked fine. Then I converted the project to a VS2008 project. Now I have the problem that when I'm trying connecting to firebird database I get the an error: Index was out of range. Must be non-negative and le...
Hi, How is it possible to create a subdomain for each registered user of the web-site during the registration? For the scenario below... User opens site.com/register. Provides details and submits. Gets redirected to the newuser.site.com straight away User can work in the newuser.site.com area I don't know how to solve the issues: ...
Are there any objects in C# (or in .net) that represents a binary tree (or for curiosity) an n-ary tree? I am not talking about presentation tree controls, but as model objects. If not, are there any good external implementations? ...
I notice an usual high memory size. One app i wrote is a console app that uses <50lines and simply downloads a series of files solely using WebRequest. Another app that isnt trivial (mysql, dls, multithreads, listbox with 100 items). The first uses 21 mb (debug, ide), the other uses 39mb(debug, ide). I also have another app polls my site...