Jamie Thomson's Q&A profile
Visual Studio Express Editions How can I destroy a COM object?
I am using the FilgraphManager and I can't figure out how to get rid of it after I use it. The following simple code shows my problem. I render a video with the Command1 Button and start the Graph playing. I would like to destroy the Graph with the other Button; Button1. Setting the FilgraphManager to Nothing just breaks my reference to the Graph. Option Strict Off Option Explicit On Friend Class Form1 Inherits System.Windows.Forms.Form Private FileName As String Private FGM As QuartzTypeLib.FilgraphManager Private Pos As QuartzTypeLib.IMediaPosition Private Vid As QuartzTypeLib.IBasicVideo2 Private VidWnd As QuartzTypeLib.IVideoWindow Public Sub RndrFile() Me .CommonDialog1Open.S ...Show All
Visual Studio Team System Post-SP1 Install Issues
Hello, I completed installation of Team Server SP1 yesterday on a single-server deployment using the Workgroup edition (5 user limit). I installed the prerequisite from KB919156 and did not run into any additional installation problems, the process completed successfully. At the moment, everything appears to be running properly. I can connect to the Team Server, download projects, etc. However, I rebooted after completing the installation, and on startup I am seeing multiple error messages in the application log. The exception message for the errors shows as: Cannot open database "TfsIntegration" requested by the login. The login failed. Login failed for user 'OSCAR\TFSSERVICE'. (type SqlException) The errors all se ...Show All
Visual Studio Express Editions convert ms-dos console application to windows application
I have a single application using console in C# . When I run my application, it is running in dos window. I want to convert this application to windows application. I mean, when I start application, It must be work a windows application. Do You know any simple way to do this Is there any convert application Thanks.. you cant quite convert the application since you would be writing really to the console and accepting inputs via the console. you could try changing the output type in the project properties to Windows Application - this will bring up the Windows application form. You need to also in the program.cs file, class file, need to run the form... Application.Run(new Form1 ()); ...Show All
Game Technologies: DirectX, XNA, XACT, etc. A Simple grid component
I created this self contained grid and figured someone may find it a useful starting point. [ code language="C++" ] using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Components; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; namespace XNAEngine { public class SOGrid : Microsoft.Xna.Framework.GameComponent { // This is how you would add camera control to the grid component /*private myCameraComponent camera; pub ...Show All
Software Development for Windows Vista Invoking the Card space UI
Hi I am having a scenario where my Client UI should invoke the card space UI and this is followed by the user selecting a card and retriving the security token from a STS, the Security token is in turn given back to client UI.... I am able to load the Card space UI using the " CardSpaceSelector " but iam actually unable to make the card space to talk to the STS and get the security token of the selected card. is this possible need help regarding this. Regards Raguvind Ganesh Hi, I think, this could answer your question: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=793761&SiteID=1 ...Show All
SQL Server Fix matrix column and IF-ELSE statement
Hello. I have to questions - 1) I have a matrix in my report and I want The group column to be fix so if I have a lot of columns and I scroll left the Header column will stay in the left of the screen and only the result column will be scrolled. How can I do it 2) How can I use a IF-ELSE statment or a CASE in the expression I want one of my column to be red if the value is "1", green if the value is "2" and blue if the value is "3". Is there a way to do it Thanks in advance. Andy - you are the man :) Thanks a lot pal, I looked for ages for this solution! Its exactly what I needed and now I can sleep well again :) Thanks and take care, Roy. ...Show All
Visual Studio Team System System.History question
I am trying to do the following: workItem.History = ""My first line. \r\n My second line." workItem.Save(); The problem is, when I create this work item it looks like this in the History: My first line. My second line. Notice that no line break occurred. How do I add line breaks via C# into the System.History type programatically Thanks, Ethan ...Show All
Visual C++ i++ or ++i which one efficient
Hi, which of this statement is efficient i++ or ++i; i tried hard to find the answer but i am getting many explanations i am not able to find the correct answer. .help me manish sharma pre increment is more efficient suppose you want to overload the operators, this is how the implementation goes for complex class Complex & Complex :: operator ++() //Pre increment { ++ imag ; ++ real ; return (* this ); } Complex Complex :: operator ++( int ) //Post increment { Complex temp (* this ); //first call to copy constructor ++ temp . real ; ++ temp . imag ; return temp ; //second call to copy constructor(since not returning by ...Show All
Visual Studio Crystal Report Error
Hello, I'm getting Crystal Report Exception on opening a report after it's exported to a file. I've a button on my form that calls following method, which opens a report in Crystal Report Viewer component. The report fails to load only after I use Crystal Report Viewer "Export" button from the viewer. It export the file for me, but when if I click Button to run my report, I get an exception. ----- Method ----------- private void loadReport() { ReportDocument rpt = new ReportDocument(); rpt.Load(@"CrystalReport1.rpt"); crystalReportViewer1.ReportSource = rpt; // show crystal report control crystalReportViewer1.Show(); this .Refresh(); } ----- Method ----------- ...Show All
Visual Basic Delete Prefetch Folder Contents
I want to be able to delete the windows prefetch folder. However i don't know what's the right word to use so that the system finds automatically the right folder since not everybody installs windows on drive C:. i think it's %systemroot% but i'm getting an error. So please, enlighten me. Here's my code. Dim file As String For Each file In System.IO.Directory.GetFiles("%systemroot%\prefetch") System.IO.File.Delete(file) Next file try this: Dim file As String Dim SysFolder As String = Environment.SystemDirectory & "\prefetch" For Each file In System.IO.Directory.GetFiles(SysFolder) System.IO.File.Delete(file) Next file What error are you g ...Show All
Smart Device Development Lock Device
I have a Windows Mobile 5 PDA (Dell Axim X50v). I want to make a program (in Vb2005 using WM SDK) to create a program that locks the device using the method built into windows mobile. That is my first objective. My second objective is to make the app run from the today screen or system tray. I have searched these forums but the only "lock device" related topics are about people making their locking programs, when i want to use the one built into WM Thanks in Advance, James Does anyone know what the value is for P OWER_STATE_PASSWORD E.g: &H100 Or in numerical format ...Show All
Windows Forms Windows installer launch condition
Hi Guys, I am trying to create a setup and deployment project in VS 2005 for a windows form project. A couple of dependencies for my application are - 1) .NET framework 2) ActiveState Perl 5.8.8 I have been able to successfully add the .NET 2.0 framework check to the launch condition. I've also added the Active Perl check but its not working right. I mean, I get a "perl not found" error even on systems where the perl is installed. How should I correct this behavior Its probably something in the Condition check that I'm messing up. Here are the properties I have for perl launch check - (Name) ActiveState Perl Condition Installed InstalllUrl <url> Message Perl could not be found. Please install ...Show All
Visual Basic please help
im trying to write a application that reads 3 nonzero values when i enter then and the applications determines wheather they could represent the sides of a tirangle When doing a SSS (Side, Side, Side) comparision the following statement is mathmatically correct: 'The sum of the measures of any two sides of any triangle is greater than the measure of the third side. Therfore when just given the length of three sides of a triangle you can check whether or not they can be made into a valid trianlge with the code given...if doing any calcualtions based upon angle AAA, ASA, SAS etc...then yes basic trig would be neccessary.... the pythagorean therom and law of cosines come into play ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How do I position the ball to the center of the screen?
Sorry newbie question here! ^_^' I started the tutorial in Help and I got my sprite to appear on the screen but it is in the top left corner. How do I make my sprite to appear in the center instead of the top left Any help would be much appreciated. Thanks, Nodoka ------ New question. I got my sprite to appear in the center of the screen. How do I get the sprite to move in a random direction when I compile and run it Here is my code currently: #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framew ...Show All
Windows Forms Restart app after autodownload/install of patch
Hello, I am working on packaging and deployment for a number of C#/.NET 2.0 applications. We would like to have them automatically check for and install updates over the internet. The code is currently in place to do most of this, but I'm having trouble figuring out how to restart the application after the patch is installed. I would like to have the process go something like this: Application is started Application checks for updates, and finds one is available The update (an MSP file) is downloaded to the user's machine The application starts msiexec to install the patch in a new process then immediatly terminates The patch is installed The application is automatically started again I have had some limited success starting an applicatio ...Show All
