Daniel Reis's Q&A profile
Windows Forms Minimizing the Window
Hello I'm starting a visible process of NOTEPAD using the class System.Diagnostics.Process. When i launch this process i want the windowstyle to be minimized. I have tried using the following code but it doesn't seem to work. I mean notepad is launched but it is not getting minimized. ProcessStartInfo startInfo =new ProcessSt ...Show All
Visual C++ DeviceIoControl does not work when query LCD brightness
Hi, All I wrote a test program to get/set the LCD display brightness. I followed instructions on MSDN as http://msdn.microsoft.com/library/default.asp url=/library/en-us/power/base/ioctl_video_query_supported_brightness.asp but it seems that DeviceIoControl with IOCTL_VIDEO_QUERY_SUPPORTED_BRIGHTNESS always fails and GetLastError() reports error code 2: system can not find the file specified; If I call DeviceIoControl with IOCTL_VIDEO_QUERY_DISPLAY_BRIGHTNESS, it succeeds but the number of bytes returned is zero. I don't know what is wrong. Can anyone explain why Thanks in advance. Chris below is the code of the test program: -- ...Show All
Visual Basic Cross-thread operation not valid
Please tell me that you are going to fix this before the official release!! I am using VB not C++. I really shouldn't have to care that my code is not running in the same thread as the one that created the form that contains the control that I am trying to update. Please fix this or at least have some real examples that show how to update a control on a form. The examples that I found were not helpful at all. or, you could just set ystem.Windows.Forms. Control .CheckForIllegalCrossThreadCalls = false and all your cross threading problems go away. ...Show All
Windows Forms Embeded WindowsMediaPlayer has bugs
Summary: The AxWMPLib. AxWindowsMediaPlayer object seems to have bugs and becomes unstable. Question: Is there a bug on the Active X wrapper that is generated by Visual Studio Do anyone know of a workaround Background: I am using an embedded Windows Media Player in a form. I got the player onto the from via the VS Designer. The instance of the player object is of type AxWMPLib. AxWindowsMediaPlayer m_player . When I set the URL property (e.g. m_player.URL = "c:\my_wav_file.wav" ) the player starts playing but then after a few seconds the progress bar of the player jumps back to the beginning and becomes grey (d ...Show All
Visual Basic Using sender as a case in Select Case Statement
When my form loads it adds some handles (using AddHandler ) to a sub ( showStatus ). What this sub does is checks which control activated the sub (using sender.Equals ) and displays text in the status label ( status ) accordingly. For this I use an If...Then statement for each possibility. There are many possibilities and my code get cluttered. Is there a way to do the same thing with a Select...Case statement. I tried: Select Case sender Case tbOne : status.Text = "blahblahblahblahblahblah" End Select where: tbOne is a textbox, status is a StatusLabel It gives me an error though, saying " Operator '=' is ...Show All
SQL Server using ssis to generate load
hi. i'm trying to use ssis for something it wasn't meant for (i think)... which is load generation. I have a table which has exec sql statements. I want to load this table, multicast the statements into x recordsets, then get x sql connections and execute these statements. so far i can load the table, and multicast it into x recordsets. But i can't figure out how to execute these statements by getting them out of the dataflow and into control flow 'execute sql' task.... i'm i on the wrong path thanks! PugV wrote: yes, the number of statements is known.. No problem then ...Show All
Visual Studio Team System Is there a way to check Modified Code only?
I don't know if this is possible at all. However, I'm using fxcop with CruiseControl and have been looking for a method to only check new code for violations. We have an older system which has a large amount of legacy code which probably can not be refactored for the time being. However, I want to ensure that developers are checking in fxcop approved code. And have a large list of issues is making this job rather difficult. I must manually view the files that they have altered to determine if they have checking in proper code. So is there a way to tell fxcop to only check modified files or even modified pieces of code only ...Show All
Visual Studio 2008 (Pre-release) DLinq and NTEXT columns
I know SQL Server is deprecating them (someday), but the following currently does not work... CREATE TABLE Thing ( Id INT, Title NVARCHAR(200), Description NTEXT -- Change to NVARCHAR(MAX) and this will work ) [Table] public class Thing { [Column] public int Id { ... } [Column] public string Title { ... } [Column] public string Description { ... } } Try to update an instance of Thing... UPDATE [Thing] SET [Title] = @p3 FROM [Thing] WHERE ([Title] = @p0) AND ([Description] = @p1) AND ([Id] = @p2) [...] which leads to SqlException "The data types ntext and nvarchar are incompatible in the equal to operator." ...Show All
Visual Studio Express Editions accessing processes running in the remote machine
hi i need help.. is there any possibility to retrive a process information which is running in the remote machine is there any possibility to run a process (application) in the remote machine is there any possibilty to calculate the load of CPU whren a process running in a machine rely as soon as possible... it very urgent Hi, The below link should be the one you are looking for.Hope this resolves some of your problems. Link: http://www.dotnet247.com/247reference/msgs/56/280731.aspx If you think your post is answered then please mark it answer. Thanks! Bhanu. ...Show All
Visual Studio Compact Framework 1.0 SP3 - Error Code 1618
I have tried installing Visual Studio 2005 on two different machines under Windows XP SP2 and have gotten voluminous errors reporting that a component could not be installed because it was currently being installed by another process. After ONE WEEK of experimentation I have gotten it down to one single failure ... & ...Show All
.NET Development how to display xml File key and values ?
I am trying to display the xml key and values, and I have a code written up and seems to work, but I need to use xmlnode, xpath and xmldocument. ANyone out there Here my code that works with out the use of it, using System; using System.IO; public class ReadXMLFile { public static void Main(string[] args) { try { // Create an instance of StreamReader to read from a file. // The using statement also closes the StreamReader. using (StreamReader sr = new StreamReader(args[0])) { String line; String mkey; String mvalue; // reads and displays values of the file until the end of the file is reached ...Show All
.NET Development Regarding Assembly Versioning
I have two different versions of same assembly both are in GCA, how to call a method from the specific version of assembly from the program. Can some one give valiable time for this question. Thanks in advance. ...Show All
.NET Development Can Client built in .NET F/w 2.0 call remote object developed in .NET F/w 1.1?
Hi, I have a windows service already developed and has a interface exposed via remoteable object. I connect to this windows service using remoting. This service is developed using Visual Studio .NET 2003 with .NET Framework 1.1, SP1. Now I want to develop a UI using Visual C# Express 2005 which uses .NET Framework 2.0. I have doubt whether my new application developed in .NET Framework 2.0 will be able to talk to remote object developed in .NET Framework 1.1 Thanks, Vinod Use of binary formatter insuch scenario especially while dealing with Deserialization is a reported bug. http://lab.msdn.microsoft.com/ProductFeedback/ViewWorkaro ...Show All
Visual Studio Team System other recurring TFS errors in event log
for some reason at about 3:15am this morning my TFS server started spewing the following sequence of errors: #1 ================================================== Soure: VSTF Source Code Control An exception has occurred in a Team Foundation component. Technical Information (for the administrative staff): Date (UTC): 5/6/2005 2:32:02 PM Machine: DPMSERV1 Application Domain: /LM/W3SVC/4/Root/SCC-4-127598594375000000 Assembly: Microsoft.VisualStudio.Hatteras.Server, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Process Details: Process Name: w3wp Process Id: 6136 Thread Id: 27 Account name: ICDPM\TFSSERVICE Det ...Show All
Visual Studio Express Editions Managing exceptions in a backgroundworker
Hi, I'm using a backgroundworker (in VSE2005 for C#) and have the following problem : In the 'dowork' method I have a try/catch that handles exceptions that might occur and then rethrow them for the 'workcompleted' method have a proper error state. The problem is that when an exception occurs, I get an unhandled exception error message pointing to the 'throw ex;' in the catch block (see code below), because of course ex is not being handled, at least not right there. The problem is that in order to test for the error status of you background _dowork method in your 'workcompleted' method you rely on the RunWorkerCompletedEventArgs ...Show All
