Search Results

Search found 3 results on 1 pages for 'ragha j'.

Page 1/1 | 1 

  • Whats the KeyCode for overwriting a text in TextBox in winforms

    - by Ragha J
    I have a custom control which extends from TextBox. In the KeyDown event of the control I have access to the KeyCode property of keyEventArgs If the text in the textbox is selected and some other text is typed on top of it, the keyCodes that I am getting in the KeyDown event are different each time and in the KeyPress event I get the actual value. For ex: If the textbox has value 1234 and now I select 1234 and type 5 on top of it, I want to to be able to know in any of the events by some key combination that the old value 1234 is gone and the new value of the textbox is 5.

    Read the article

  • Creating excel template 2003 in C# on a machine with both 2003 and 2007 installed.

    - by Ragha J
    I have both 2003 and 2007 Excel versions installed on my machine. The current source code uses Office11 (2003) interop assembly Microsoft.Office.Interop.Excel.dll to create the Excel template. When I create the template and open in Excel 2007, it opens perfectly. The same template when I open in 2003 I get the message "File format is not valid". _excel = new Excel.Application(); _workbooks = _excel.Workbooks; _excel.Visible = false; _excel.DisplayAlerts = false; // create and add a workbook with 1 worksheet named "Sheet1" _workbook = _workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet); _sheet = (Excel.Worksheet)_workbook.ActiveSheet;

    Read the article

  • Combining consecutive dates into ranges

    - by Ragha J
    I have a List of objects public class sample { public DateTime Date; public string content; } I want to be able to create a list of new objects public class sampleWithIntervals { public DateTime startDate; public DateTime endDate; public string content; } The sample objects should be grouped into intervals based on the content. The intervals can include only those dates that are included in the original sample list. I dont know how to do this in Linq. Sample data: {"10/1/2013", "x"} {"10/2/2013", "x"} {"10/2/2013", "y"} {"10/3/2013", "x"} {"10/3/2013", "y"} {"10/10/2013", "x"} {"10/11/2013", "x"} {"10/15/2013", "y"} {"10/16/2013", "y"} {"10/20/2013", "y"} This should give me {"10/1/2013","10/3/2013", "x"} {"10/2/2013","10/3/2013", "y"} {"10/10/2013","10/11/2013", "x"} {"10/15/2013","10/16/2013", "y"} {"10/20/2013","10/20/2013", "y"}

    Read the article

1