Richard1_1970's Q&A profile
Visual Studio 2008 (Pre-release) UserControl
I am building a custom user control containing a grid that contains a label I want to be able to set via a property ShowHeader to set the visibility of the first row of the grid. Can anybody point me where to look or help me out I have named the Grid using the name attribute (in .xaml) but I dont see any of the controls in .xaml.cs .... .XAML < UserControl x:Class = " Sharp.Base.CookBook.Forms.Controls.WPF.ucIngredient " xmlns = " http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x = " http://schemas.microsoft.com/winfx/2006/xaml " > < Grid Name = " grdMain " VerticalAlignment = " Top " HorizontalAlignment = " Left " > ...Show All
Visual C# Array.FindIndex () trouble.
string[] arr1 = new string[1]; string[] arr2 = new string[1]; string term1; // coSymbols is an ArrayList filled previously coSymbols.CopyTo ( arr1 ); coSymbols.CopyTo ( arr2 ); Array.Sort ( arr1 ); int indexed; for ( int ii = 0; ii <= coSymbols.Count - 1; ii++ ) { term1 = arr2[ii]; indexed = Array.FindIndex (arr1, term1 ); <= error message pertains to this statement ...... } Error 1 The type arguments for method 'System.Array.FindIndex<T>(T[], System.Predicate<T>)' cannot be inferred from the usage. Try specifying the type arguments explicitly. D:\VCsharp_Projects\tapTCPports_1\Form1.cs 1253 27 tapTCPports_1 I tried this form: indexed = Array.FindIndex ((Array) arr1, (string) term1 ); - same err ...Show All
Visual Studio Express Editions Auto scroll
Hi, I have information coming into a listbox and would like to know if there is anyway to have it automatically scroll down to the newest information received. Ken Just set the SelectedIndex either to the end of the list (if that's where you are adding the new items) or to the index where you have inserted the item. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ListBox1.Items.Add("This is a new item") ListBox1.SelectedIndex = ListBox1.Items.Count - 1 End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ListBox1.Items.Insert(56, " ...Show All
Visual Studio Express Editions End Explorer.exe
hey I am creating a sort of small kind of dos style program , and a program to block my computer for when i just leave my computer 5 mins i know : For Each p As Process In Process.GetProcesses If p.ProcessName = "explorer" Then p.Kill() End If Next But, everytime i make it do that (button click) , explorer comes back 2 seconds after Know any way to kill it without it coming back right after, with a technique thats safe for windows too You can't kill explorer using this method: explorer is used as the main 'shell' for windows: killing it will just bring it back (as you have found). If you want to 'replace' explrer, then you will need to search for a desktop shell replacement, which re ...Show All
Visual Basic Receiving strings from Serial Port
Dear reader, I want to read a string from a serial port. I found the sample code in Help, to do this, with the following code: Using com1 as IO.Ports.SerialPort = My.Computer.Ports.OpenSerialPort("COM1") do Dim Incoming as String = com1.Readline() If Incoming is NOthing then exit do Else returnStr &+ Incoming & vbCrLf end if loop end using The problem is that if the return string does not end with LineFeed, the com1.ReadLine command does not return to the application, and as a result doesn not return any value to Incoming, to check it contents. The application give the impression that it is just hanging, untill I stop the application. Also how does the Read ...Show All
Visual Basic Cannot create an Excel Spreadsheet from code, please help!
Hello, Im using VB.net in visual studio 2005. I need to create an Excel spreadsheet from the results of a sql query. I am going to try and do this using the Excel Com object and create a workbook, the use ADO to add a query to the QueryTables collection off of the worksheet. First all, if this seems completely wrong or a backwards attempt please correct me. I'm not sure this is the best way to accomplish this task, so any suggestions would be great. Next, I can't compile my code because after I add a reference to my project to Interop.Excel.dll (Microsoft Excel 10.0 Object Library), I get the following error when building: "Interop.Microsoft.Office.Core.dll must be strong signed in order to be marked as a prerequisite." ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Rotating points in 3D
I am working with some vector graphics that consists only of an ordered set of 2D points in XY space. The order of points determines the path that a line is drawn through them. I would like to be able to rotate the points in 3D so that I can flip and rotate the vector picture. After performing a rotate of some degree I want to be able to write the new set of points to an array or file or whatever. I also want to be able to display my vector image in a Window. So I have two questions: 1) Is there anything in DirectX that will help me rotate some XY points in a 3D space and then give me the resulting XY coordinates 2) What do I use to draw these points to the Window using DirectX In the past I have used normal Windows drawing me ...Show All
SQL Server How to eliminate duplicate data
I have a table with 68 columns. If all the columns hold the same value except for one which is a datetime column I want to delete all but one of the duplicate rows. Preferably the latest one but that is not important. Can someone show me how to accomplish this You can use the Group By fucntion SELECT col_a, col_b, col_c From Table GROUP BY col_a, col_b, col_c If you want the newest date - you can also using HAVING Clause SELECT col_a, col_b, col_c From Table GROUP BY col_a, col_b, col_c HAVING max(col_date) WHERE col_a - col_c are the columns with the same data and col_date is your date column AWAL ...Show All
Visual Studio F5 does not work ! : Need to use "Start new instance"
Hello, I am trying to debug an application with my Visual Express 2005 c++. It compiles nicely a "hello world". However, to debug, if i use F5, it doesn't do anything.. I have to right click on the project and use the debug->start new instance or debug->step into new instance. And sometimes the debugger becomes unstable. I "think" that when the debugger starts, it goes to __tmainCRTStartup and hence I need to force the debugger to jump to my "main" .. Is this normal I would like my debugger starts in my main. Can anybody help me please thank you Hello, Yes, initial pressing of F5 (and also starting with "start debugging in the menu) makes the debugger fail completely ...Show All
SQL Server Cumulative aggregation over time
I want to do cumulative aggregation similar to "period to date", but not to a specific period in the past, but to the earliest record in the fact table. The problem is that I have 20 million accounts that I want to follow up on a daily basis, but they change rarely. After a year, perhaps half a million have changed. What I have done is to create a fact table that stores the balance when the account is opened, then only keeps track of the changes, so that when anyone deposits money a row is added with the increment. After a year that would give me about 20.5 million rows in the table. As an analyst I would like to enter a specific date, say 2005-08-20 and see the balance of all the accounts at that time. To do so, I simply need to ...Show All
SQL Server Equivalent of DTSStepExecStatus in SSIS
Hi, I am migrating a dts package into SSIS.The dts package has a dynamic property to set the execution status of a data pump task in the package. the dts paskage is setting the DTSstepexecstatus of the datapumptask to 1 or 3 ie waiting and inactive. The dynamic property cannot be migrated to SSIS. May i know any equivalent property in SSIS to DtsStepExecStatus property of Dts. Thanks in advance Neethu You can use expressions on precedence constraints: set some variable in the script task to true/false, connect the script task with the data flow task with precedence constraint, double click the precedence constraint, select expression and enter the @varName ...Show All
Visual Studio Express Editions Problem with Pasting to a DataGridview
I try to C&P numbers ( from 1 to 9) from a Textbox (A1 in this case) to a DataGridview. However, the number refuses to appear in the DataGrid. The proper cell in the Datagridview gets selected (I get a blinking cursor) and the copying goes fine as well (I can paste with the mouse) I tried this method to C&P from The A1 Textbox to another Texbox and that went fine. The code in green below are other methods I've tried and that failed to deliver. My conclusion is, that I do something wrong with the last line, especially Me .DataGridView3.Text I have trawled all kinds of forums and databases for days now, but I'm stuck. Help would be greatly appreciated, but please be gentle: I'm a VB-Virgin! Private Sub B ...Show All
SQL Server open cube to browse takes very long time
I broke up my cube into 24 partitions. There are about 630M total fact rows in that cube. When I open the cube to browse in BIDS or SQL Management Studio it takes very long time to open (I think 30 minutes). Profiler does not show that it's running a query, but messages like this keep appearing throughout the time it's opening to browse: Progress Report Begin, 14- Query, Started reading data from the 'p0' partition. Progress Report End, 14- Query, Finished reading data from the 'p0' partition. Progress Report Begin, 14- Query, Started reading data from the 'p10' partition. Progress Report End, 14- Query, Finished reading data from the 'p10' partition. and goes on like that.... Yes - you can ...Show All
Community Chat Windows Code Named Vienna
Can Anyone tell me how compatible it is going to be with previous versions of Windows. Yea it ll be unworthy thinking about it right now.. as vista is onto the stage and started rocking. but we can surely expect vienna in 3-5 years i think..probably it might launch with DirectX 11 and by the time probably grafic cards with 2gb vram on a single card might come out.. woooo, thats lot of imagination.. but we could hope it.. coz its MICROSOFT ...Show All
Visual C++ TCHAR[]... How to manipulate it?
Hi, I have a variable declared as TCHAR szFileName[260]; This variable contains a filename which is correctly printed out using the _tprintf() function. How can I check whether the string contains "iexplore.exe" I've been searching through google and trying to convert it to CString without any success. Pls help. You need to cast the csStr to LPCTSTR, otherwise it will print the pointer to the string instead of the string intself: std::cout << (LPCTSTR)csStr << std::endl; Also, if you are using cin/cout maybe it's better to use the STL string class rather than the CString class. CString is mostly for MFC/ATL projects rather than simple console apps. ...Show All
