PatMc's Q&A profile
Windows Forms How to get icons of applications and system ?
Dear all, Currently, I had create listview which sames window explorer. However, I have a issue to get icons of applications or system associate with items in listview. I think somebody had same my issue. If you had solved it please share it for me. Thanks for your help. Steven. See How to use the SHGetFileInfo function to get the icons that are associated with files in Visual C# .NET http://support.microsoft.com/ kbid=319350 ...Show All
Visual Studio Team System Launch Error, no data was collected
More often than not, when I run a Performance Session, I get a small dialog box that says: Launch Error PRF0025: No data was collected. However, the session does create a .vsp file that I can then add to the Performance Explorer and view the report. Is this a known issue, or am I doing something wrong Thanks, Bob Willer BetaID 267513 Lucky me. :) Patrick, are you running in sampling or instrumentation mode Do you get the same problem with memory allocation collection turned off Does the data look valid when you open the report (the data looked somewhat valid to Bob) Have you t ...Show All
Visual Studio 2008 (Pre-release) DLinq Extensibility for Custom ADO providers?
As we're thinking about writing our own ADO provider library (connection, command, reader, adapter etc.) I was just wondering how extensible you are planning to make DLinq and how it will fit in with the current ways of extending ADO. Any pointers to documentation on the subject would be very much appreciated. Thanks, Trev. I am not sure I understand the specific aspects on extensibility you are talking about. Here is what we have and are planning: What we have in the preview: 1. Interop with ADO.NET SqlConnection 2. .NET framework transaction model - that is *the* transaction model for DLinq and he ...Show All
Visual Studio Express Editions comboList collection to String???
Hello, This is such a newbie q... :-) Okay, I have this comboList named "chooseSearch" (without Quotes) and I have this code: Process.Start("http://www.google.com/search hl=en&q=" + searchBox.Text) But in the comboList, I have collection of Google and Yahoo. How can I make it so that the code only gets excuted when Google is selected Thank You very much! Keehun Nam If chooseSearch.SelectedText = "Google" Then Process.Start(" http://www.google.com/search hl=en&q= " & searchBox.Text) End If Be careful when comparing with a string, so it works with "google" or "Google". Al ...Show All
Windows Forms MessageBox dialog with sound events
How does one associate the MessageBox appearance with the standard Windows Exclamation, Error, etc sound events ...Show All
Smart Device Development SQL Server CE Licencing Details?
Anyone know the licencing details on SQL Server CE Am I allowed to run it on a Pocket PC running .NET if I never connect to a SQL database Is it free if I do this I simply want to use it to store data temporarily in, while working in an App on the pocket PC. I'm then planning to query the data out and transmit the data via web service to the server. Please confirm if this is within the licence agreement If this is out of bounds, can anyone specify an alternate technology that might do what I'm looking for Thanks, Jeff. I read through the licence agreement and it states: YOU MAY ONLY USE MICROSOFT SQL SERVER 2000 ...Show All
SQL Server AMO: refresh DSV and accept changes..
I tried the sql server OLAP newsgroup, but without success... this is fairly urgent, so will try in here: I am stumped on this, how can I programmatically do what can be done in Visual Studio by: 1. Right clicking inside datasource view 2. Choosing refresh 3. Accepting the changes I am trying to get new fact table columns into the DSV, obviously without doing the manual steps above. I have tried dsv.Refresh() and dsv.Update() but it is not as simple as that or the sequencing is incorrect (or, most likely, I am looking in entirely the wrong place). Thanks for any help. This refresh of ...Show All
.NET Development Err.Raise in EnterpriseServices Component
Here is the situation. I have custom err.raise statement Err.Raise(vbObjectError+9000, src, desc) in an ES component. And when the client tries to trap the error, the error number that is returned is always 5, but I can get src and desc values. Is there any known problem with errors raised from ES component Thanks. ramesh nd. The workaround is throw COM exception like this: throw New COMException(Err.Exception, vbObjectError + 9500) there is a marshaling problem if you use Err.Raise(vbObjectError + 9500) in ES component. Note: You can use Throw inside On Error Goto block, and it works. ...Show All
Visual C++ How to pass a LPTSTR value into a structure's LPWSTR parameter?
I needed to use the WNetAddConnection2 function to establish a connection to a server share which requires a separate logon. It requires a NETRESOURCE structure to be passed, and one of the netresource items is .lpRemoteName, which is a LPWSTR. My sourcepath was captured in CString so i get an error whenever i tried to pass it to the item. It says 'error = : Cannot convert LPWSTR to LPTSTR'. I tried all sorts of type casting but it wont work, including A2W (no, i didnt forget the USES_CONVERSION thing). What should i do You need W2A, not A2W. You're converting from wide to ANSI, not the other way. LPTSTR is ...Show All
Visual C# OpenFileDialog
Ok. I have a openfiledialog object. On the Form Load event, the object opens. Is there a way for when it opens to select a file and close all by code No, OpenfileDialog is only for prompting the user, i suggest may be use using System.IO (StreamReader) -Sibusiso ...Show All
Visual Studio 2008 (Pre-release) DLinq submit error
On Windows XP when call db.SubmitChanges(); An unhandled exception of type 'System.Transactions.TransactionManagerCommunicationException' occurred in System.Data.dll Here is the code: AccountingDataContext db = new AccountingDataContext (); var prj = db.Projects.ToList(); var prj_new = db.Temps.ToList(); foreach ( var p in prj)   ...Show All
Visual C# Generics And Interfaces....
I'm currently trying to use generics to make my interfaces a little bit more flexible. Unfortunately I seem to have hit a problem with the compiler complaining when I try to use an interface as an input parameter, if that interface requires a type to be defined. I'm not sure if I explained that at all well, but given the following example, the compiler complains that I haven't specified a type in the defintion of someMethod. I've tried putting in <T> but it still complains. It only works if I strongly type (by putting <string> in there. //An underlying type to hold some data. public interface IDic&l ...Show All
Visual FoxPro How to check if an Array exists?
Select * from myTable where isnull(myTable.keyField) = .f. into array myArray if alen(myArray) > 0 ** Loop through array and Do processing end if In a situation where records selected by the query are 0 then the array is not created and thus the next statement gives an error. How can I check if myArray exists before doing any further processing Thanks for the indepth explanation CetinBasoz. I see your point and I think I am going to try to incorporate type('alen(arrMyArray)') = 'N' in my code. ...Show All
Visual Basic IDE not picking up my 'Backspace' or 'Enter' keystrokes in the debugger
The debugger isn't picking up my keystrokes for my 'Backspace' or 'Enter' (carriage return). As far as I can tell those are the only two keystrokes from my keyboard that are not being caught. Any ideas Logitech wireless keyboard. Hi, Windsailor, Sorry to hear about the problems! Where are the keystrokes failing – in the Immediate Window, Watch Windows, or in the editor itself (while doing Edit & Continue) --Matt Gertz--* VB Compiler Dev Lead ...Show All
Visual Studio Team System Team Foundation on Virtual PC / Connecting from host pc running VS2005
Ok, so I'm completely stumped. How do I get this working. I finally got Team Foundation Server installed (thanks to the SQL Server April CTP). I installed it on a Virtual PC running Windows 2003 Server, configured per the documentation (AD, Domain Controller yada yada). I created a domain called TEAMSYSTEM. Now the problem is, how do I get my PC which is already logged into a domain on my work network to even see the Virtual PC In previous experiments with Virtual PC running Windows XP, I just made the Virtual XP image part of a workgroup called "ZA" which matches the domain "ZA" that my pc was logged into.& ...Show All
