Jeff Stouse's Q&A profile
Silverlight (formerly WPF/E) Questions on WPF/E
Hi, I have been reading blogs on WPF/E and it's has got me pretty excited: I had a few questions on it: 1) I plan to use WPF/E to design a kind of user input form (WPF/E to get better user interaction - do something funky) - Can this be done 2) Can I make call to webServices from WPF/E application to process data, Is there any built in support 3) What are the things I could do in WPF/E which cannot be done in Flash - i.e. what is it that would drive people to migrate from Flash to WPF/E. Thanks in advance. Regard - A..K My post on this may help. Also, see Mike Harsh's post here may help as well. Related to web service support, we don't have built-in web service sup ...Show All
Windows Forms Datagridview Master / Detail Highlight Rows
Hey Guys, I currently have a master / detail form with two datagridviews, which is working nicely. However the main grid shows transactions, and the child grid shows comments. Not all transactions carry comments, infact very few do. I decided to separate the grids by a splitter and hide the child grid. I'm trying to find a way to flag / highlight the parent grid if it contains child rows so the user knows there is a comment if they wish to view it. Does anyone have any ideas how to do this I thought there may have been a hasChildRows boolean value but appears not! Private Sub TransactionsBindingSource_PositionChanged( ... ) Handles TransactionsBindingSource.PositionChanged If CommentsBindingSource.Count > ...Show All
SQL Server Inserting millions of rows into a table
Hi, I have a DataTable in memory and I want to write a C# code to dump the data into a SQL database. Is there a faster way of dumping millions of rows into a SQL table besides running INSERT INTO row by row Thank you, Jina If you are using .NET 2.0 then you can use the new SqlBulkCopy Class. I am not sure though if it supports inserting into older versions of SQL Server but it will work against SQL Server 2005. Else it is best to dump the rows to a file and then use BCP/BULK INSERT/OPENROWSET(BULK)/DTS/SSIS. ...Show All
Visual C++ C++/CLI S**Ks what syntax direction should I really follow???????????????
I'm confused on what C++ language syntax to learn cause there are too many flavors.. I want to learn C++ but which one is the best to conquer,,, I have been playing with C++/CLI But what I'm find is the syntax is limited,,, things that I find on the internet that already work in C++ have no compatible syntax in C++/CLI..... so why bother,,,, I have found many post that say not to use C++/CLI... I have no idea how and what turned into what like a flow chart c turn into c++ and what flavors thanks.... Ok I switched to starting my project with C# instead of C++ then played with the code.. What a difference!!! Things I couldn't do in C++/CLI are working in C#.. ...Show All
Visual C++ Critical Error in ExtractAssociatedIcon function
Neither System::Drawing::Icon::ExtractAssociatedIcon nor Icon->ExtractAssociatedIcon function works due to an error in Intellisense. Eventhough the function belongs to the Icon class, Intellisense thinks the other way and prevents the compiler from compiling the code. Any way around this To reproduce the error, try the code: this ->Icon = Icon->ExtractAssociatedIcon( "c:\\Windows\\notepad.exe" ); Even if there is an error in Intellisense I don't see how it can prevent compilation. The Intellisense is one thing and the C++ compiler is another thing. Besides, both of the following compile and run fine for me: this->Icon = System::Drawing::Icon::ExtractAssociatedIcon("c: ...Show All
SQL Server Get week number with changed @@datefirst question
I want to get the week number (according to ISO rule i.e. if most of the working days fall in the JAN set it to as week number 1). I know one stored procedure is available at MSDN to achieve this task. It works fine for me if the @@datefirst is set to 1 (i.e. Monday) but i have a strange requirement of calculating the week number according to ISO rule but the start date of week can be any day for example Saturday. When I try to run that procedure with my unique criteria I get wrong week number for some years Can any one tell me the more generic solution Your help is appreciated thanx What I understood is, 1. Need to find the Week Number for the Given Date 2. If the Jan-01 of the year fall after Wednesday then it wil ...Show All
Visual Basic referencing controls in a groupbox
The groupbox in VB.NET is very different from the option group in VBA. In the latter, you could get the value of the group (the index of the control in the group that was checked) by just referring to the container control itself: dim x as integer x = optGroup1 OR select case optGroup1 Case 0 debug.print "apples" Case 1 debug.print "oranges" Case 2 debug.print "lemons" Case else debug.print "other" End select How can you do this in VB.NET OK - a related question - what event in the groupbox is fired when one of the radio buttons is checked I want the form to respond to the event, but not have to put code in each button control within th ...Show All
Visual Studio Tools for Office VSTO and dead code.
I've built COM add ins for PowerPoint XP and 03 that work perfectly, now I am trying to get them to work in Office 07 and am getting no where. The problem seems to be that when I call an out of process (microsoft encoder) my code dies. There are no errors thrown, there is ummm, nothing, just dead code. As an example; Set encoder blah, blah, blah encoder.start Msgbox "Done". In the above the encoder indeed starts, runs as expected, and then, zip, nada, nothing. Its as if the rest of the msgbox doesn't even exist. Environment Windows XP Pro SP-2 VS 2005 VB .NET using the latest VSTO build for Office 12 Office 12 B2TR installed Please take note, this is not a case ...Show All
Visual Studio Express Editions Directories?
Hi all I feel really stupid posting this question, because I know I saw it somewhere before, just couldn't remember where! Here's my situation: ------------------- I already have: - a listbox named " List1 " - a " Form_Load " sub which calls the " loadorrefreshdata " sub I need some code to do the following: - Get all the sub-folders in a specified directory (" testdir ") - Get the names of these subfolders (not the Directory.GetDirectories, as this returns the full path eg. "C:\Program Files\demofolder1\demosubfolder", where I only want "demosubfolder" as name. - Populate List1 with these names What would be the best way to do this Thanks in advance! Johannes H ...Show All
Visual Studio Team System No changes to merge message
I'm trying to merge a branch back into the source it came from and Team Foundation Server is telling me, "No changes to merge". If I compare a file I know is different between the branch and source it shows many differences. Has anyone experienced this before or does anyone know why TFS would say, "No changes to merge" yet show differences between files Thanks! Chris There are many possible reasons. The most common would be that someone already did the merge, encountered a conflict, and chose the "keep target branch" (AcceptYours) resolution. ...Show All
SQL Server Totals (or Sum) in a Function or View
I have the following data in a table: Item Qty 1 1 1 -1 2 3 2 -1 2 -1 Using a function, how can I code it so that I get the following: Item Qty 1 0 2 1 Also, if a Qty does equal 0 (as in item 1), can I use a >0 in the Criteria field of the resultant expression to remove it from the Function results Hi, You can put a filter to your results after grouping by using the "HAVING" clause. This will help you remove the 0 summed results. select item, sum(qty) from item_table group by item having sum(qty) > 0 Eralper http://www.kodyaz.com ...Show All
.NET Development Determining Class type of derived Class withing base class
Hi, Given two classes A and B, where Class B inherits from Class A, can I determine within Class A that the Type of its topmost derived class is Class B. Taking it a step further, given a base class A, can Class A determine what its upmost derived class is. I know of the method :System.Reflection.MethodBase.GetCurrentMethod().DeclaringType(); That will determine the type of the class that the call is been made in, so if it resides in Class A, it will return ClassA. What I would like to have is something like this in my base class (Class A) that returned the type Class C, when Class C inherits Class B which in turn inherits Class A. Any help would be appreciated. Michael, Thanks for t ...Show All
SQL Server Finding the last previous Non-null member (MDX)
I have a problem, that at first I thought was a fun challenge, now its getting irritating as I haven't been able to figure out how to deal with. Its easiest to show by example - imagine the stock market.. for a stock MSFT, we have Date, Open, Close etc etc. What I would need is a calculated measure for "Previous Close". The problem is weekends and holidays etc have no data (of course). So for Monday you'd want the "Previous Close" measure to show the Friday close... unless of course Friday was a holiday (Good friday) then thursday etc. You get the idea - basically traverse up the Close measure until you get a not null value (unless its the very first date something appeared). If you use the NON EMPTY clause you ca ...Show All
Visual Studio Express Editions Ejecting removable media and activating a program from an outside operation
Hi everyone, I was wondering if there's any way you can eject removable media (i.e. CD/DVD drives) at the click of a button in a program, like in windows explorer. And to activate a feature because of an outside operation (i.e. the opening of another program). Thnx in advance Thanks ReneeC, I pasted the link in a hurry and hadn't checked it. (I was really referring to my own code in that thread) That example only ejects the first drive too. Here's how to use MCISendString to open/close a specific drive, and tidy up after yourself. Imports System.Runtime.InteropServices Imports System.Text Public Class CDTray Private Declare Function mciSendString Lib "winmm.dll" Alias ...Show All
SQL Server ActiveX to define presidence
I have a DTS package (SQL2000) which uses ActiveX scripts to check for records with certain criteria in a table. If the certain criteria is met, I want to initiate a child package that preforms a data-extraction. Otherwise move onto the next step which check for a different set of criteria. Currently if the criteria is met, I flag the task as success to dictate moving to one set of steps, otherwise failure & moving onto the next check. The problem I am realizing, is that if I 'Fail' on of the check steps, subsequent steps furthur down the route that I am directing it to go, do not run. These are other ActiveX tasks that send email, and do furthur analysis. Why is this the case Can't you perform a logical check, and based upon th ...Show All
