Michael Hansen's Q&A profile
Windows Forms Bootstrapper problems
Hello all, I've been trying to figure out this problem for a while... it should be extremely basic, but I've looked on the MSDN website and in a vb.net book, and still can't find the answer. I've download the .net bootstrapper, but i simply can't figure out (for the life of me) how to use it, or how to change application settings etc. How do i do this! Thanks so much! Sorry for such a dumb question -Robert Are you referring to the VS 2003 bootstrapper here http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnnetdep/html/vsredistdeploy1_1.asp VS 2005 has one built in. ...Show All
Visual Studio 2008 (Pre-release) custom control problems
i am writing a custom control to draw a series of polylines. i've managed to create a nice little program that does just that (and also draws the equivalent bar chart :-) ) but i am having problems converting this to a custom control. my first problem is that i do not know how to create DP's for an unknown number of user defined variables. for example i want the user to be able to say something like: <LineChart .........................> <Line> <"series of points"/> </Line> <Line> <"series of points"/> </Line> .................. </LineChart> (the reason for having any number of lines is that i want to be able to add and delete lines at runtime) my initia ...Show All
Windows Forms Tab text length
Hey, How do you make it so if the length of text int he tab is more then 19 text charicters then after 19 it will put: ... Thanks :) Is that C# becuase I got ALOT of errors, and I dont think Then is C# becuase I could never get it to use Then... Ya I think that is Visual Basic, could you give me it in C# please Thanks :) ...Show All
Visual C# How to check a data stream every 5 seconds
I have a program that checks a streaming data feed every 5 seconds, then makes some calculations and then fires some events, then back to checking data. What is the best way(most efficient) way to do this. Here is my basic structure, however my program freezes after running for more than a few hours(I want to run it 24 hrs a day) I know that multithreading is needed but not sure how to do this. Basic structure: Main program Get Data Calculations Do events loop back to Get Data Thanks in advance. sure. Well yes threading is required here. Take a look here more about threading: http://msdn2.microsoft.com/en-us/library/system.threading.threadstart.aspx http://msdn2.microsoft.com/en-us/library/syste ...Show All
Visual Studio Team System How to define a conditional transition?
Is there a way to define a transition that's only available in the dropdown if a certain condition (say, assigned to someone) is met Thanks a lot Naren. I don't know if you had a chance to look at my other thread http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=597444&SiteID=1 . I was hoping that a conditional transition would solve the problem I posted in the last mesage in that thread. Thanks again. ...Show All
SQL Server Poor performance querying view from sproc
We are using SQL SERVER 2005. We have been experiencing horrible performance running select queries from sprocs against views that do outer joins, despite having optimized all of the indexes. Our solution in these cases (and arguably not the best) has been to first select the views into a temp table and then query the temp table for the desired result set. This has greatly improved the speed of which our sprocs run, but we are looking for a better solution. Has anybody else experienced this problem Thanks in advance. We have experienced exactly the same thing. Queries which work fine in 1-5 seconds on SQL 2000 SP4 either run very long or never finish in hours under SQL 2005. I have posted sever ...Show All
Software Development for Windows Vista How to add manifest to setup.exe file?
How do I add or embed a manifest to a non-self-containing bootstapper or chainer (setup.exe) file. Please help me with some examples. You can do that with Visual Studio. Look in the project settings. If your application is .NET, you will have to add the necessary command line as post build. I recommand you using thememe.exe as the manifest injecter tool provided with VS2005 has bugs. http://www.msjogren.net/dotnet/eng/tools/default.asp ...Show All
Visual Basic How to Delete Specific String From a Flat File
Hello, I have some code that reads each line of a fixed width flat file, and if a line is found where the length of the string is > 384, it writes the line to a text file. The other step that I need to take is to delete the line from the source file. The code is as follows; -***************************************** Public Sub Main() 'find the records where the string length is greater than 384 'write them out to a file 'delete them from the source file Dim oFile As System.IO.File Dim oRead As System.IO.StreamReader Dim oWrite As System.IO.StreamWriter Dim LineIn As String oRead = oFile.OpenText("C:\Learning\SettlementDataTest\SC15_Copies\SingleFile\CDNSC.CDNSC.SC00015.11062006") oW ...Show All
SQL Server Using Except function without aggregation (ssas 2005)
Hello, I recently got help in getting the except function to work... Here is the solution provided by Deepak. (The requirement is to calcuate active head count of employees excluding two departments) SUM( Except([dimensionEmployee].[Employee Department].[All].Children, { [dimensionEmployee].[Employee Department].&[Services], [dimensionEmployee].[Employee Department].&[Leadership] }), [Measures].[Active Employee Head Count]) Now, how do I get the except function to work "without" the aggregation Any help is greatly appreciated.. Thanks, Ganesh Hello Deepak, I am trying to provide break down numbers on head count by department (excluding the two departments).. The sum function (y ...Show All
.NET Development VB - C# Reflection Help
Hi! I am trying to port a VB.NET Dundas email example to C#, but I am not clear on how to convert two lines. VB: '============================================================================ ' Build and send the email '============================================================================ Set objEmail = Server.CreateObject("Dundas.Mailer") objEmail.SMTPRelayServers.Add "mail.myurl.com", 25, "myurl.com" objEmail.TOs.Add " to@ myurl .com " objEmail.FromAddress = " from@ myurl .com " objEmail.Subject = "Sign me up!" objEmail.Body = "Body Text" objEmail.SendMail Set objEmail = Nothing C#: '================================================================= ...Show All
Software Development for Windows Vista Property Binding and Dynamic Activities
This forum has been invaluable in terms of my efforts with WF. However, I'm fully stumped now! I have a sequential WF that essentially is a sequential approval process. Upon creation of a new workflow, I employ WorkflowChanges to create one or more dynamic custom approval activities, which is driven by the identity of the user. This works great! However, I need to bind one property (custom object called Training) within each dynamic approval activity to a Training property that exists in the sequential workflow. Here is what I know: 1. I cannot declaratively bind the Training property of these custom approval activities to the workflow at compile time since they are dynamically created at runtime. 2. I cannot programmatically bi ...Show All
.NET Development Memory leak in SerialPort.Read?
Hi. I communicate with the serial port on my ”PDA/smart device” to another device (custom circuit board). The PDA needs to send data at least once a second to the hardware just to confirm that there is a connection; If not the hardware shuts down. The PDA also receives information from the device witch is displayed. The problem is that when the PDA receivea data, the application starts to leak memory. After 30 minutes to an hour the garbage collection procedure takes so much time that the communication halts for several seconds, witch in turn causes a timeout. Could there be a problem in the SerialPort.Receive() or in the garbage collector. Most likely I have done something wrong… Here is a simplified ...Show All
.NET Development Mdbg 2.0 extended for distributed user (client/server)
Hello. I've got with me a completed work of extending Mdbg 2.0 with remoting (distributed, named Rdbg here) which I would like released into the wild. - Multiple simultaneous users, login with passwords and custom colored text - Server executes all commands by the clients, sends back responses - Client sees all server activity, files loaded and processes attached through server - Basic chat support - Implemented code is seperated from Mdbg's main code - How to use it and suggested limitations are documented - Near working GUI support by default, menus only need to be redirected - Some hacks on the main code were done to have it all working nicely Where should I put it Who should I give it to I am sure someone can make use of ...Show All
SQL Server Query much slower on 2005 compared to 2000
We have a database developed using SQL Server 2000. We are in the process of testing it on SQL Server 2005. So far i've not done much testing but it has become apparant quickly that quite a lot of queries are performing much slower in SQL Server 2005. I am currently trying to figure out why a particular query is not performing well. One SQL Server 2000 it runs in around 6 seconds. On SQL Server 2005 it takes around 50 seconds. The query is this... SELECT StartBase, StartPoint, PickupPoint, PickupInstructions, SingleJourney, Destination FROM vwJobs WHERE StartDateTime BETWEEN '2006-09-01' AND '2006-09-23' vwJobs is a view in our database. The view includes many UDF's and also has a UNION which combines two seperate table structures ...Show All
Software Development for Windows Vista IMediaDet interface - access violations
Hi all, I've written a DirectShow app to sample frames from various video formats and capture the frames as bitmaps. It works but I'm getting access violations when I use the IMediaDet interface. I create it using: CComQIPtr<IMediaDet> pMediaDet; HRESULT hr = ::CoCreateInstance(CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER, IID_IMediaDet, ( void **)&pMediaDet); When I create my sample grabber I use IID_ISampleGrabber and not IID_BaseFilter (which I know can cause access violations). The IMediaDet functions: put_Filename, get_OutputStreams, put_CurrentStream and get_StreamType are fine. However the functions get_FrameRate and get_StreamLength have access violations. I've searched the forum and found that someone else had ...Show All
