SankaraNarayanan Nagalingam's Q&A profile
.NET Development another timer question
Hey, I'm developing a program to calculate satellite orbits, and some calculations need to be done each second, others each day. For that I'm using System.Timers.Timer class. This program is going to be running for a long time, sometimes even months. Question: isn't this a bit dangerous I mean, having a timer running for this long time always counting up Any suggestions Thanks I believe you may find some of your objects would be disposed if it is not being used but as well as this, having a timer interval set to every second (1000 ms) would be really bad. If you must, try to make sure the timer interval is set to the true interval you require as close as possible. ...Show All
Windows Forms How to permanently change the highlighted items' colors in the ListBox?
I overrided the OnDrawItem() to change the highlighted items' background and foreground color. See below, if (e.State == DrawItemState .Selected) { backColor = this .HighlightedBackColor; foreColor = this .HighlightedForeColor; } else // default { backColor = this .BackColor; foreColor = this .ForeColor; } // Draw the background of the ListBox control for each item. Pen myPen = new Pen (backColor); e.Graphics.DrawRectangle(myPen, e.Bounds); e.Graphics.FillRectangle( new SolidBrush (backColor), e.Bounds); e.Graphics.DrawString( this .Items[e.Index].T ...Show All
Visual C++ creating a System::Diagnostics::Process^ from a HANDLE to a process
i have a HANDLE to a process, but i need to create a Process^ from the handle so i can do more advanced stuff with it thanks in advance IF you can get the process id from the process handle, then you can use this .net function: http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.getprocessbyid.aspx There's a recently introduced function in the Windows API (see Requirements) that gets the id from a handle: http://msdn2.microsoft.com/en-us/library/ms683215.aspx ...Show All
Visual Studio Tools for Office Problems with VSTO2005 on Vista
hi, I just installed VSTO2005 (English version out of the box) + SE (download) on Windows Vista Business (german version). Now I have the following problems: 1) The language of the menu-items in the VSTO-IDE is mixed (english/german). For example I get a "File/Open" menu-item (in English) and a "File/Schliesen" menu-item ("Schliesen" is the german word for "Close"). 2) The local help (although successfully installed) cannot be accessed in the VS-IDE (is always empty). I have seen on Microsoft websites, that there exists a VS2005 SP1 and a VS2005 SP1 Update for Vista (Beta). BUT as VSTO2005 is NOT listed as a valid VS-version for VS2005 SP1, I cannot install it. And therefore I cannot install th ...Show All
Visual Studio 2008 (Pre-release) RichTextBox Auto-Resize for text
I am using a RichTextBox and I am trying to have it behave similar to a TextBox in that it automatically resizes to the width of the text. MSDN says that the functionality is not provided. Anyone know of a way to create the functionality, or if it is possible at all A vb example of font auto-sizing functionality for TextBox is in the VB.Net forums: http://www.vbdotnetforums.com/showthread.php t=20078 Thanks, Rob Rob Relyea | Program Manager, WPF & Xaml Language Team robrelyea.com | /blog | /wpf | /xaml ...Show All
Visual Studio Express Editions Stopwatch Questions
Hey all I have some questions about a stopwatch app that i am working on, first here is my code: Imports System Imports System.Diagnostics Imports System.Windows.Forms Public Class Form1 Dim StartTime As Date Dim EndTime As Date Dim stopwatch As New Stopwatch Dim miletime() As Date Dim mark As Boolean = False Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click StartTime = Now stopwatch.Start() End Sub Private Sub btnStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStop.Click EndTime = Now stopwatch.Stop() End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.Eve ...Show All
Visual Studio Team System Is Team System just for .NET developers?
We have both .NET developers, and developers using other platforms at our company. Will the Team System work for everyone, or is it primarily for .NET/Visual Studio developers I haven't been able to locate any specific IDE requirements or info on what development platforms are supported. Bob, Team System is made up of serveral parts. A lot of functionality has been added to Visual Studio 2005 in the various flavours of the Visual Studio Team System. However, the glue that holds the whole team development togther is Visual Studio Team Foundation Server (TFS). As stated, TFS offers services that are useful for collaborative development i.e. Version Control, Work Item Tracking (work items being bugs, requirem ...Show All
Visual Studio Team System Microsoft Content Management Server (MCMS)
We plan to install Team Foundation Server (TFS) on a PC to evaluate. Now someone else wants to use the same computer to install Microsoft Content Management Server (MCMS). In the TFS installation Compiled Help File (CHM), it gives a caution recommending not to install other server software on the same computer. Has anyone done this And if so, were there problems Please let me know. Thanks, --Leroy P. ...Show All
Visual Basic How to get context menu for webBrowser control
I am using the webBrowser control to do ftp and this works great... When i right click on a folder in the browser window i am presented with the standard menu items.. I have alredy worked with the ShellAPI and have project that wraps a treeview so that i can get the shellFolder that is assoisated with the treeNode...The code below is what i use to get the context menu for a shellFolder. I would like to get be able to capture the context menu and add items, then handle the commands with the system.windows.forms.webBrowser.. how do i capture the context menu so that i can add items.. thanks erik public static bool GetIContextMenu( IShellFolder parent, IntPtr [] pidls, out IntPtr iContextMenuPtr, ...Show All
SQL Server How to find missing records from tables involving composite primary keys
Table 1 Code Quarter 500002 26 500002 27 500002 28 500002 28.5 500002 29 Table 2 Code Qtr 500002 26 500002 27 I have these two identical tables with the columns CODE & Qtr being COMPOSITE PRIMARY KEYS Can anybody help me with how to compare the two tables to find the records not present in Table 2 That is i need this result Code Quarter 500002 28 500002 ...Show All
Visual Studio Express Editions Linker Error on 1st Project after VC++ Express Installation
Greetings. I'm new to Visual Studio and just installed VC++ Express Edition. Following the installation instructions, I edited the several configuration files then tried compilation of the test project to verify path settings. I receive a fatal error from the linker, "unable to open advapi.lib", and indeed I am unable to find this file on my system. I do have, however, advapi32.lib, and I did include the name of that file when editing corewin_express.vprops according to the installation instructions. I would be grateful for any help that lets me get this software running... Regards, Joe ...Show All
Visual Studio How to add a custom rule that listens on "delete" events?
How can I add a custom rule (or similar mechanism) that fires custom logic in case I delete a class in the domain model In my example I have a domain model from which I create various ASPs and C# classes (for each domain class various implementation artifacts are being generated). For consistency reasons, I would like to add a “delete” event listener in the domain model. So, whenever a domain class is deleted, I would like to delete the derived implementation artifacts. Traceability is not the issue, only having a listener to a “delete” event. How would I do that Thanks, Alex I rule gets fired after modelelement/connector is deleted, is there anyway to capture it before it is deleted and get all the ...Show All
SQL Server Is this possible in MDX queries
Hi The cube i have conatins the ProductName , Time as dim and Sales as measure. I need to query from the cube the product name and sales for multiple date ranges. As an example, The I/P shall be in the format ProductName : A,B DateRange : 1/1/2004:2/1/2004,1/1/2005:2/1/2005,and so on. The number of date ranges is not fixed and also is the productname but the date ranges are common across both the Products. I have to query for the above I/P and use SSRS to get the O/P. Thanking you in advance regards saishyam Hi Steve Thank you for the response. The query that you have mentioned conatins the date ranges fixed, in my case the number of date ranges is not fixed. So how will i k ...Show All
SQL Server Relationship between t-Sql and "Set Theory"
I have always heard that much of t-sql is based on "set theory". I had Set theory in high school and I remember it as being simple Unions, Intersections, Differences of Sets. By a Set I mean a collection such as {2,5,7,8,9, ...) That could well described a single row in a table. By unioning several of these rows we could end up with a table. But how does that relate to t-sql such as select * from <table name> Where <condition 1> Is it simply that the result returned by the query is a Set (if so, a Set is simply being used as a synonym for a Collection. No set theory involved.) TIA, barkingdog This is quite a large subject =;o) Perhaps the best way is ...Show All
Visual Basic Missing Items....
Hello everyone, I am hoping someone can help me. I have been working on a small project in VB.Net 2003 and I was doing a good bit of Cut/Copy and pasting some text boxes, labels, etc. Anyway I suddenly have my items on another form with names like TextBox1 and Label3. And the original items are still showing on my Properties Drop down, but they are no where that I can find. How can I get these orphaned items out of the project so I can rename my items correctly Has anyone ever seen this before Thanks man, I really had tried that but I didn't close out and open it back up. I think that was the key because when I did that extra step this time it worked like a charm! ...Show All
