jayakhanna's Q&A profile
Windows Forms filepath location with ListBox question?
Hi all, I have a ListBox that loops through folders searching for specific files & adds them to the list box... only problem is I only want to display the file name & store it's location as well private void Form1_Load( object sender, EventArgs e) { foreach ( string file in Directory .GetFiles( @"C:\ApplicationFolder\Data" , "*.resx" , SearchOption .AllDirectories)) listBox1.Items.Add( new FileInfo (file).Name); // list the file name only in ListBox //listBox1.Items.Add(new FileInfo(file).FullName); // list entire filename path in list box... not what I want } private void listBox1_SelectedIndexChanged( object sender, EventArgs e) { textBox1 .Text = Path .GetF ...Show All
Audio and Video Development WMEncoder TimeCode
Hi all. I use WMEncoder ActiveX Plugin to broadcast live video stream . The source is web cam. On client side I use WMPlayer ActiveX plugin. On client side I get current timecode like this: (WindowsMediaPlayer1.controls as IWMPControls3).currentPositionTimecode now question: How can I get current TimeCode at the Encoder side I try to get sample count from Encoder stats: WMEncoder.Statistics.StreamOutputStats[WMENC_VIDEO, 0, 0] as IWMEncOutputStats2.SampleCount and then generate timecode using average sample rate. function TForm1.GetServerTimeCode: TTimeCode; var Stats: IWMEncOutputStats2; Frames: Cardinal; FrameRate: Extended; TotalSec: Cardinal; TotalMin: Cardinal; TotalHours: Cardinal; begin Stats ...Show All
SQL Server What's the performance difference between WITH and a subquery?
Hello Everyone, Does anyone know if there is a performance difference between the new WITH clause t-sql and the subquery On a basic functionality level, they seem to perform the same function but I was wondering if there are any performance difference between the 2 Thanks, Joseph I'm guessing that you mean 'common table expression (CTE)' .. In BOL: ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/4acf8a3e-6dcc-420c-9088-9c57b976113e.htm may hold the info you're looking for. /Kenneth ...Show All
Visual Studio 2008 (Pre-release) Expressions Invoking Other Expressions
Hi all, I've been playing with the LINQ May CTP. I'm particularly interested in the expression tree stuff. It looks really great, but there is one aspect that is not quite working the way I had hoped. I'm posting to see if I'm missing something or if this is likely to be addressed in the future. Ok, so I can write a lambda expression like this: Func<int, int> add5 = x => x + 5; And then I can write another lambda expression that uses that one: Func<int, int> add5AndDouble = x => add5(x) * 2; This all works great. Now let's say that instead of working with delegates I want to work with expression trees. I'd like to be able to do the exact same thing: Expression<Func<int, int>> add5Tree = x ...Show All
SQL Server SQL Server Terminated with AV Error
Hello Experts, One of my SQL Server is terminating with the following Access Violation Error... SQL is patched with SP4... Windows 2000 Server SP4... Server has 1 GB RAM. 700 MB has been allocated to SQL Server (Fixed Memory), SQL Hangs afters this AV and it requires Service Recycle... Sometimes, it automatically recycles the SQL Server... Can anyone help me if you have fix for this type of situation... *Stack Dump being sent to E:\MSSQL\log\SQLDump0002.txt * ***************************************************************************** ** * * BEGIN STACK DUMP: * 09/27/06 12:40:08 spid 0 ...Show All
Windows Forms Cannot get custom action to build in my setup project
Uggh, This seems like it should be so simple. I've created a Win32 dll, with an exported function as follows: UINT __stdcall Uninstall ( MSIHANDLE hModule ) { /* display's a msg box 4 now */ } Then I created a .def file for the project that defines the export as follows: LIBRARY "UninstallCustomActions.dll" EXPORTS Uninstall This builds fine, and I can use dll explorer tools to examine the exported functions, and mine is there and looking good. However, now I add this project output (I tried adding the dll directly as well) to the installation project, create a custom action for uninstall and select this dll. I set the EntryPoint property to Uninstall, and make sure the InstallerClass property ...Show All
Visual Studio Team System Attempted to perform an unauthorized operation while publishing
When trying to publish the results from a webtest to source control I get the message of "Attempted to perform an unauthorized operation". I get this message in the Test Results window under the Error Message column. We can not find a problem with permissions on the server side and hoping that someone here might have a suggestion. Thanks Thank you very much for your reply. We have double checked permissions and still am getting the error. We actually do have the tool you suggested. Any other suggestions would be appreciated. ...Show All
Visual Studio ComReference with MSBuild
Hi, I have a Problem with the ItemGroup < COMReference/>. Don't no how to import it in my Target. This is an example of my Projectfile: < ItemGroup > < COMReference Include = " AxNETCTLS " > < Guid > {B389A272-627E-42D5-BAE0-17DAE287E82A} </ Guid > < VersionMajor > 1 </ VersionMajor > < VersionMinor > 0 </ VersionMinor > < Lcid > 0 </ Lcid > < WrapperTool > aximp </ WrapperTool > < Isolated > False </ Isolated > </ COMReference > < COMReference Include = " b0msgBase " >< Guid > {03D53343-B90E-4471-9521-BCC0CA44CB78} </ Guid > < VersionMajor > 1 </ VersionMajor > < VersionMinor > 0 &l ...Show All
Visual C# Trying to determine Class by a string value
I'm having a DUH moment here and hopefully someone can answer it before I'm bald... I have a string that contains the name of the class and I want to create a new instance of the class that's referrred to. I have: string classToUse = "StartMeUp"; I have a class called StartMeUp that does some function... Of course, I want to create a statement similiar to: StartMeUp smu = new StartMeUp(); However, I've forgotten how to use the string to get to an object name... any helpers out there You're correct... when I tried it, I couldn't come up with logic to do that step, but due to having a short deadline for the prototype, I implemented a switch to determine which class to run, although I'm going to try this ...Show All
Software Development for Windows Vista How to install additional filters into the XPSDrv Filter Pipeline.
There are a number of references in the documentation that suggest it should be possible to add additional filters, beyond those supplied by the printer driver's manufacturer, to the pipeline. Specifically, the latest Windows Driver Kit (build 5744) says this (on the topic of Filter Pipeline Configuration File): Vendor driver functionality should be primarily in R1 (print processing) and R3 (rendering). You should limit Administrator modification to R0, R2, and RE. The separate regions allow filters from several pipeline configuration files to be combined together in a deterministic way. A separate pipeline configuration can, for example, specify a watermark and an accounting filter that are to be inserted into every dri ...Show All
SQL Server Addicted to Stored Procedures: A time series problem. Is it possible?
It's been about two weeks since I first began using SQL Stored procedures and now I am thinking already about changing many of my plans and doing those operations in them. There is a problem I want to address and see if it is possible to accomplish it in SQL Server instead of the client C# code. I have a time series. In simplified presentation it is a table of two columns. The first one is float, the second is DateTime. There might be quite a few rows in the table: A1 ... DT1 A2 ... DT2 ................ An.... DTn What I need to do is to find patters among A1,A2,....An elements. They vary in magnitude in a rather random order. They constitute what some would call a Markov chain. I demonstrate what I want in a couple of real life example ...Show All
Visual Studio Shared Memory Provider: No process is on the other end of the pipe.
I'm unable to install SQL Express 2005 on a windows 2003 server. I have installed it on several 2003 servers, but for some reason, the one I need it on will not install. I have tried the manual install, and the command line install. Both give the same error. Setup gets to the point where it is configuring the server, and then I get the following error. SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client]Shared Memory Provider: No process is on the other end of the pipe. At this point in time, I can go to services and see that the SQL Service is running, so it has started. However, upon failure, when I hit cancel, the process ro ...Show All
Visual Studio Team System The good, the bad, the ugly
Good: First let me tell you this has already been very useful to me. When I set up our transactional replication in SQL 2005 the nonclustered indexes weren't replicating properly (even though I set the option through the GUI). Obviously the replicas were slow and since they were being used, I was unable to try to recreate the replication schema. Instead I whipped up Database Pro and did a schema compare on our publisher and subscribers and scripted out the non-clustered index. It worked perfectly and I was able to apply the scripts on our replicas. Thanks. Bad: However we are creating a new database (actually 4 different databases) in SQL 2005 using schemas, CLR, and Service Broker. I simply imported the entire database schema fro ...Show All
Microsoft ISV Community Center Forums key in date and filter the data in a week
Hi all, I have question on VBA which is quite difficult for me. I need a VBA code that can filter out all data in a specific week after i type in a date, any date within that week in a textbox which i have previously created. For example i have a table of dates corresponding to number of week: Week 1 02-Jan-2006 09-Jan-2006 Week 2 09-Jan-2006 16-Jan-2006 Week 3 16-Jan-2006 23-Jan-2006 Week 4 23-Jan-2006 30-Jan-2006 Week 5 30-Jan-2006 06-Feb-2006 Week 6 06-Feb-2006 13-Feb-2006 Week 7 13-Feb-2006 20-Feb-2006 Week 8 20-Feb-2006 27-Feb-2006 Week 9 27-Feb-2006 06-Mar-2006 and ...Show All
Visual Basic vb.net vs vb6 pros and cons help
Hi there i am a seasoned vb6 and vb.net developer and where i currently work, they use VB6. Now, we develop a range of office plugins for a client, and they currently use vb6, they also do some other projects with vb6. I want them to change to vb.net They have asked me for a list of Pros for switching, and also some Cons. The pros i have are: .Net is future proofed, VB6 will not be supported by Microsoft for much longer One standard platform to run on (.Net) removing problems of windows versions and missing dlls full OOP support and a generic Api for office application development. Integrate seamlessly with Java using bridging components (they are primarily a java house) Quicker performance On event app ...Show All
