Runespy's Q&A profile
Visual C++ 'Is' in C++
Hi! In C#, there is a keyword named 'is'. It compares whether one type can be converted into another. Is it possible to do something like this in C++ Thank you You could also do something like generic <typename DestType, typename SourceType> bool isConvertible(SourceType t) { try { safe_cast<DestType>(t); return true; } catch(InvalidCastException^) { return false; } } Then check the type with if(isConvertible<C^>(B->foo)) ... ...Show All
Windows Search Technologies MSN search toolbar latest version?
I've like to take advantage of the latest Windows desktop search 2.6.5. However, I also want to use the MSN search toolbar since it provides a search box in Outlook. Although WDS 2.6.5 is avialable, it doesn't seem to have been packaged into MSN search toolbar as yet because when I downloaded it right now and installed it, the WDS version still seems to be 2.5 How do I get around this Or do I simply have to wait for Microsoft to package the latest WDS into MSN search toolbar Thank you Paul If you don't mind, I have one more question. After installing the MSN toolbar, it shows up in the system tray but is a little too big. In previous versions, there was a registry entry you could change to make it smaller ...Show All
Visual Studio Trapping the F5 menu command
I'm having some difficulty in trapping the F5/Start Debugging command. I've tried adding the command like this: id = new CommandID(VsMenus.guidStandardCommandSet97, 295); command = new OleMenuCommand(new EventHandler(ShowConsole), id); mcs.AddCommand(command); but no luck. I've also added a section in the commands table like this: CMDUSED_SECTION guidVSStd97:295; CMDUSED_END My other user defined commands work ok - I can trap and handle them fine. Is there anything else I need to do Thanks Dermot Hello Dmitry, Here's the code from my Ruby package. It overrides the Exec/QueryStatusOnNode methods of the standard MPF ProjectNode. Dermot public over ...Show All
SQL Server sqlcmd :r and spaces
I've been pulling my hair out with this for a bit and thought I'd post a solution. The problem is that if the file name :r reads contains spaces, it almost always gives an error. The solution isn't great and if anyone has something better I'd love to see it: :setvar dir "C:\test dir\" :setvar file "my file.sql" PRINT '$(dir)$(file)' :r $(dir)$(file) GO :setvar file "my file 2.sql" PRINT '$(dir)$(file)' :r $(dir)$(file) GO :setvar file "my file 3.sql" PRINT '$(dir)$(file)' :r $(dir)$(file) GO Hope this helps someone. Thanks Robert, That only works if the filename is a constant. I suppose I could search and replace but then I'd have to hunt through the script to see if ...Show All
Community Chat transfer & file settings problem
Hi, I had a problem with my PC and I basically had to reformat and then reinstall xp and the other pre-installed software. I used the files and transfer settings wizard to copy my stuff onto the desktop. I then burnt the dat files onto 3 dvds ready to transfer after the computer was reformatted etc. Anyway, the reformat and reinstallation was all smooth. I opened up the transfer files & settings to copy the old stuff to my new pc. However it keeps coming up with the following: "The location you specified does not contain stored information. Please type a valid path into the edit box. If you entered a path to a folder on a removable disk, the disk must be in the drive." I have tried copying the files into the U ...Show All
Visual Studio Express Editions Placeholders for Menus
Can you attach a placeholder to a menu that displays any controls you like What I mean is say you want a menuitem to have more than just a textbox for example. Maybe you want it to have a textbox, checkboxes and a maybe a dropdown too, all in the one menuitem. Sorry, perhaps I wasn't clear, I want lots of controls in a single menuitem, I used to be able to do it in vb6 with a control I got from vbAccelerator. It had support for placeholders (basically picture boxes that could hold other controls). I was just wondering if anyone has managed to put more than one control in a single menuitem. ...Show All
SQL Server ErrorColumn field from Datasource Error Output
Hi, The problem is, ErrorColumn contains ID. Is the following code reference safe columnname = Me.ComponentMetaData.InputCollection.FindObjectByID(Row.ErrorColumn).Name Is there any possibility for FindObjectByID to return NULL Reference in any case Fahad349 wrote: Dang on SQL Server team Is there any harder way to do it You are welcome to submit a feature request: http://connect.microsoft.com/sqlserver/feedback ...Show All
.NET Development Simple listener and client project
I have been looking at the treads on this forum and havn't found anything that has worked for my yet, I code in vb.net by the way. All I need to do is be able to transfer text between programs, from that I can learn what goes on behind the code and get my project working. If you have seen any simple code anywhere for a simple program where on one end you press a button and on the other side the picturebox1 changes, or something similar please post I am looking from completly coded programs that I can learn from. thanks average joe Hi, This is a link to a simple article about sockets in vb. http://www.eggheadcafe.com/articles/20020323.asp Charles ...Show All
Visual Studio Team System Work Item custom field's value update
Hi I'm customizing the process template to add some fields to work item type definitaion. So, in the Bug Work Item Type xml file i edited to add a field Release#. Now, this release number should be a dropdown with the values getting of the release # drop down getting updated quite frequently. I couldn't find an easy way how to add the release# values. All i could understand is that everytime i need to add a value to this dropdown, I need to download the Process Template, then edit the Bug.xml file to add the 'AllowedValues' tag and then upload the process template. Is there an easy way to this situation Here is an article on how to do it: http://blogs.msdn.com/team_foundation/archive/2005/05/06/415268.as ...Show All
Visual C# principal.IsInRole working locally but not remotely?
Hi all, I have a function I wrote which grabs a list of security groups from a sql table and then combines that with the domain name to check the users security groups to decide what they have specific access too. The function works 100% perfect when I run it against a localhost database, the second I point it to a remote database with same data and same structure it dies returns all groups failed and I can't for the life of me figure out why. Thanks in advance for any help anyone can give :) <code> // AD Groups the user belongs too public Stack retGroups = new Stack(); #region Get security groups private void getSecGroups() { SqlConnection getGroups = new SqlConnection(connect); // Select distinct from the databa ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA Security
Hi! I am a huge fan of the fact that Microsoft is opening up the Xbox to students and novices with the XNA, but a big question i have is how does this impact the security of the 360 Are there countermeasures to prevent people from making a "game" that attacks your network or monitors other games you're playing How about a 360 virus or 360 spyware Is there anything in the XNA or the 360 itself that prevents this from happening Its no surprise to me that XNA is ONLY .Net based. .Net (like Java etc) provides out of the box sandboxing. So in theory the runtime can prevent this kind of operation from happening. The .Net runtime has years of testing to ensure that the sandbox is secure - you can never be 100% certain of any ...Show All
Visual C# Can I change the stylesheet used by the WebBrowser control?
Hi, I'm tring to create an RSS reader similar to the one on the start page in Visual Studio 2005. The easiest way for me to do this would be to use a webbrowser control, along with a customised stylesheet (I want several applications to display the same RSS feed, but not necessarily in the same way). Is there a way to force the WebBrowser control to render the RSS feed using a dfferent stylesheet to the one specified in the html/xml file downloaded from the internet Thanks, James you can always to save file on disk /or in memory/ and change whatever you need before pass it to webbrowser control I beleive that you get RSS XML files with data only - wihtout information how to render it take a look ...Show All
Internet Explorer Development Set IE as default browser Button
i want to make a button that when it is clicked My IE is set as the default browser What do i have to do to make this work Hi Michael, Take a look at http://msdn.microsoft.com/library/default.asp url=/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/registeringapps.asp for registering client applciations. You should be able to set iexplore.exe as the default application there. Thanks -Dave ...Show All
Visual Studio Team System Code Reviewer Report
How would I go about creating a report that listed changesets in a project and the name of the code reviewer. We require the "Code Reviewer" field to be populated with a name durring check-in. And want to get a report on that field. Thanks for your help, Nate I tryed emailing mauli a while back but got no responce. Then I thought I didn't need this.... but it turns out... I need to be able to get the code reviewer in a report. Can someone help me with this Thanks again for all your help -Nate ...Show All
Visual Basic Holding execution of the code for a few second
Trying to find a function that will allow in the middle of the code execution pause for couple of secs. Thank you Use with caution as this literally will stop everything for the duration of the sleep. That means you UI will be completely unresponsive during this time and any code executing on this thread will stop. So it may be better to use for small duration pauses or if you want to remain responsive and want longer peiods you may want to look at the use of timers. ...Show All
