Karl Costenbader's Q&A profile
Visual Studio 2008 (Pre-release) WPF apps slow for some reason
Everything is slow for some reason. I tried Max, and that ran decently (aside some weirdness I'll explain below), but I try running some of the sample code and other stuff I compile on Visual Studio, and it's unbelievably slow. I tried the samples here on XamlPad... I can click on a button at a rate of about 2-3 times a second, and my CPU usage will jolt up to 100%. Most other sample applications run just as slow. Max runs okay, except that it takes about 40% of my CPU time even when it's minimized. By the way, is there something I can do about text being blurry Here are some of my machine specs: Pentium 4c 2.4ghz HT 1gb DDR 400 dual ...Show All
Visual Studio Team System BUG: Invalid handle on concurrent checkout/checkin
If I am checking out the a project file. My colleque checks out the same project file (concurrent checkout) Then he checks in the project file. Now, when I am trying to check it in I get an error box saying "Invalid Handle" Restart, Reconnect to TFS doesnt help. However, If I do a "Get lastest version" then it triggers a merge request, after I done the merge, the checkin works fine. Regards Fredrik Melin After further review on our merge issue it appeared that it had something to do with line endings. The merge tool showed half of the code updated which none of the code had been touched. When we put in a diff ...Show All
SQL Server Bug in SQL Server 2005 ? - DATEADD function
Hi When I execute the following , the expected result is 03/31/2006. However the result that you get is 2006-03-28 00:00:00.000 Select DATEADD ( MONTH , 1 , '02/28/2006' ) Is this something how the dateadd is supposed to behave or is this a bug in SQL Server 2005. Regards Imtiaz Hi Imtiaz, I can't actually see anything wrong here. Why would the expected result be 31 March 2006 That is not one month in the future, that is one month and x days. What you are trying for is a "End of Month" function... Cheers Rob ...Show All
Visual C# PDF Print / Print Setting
Hi, Is it possible to create two buttons (btn1 and btn2) in my winform so that when I press btn1: A print dialogue appears and allows me to change the print settinng. btn2: Print the document according to the print setting I set in btn1. I have taken a look at the PrintDialog class, with PrintDialog I need to use PrintDocument. But seems with PrintDocument, I need to play with the Graphics object and now I want to print PDFs.... Any tutorials/links/resources will be great. Michael We use a product from http://www.wpcubed.com/ that will programatically print PDFs - much cheaper than the equivalent licens ...Show All
Windows Forms Unhooking Parent events
I have a control that needs to hook a couple of it's parents events so I'm planning on overriding the OnParentChanged event. Where is the proper place to unhook these events if the parent changes As far as I can tell, you don't have access to the previous parent in the OnParentChanged event. Thanks, Ray OnParentChanged would be the best place to handle this, you just need to store a reference to the previous parent, for example: private Control _PreviousParent; protected override void OnParentChanged(EventArgs e) { base .OnParentChanged(e); if (_PreviousParent! ...Show All
Visual FoxPro TXT Files
Hi there!!! Does anyboady knows how can i print a TXT file in foxpro I don't know what can i do, I've never used VFP before and I need to do this Thanx a lot!!! There are several ways. The simplest one is probably the old TYPE Command: TYPE FileName1 [AUTO] [WRAP] [TO PRINTER [PROMPT] | TO FILE FileName2 ] [NUMBER] http://msdn.microsoft.com/library/default.asp url=/library/en-us/dv_foxhelp9/html/7e83da43-86c1-4b0d-a00d-ea412382331f.asp ...Show All
Windows Forms Error initializing form containing button with image
When I set the image field of a button on my form, I get the following error when my form is initializing. A first chance exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll Additional information: Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "Form1.resources" was correctly embedded or linked into assembly "test2". baseName: Form1 locationInfo: test2.Form1 resource file name: Form1.resources assembly: test2, Version=1.0.2162.17278, Culture=neutral, PublicKeyToken=null The statemen ...Show All
Visual C# Check If a network computer exists
Back once again, I am now looking for a quick way of returning if a given computer exists on the network. I am working on a webpage that scans the network and displays the amount of time since last boot. I currently use if (System.IO. Directory .Exists( "\\\\" + Machine + "\\c$" ) == true ) however it is slow if it runs across a computer that does not exist. Is there a faster way just to check it a computer exists Hi, have you tried System . Net . NetworkInformation . Ping which is part of .NET 2.0 Greetz, Finch82. ...Show All
Visual Studio Express Editions string question
Hello, I'm in a situation where I need to make sure a string contains only letters and numbers, no spaces or symbols. How can I go about this All I can get is one at a time if (this->mytextbox->contains(" ")) (MessageBox::Show("Only letters and numbers, please.")); maybe a for loop to check each char is !isalpha then if not !isalpha check if its a number and if not then error Hell i can not even do an Array so maybe best not take my advice ...Show All
Visual Studio Team System Unit Testing Forms - Accessing Controls
I'm unit testing an extremely simple VB form with a button and a text field. My test method looks like this: <TestMethod()> Public Sub btnHelloWorld_ClickTest() Dim target As Form1 = New Form1 Dim expected, actual As String target.Show() target.Activate() Dim accessor As HelloWorldApplication_Form1Accessor = New HelloWorldApplication_Form1Accessor(target) accessor.txtWorldID.Text = "1" expected = "HelloWorld1" Dim sender As Object = Nothing Dim e As EventArgs = Nothing accessor.btnHelloWorld_Click(sender, e) actual = accessor.lblWorldText.Text Assert.AreEqual(expected, actual, "The value returned is not correct.") End ...Show All
Windows Forms Terrarium 1.2 not showing any text on buttons?
I just installed Terrarium 1.2 and noticed there is no text on the buttons. Is this a known problem Is it because I've ClearType enabled --Dion Hi guys, Don't click on the link as you will get the JIT Debugging dialog with the exception occurred message. Select and right-click the link instead and choose 'save target as' and follow the a ...Show All
Visual Studio Tools for Office Find() and Autofit() issues
I have 2 questions related to the Find() and Autofit() methods: I have a VSTO application that opens an Excel.Workbook wb, goes through all the worksheets via "wsCurrent = wb.Sheets as Excel.Worksheet", and then uses the Find() method on a specific column ("rngFoo = wsCurrent.Columns["A",missing] as Excel.Range") to find a value. I have applied the same logic to different type of columns successfully, except with one because the Find() function is not able to find a result. The only difference with other columns is that the values in this column represent a number with 9 digits. The worksheet was exported from a text file. Th ...Show All
Visual Studio Express Editions remote
hello I have a haupage remote for my win tv and i was wondering if it would be possible to controll things in my program with it. when i open itunes i can play pause/ other stuff. so could i controll other things in my program with code like turning the caps lock on or off with the play button. thanks average joe Email them again, and tell them you are interested in a Software Developer's Kit. The code samples may be in C or C++, but, some things can be converted. It will depend on the drivers for the remote interface. Most of those devices use an IR detector that is connected thru a USB port. There is i ...Show All
Software Development for Windows Vista Getting Return Data from a sub Workflow
Hello. I am calling a sub workflow from a work flow via the "invokeWorkflow" shape. Here is my problem. The sub workflow returns a value that is displayed via a web service. How can I retrieve that value from the sub workflow in the main workflow The master web service passes a value into the main workflow, and that value is in turn passed in the sub workflow so that it can perform its work. Now I need to get the return value back. Any help would be appreciated. Thanks. Hi Greg, The InvokeWorkflow activity executes the target Workflow asynchronously, and there is no provision in the I ...Show All
Visual C# FileSystemWatcher - InternalBufferSize
Hi, Using VS2005, C# - project is a converted VS2003 service program. I have a problem setting the InternalBufferSize of a FileSystemWatcher object. I've created a service program to monitor a folder for changes. I instantiate the FileSystemWatcher then apply the path, etc settings. Finally I set the InternalBufferSize property to 16384 and enable the FileSystemWatcher. The project builds fine but when I start the service I get an error message saying the path is in an invalid format. If I remove the change of the InternalBufferSize property this error does not occur. Is there a sequence I should follow for assigning the ...Show All
