michot's Q&A profile
Visual C# Passing a method to a method?
I'm trying to abstract my code and I noticed a pattern. I'm sure that this can be done, but have no idea where to start looking for an answer: Say I have the following method: private static void ArrayLengthTest() { if (al.Count > 0) ReserveMedia(); else { NoRecordsMessage(); Console.ReadKey(); Console.Clear(); CreateMainMenu(); } } How would I cleanly pass ReserveMedia() or any other method name I know I could create some switch logic and pass an option, but that would be really klugy. Any ideas/hints would be appreciated. TIA - AbeR You can pass methods as delegates. You'll have to define a delegate type that defines the method's signature. Then, define a method that takes of ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Art/Sound assets
First off, I'm really excited about XNA/etc. If I ever meet the guy/gal who came up with this idea I would love to buy them a beer. I'm a programmer with professional experience. I feel like I'll be comfortable with XNA development once I've got my hands on it. My main concern is game assets. I'm no artist, nor am I a sound engineer. Here are my questions: How much art/sound content is expected to be available for programmers like me Will there be a variety of content For example, I want to make a fantasy RPG and some other guy wants to make a space themed FPS. Will we both have access to the assets we need Will art and sound types be able to upload their own content for other developers to use ...Show All
Visual Studio Team System Availability of the German Process Guidance
Hello, is there anybody who can tell when the german language process guides will be available for download. We are using the german TFS, and we want to modify the project template and the guidance. The TFS ist already available in german, including all process guidance. If anybody has found the german templates, please tell me! Thanks! Hello, the german language Process Guidance and the Process Templates are currently shipped only with the German TFS. So from what I read (" We are using the german TFS ") you should already have them. Or did I misunderstand something Thanks, Aldo ...Show All
Software Development for Windows Vista New USB Devices not recognized in Vista
I have run into a strange problem that I need some help. I am running vista ultimate on a ibm t43p laptop. All of my current usb items including keyboard, camera, printer and others work fine. When I try to install a new usb device plug and play is not recognizing properly. The found new hardware wizard comes up and tries to install the driver. When searching it cannot find the driver and does not install properly. I have tried the devices on other computers and they do work. Anyone have any ideas why these items won't install The specific item now is a canon pixma pro9000 printer. The driver is on the computer but plug and play will not install the device. Thanks, Jim The problem can be so ...Show All
Internet Explorer Development IE7 and desktop icons
I just installed Internet Explorer 7 today, which I guess is a.k.a. Windows Live . All of my fancy customized shortcuts on the desktop disappeared and each got replaced by the same generic windows icon. Right-clicking & changing the icons in properties no longer works. Also, when I create an internet shortcut while browsing, that creates a shortcut with that same generic icon (not even an explorer logo). Now my desktop is just one forest of identical icons. Anyone know how I can fix this I've wasted all day without success. Dave Don't take this personally, but this kind of "canned" response, not even related to the question matter is what really irritates a lot of people ab ...Show All
SQL Server framework 1.1 update + ssmse: get warning!?
Hello, friends, here is my problem: I installed sql server express on a naked Windows xp pro with SP2; of course, framework 2.0 installed, and MS-installer 3.1 installed as well. I also installed ssmse. Everything worked fine. Then I installed all windows updates via Windows Update in internet. Now suddenly, when starting ssmse, I get a Warning Textbox with Header "Microsoft SQL Server Management Studio Express", then the yellow triangle with the exklamation mark, but NO TEXT AT ALL, and the OK-button. So unfortunately, I do not know what to do. Only thing I found out was, that in all updates, the culprit surely is framework 1.1 update. Before installing this, everything worked fine, afterwards, well, see above. When I click the ...Show All
Visual C++ Problems with Char*'s and LPCWSTR need help
I am trying to use the openregistrykeyex or openregistrykey function from the windows.h include file and I have the following code HKEY hKey = NULL; char * temp = "String" ; int len = strlen(temp) +1; wchar_t *wText = new wchar_t [len]; if ( wText == 0) return 0; memset(wText,0,len); ::MultiByteToWideChar(CP_ACP, NULL, temp2.c_str(), -1, wText,len); const wchar_t * test = wText; //long tempResult = RegOpenKey(HKEY_LOCAL_MACHINE, test, &hKey); long tempResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, test,0, KEY_READ, &hKey); Neither work and I can't understand the cryptic error codes if someone could help me unravel the error codes error code = Error 1 error LNK2028: ...Show All
SQL Server Error using scalar valued function in Stored Procedure
Hi, I am getting the following error msg while executing a stored procedure (getAllCollections) which uses a scalar valued function. error msg: Could not find server 'Select dbo' in sysservers. Execute sp_addlinkedserver to add the server to sysservers. Stored procedure: ALTER PROCEDURE [dbo] . [getAllCollections] ( @pCids varchar ( 7500 ) ) AS declare @cmd varchar ( 8000 ) set @cmd = 'Select dbo.getCollectionList(c.collection_id) as cList from CollectionT c WHERE c.collection_id in (' + @pCids + ')' print @cmd exec @cmd Where as the 'dbo.getCollectionList' is the scalar valued function. If i execute the query separately as below it works fine: Select dbo.getCollectionList(c. ...Show All
.NET Development how to read .html file and save in asp.net
how to read .html file and save in asp.net You will probably get more response to this if you post it in one of the following forums: ASP.NET: List of forums is at http://forums.asp.net .NET Base Class Library: http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=39&SiteID=1 However, as Paul asked, it would help if you provide additional information on exactly what you want to do. Thanks, Sarah ...Show All
Visual Studio Team System Visual Studio 2005 Team Suite 180-Day Trial
I am trying to lower the En_vs_2005_vsts_180_Trial.img file but single it lowers 4kb to me or in its 1,7 defect Gb Somebody podria to say to me of where I can lower it so that quero to prove this version Hi, you can use an ISO mounter like this: http://www.slysoft.com/en/virtual-clonedrive.html After you installed that (free) tool you can just double click the *.img or *.iso files and they will show up as content of a "virtual" CD drive which you should find as a new drive letter in explorer. From the context menu of that drive letter you can choose to unload the img file or choose another img file to attach to that virtual drive. -- SvenC ...Show All
Visual C# String Mid in c#
In VB we could use: b$="abcdef" a$ = mid(b$,2,1) which would pickoff the second chr for a length of 1 from b$ how do we do it in c# Substring is indeed the equivalent, but be aware that it is 0-based (like everything else in the framework), while the classic VB string functions are 1-based, so adjust accordingly. David Anton www.tangiblesoftwaresolutions.com Instant C#: VB to C# converter Instant VB: C# to VB converter Instant C++: C# to C++ converter, VB to C++ converter Instant Python: C# to Python converter, VB to Python converter ...Show All
Smart Device Development Addign Icon to Programs Menu
How do I add the icon (shortcut) to Programs Menu of a Pocket PC How I did see there is an option to add shorcut to program files folder and applciation folder...but not the startmenu/programs ...Show All
SQL Server SQL Server 2005 SP2 CTP1
The word is that a public download of SQL Server 2005 SP2 CTP1 is available. Does anyone know whether this is true - and if so, where can it be downloaded The reason for my interest in this service pack is that significant changes around the behavior of subcube queries in AS should have been made, and I would very much like to test this. Have you gotten an answer on where to download SP2 CTP1 from Please share the information if you have. I want to download SP2 CTP1, but I can't find it. Thanks Vipul Shah ...Show All
Visual Studio 2008 (Pre-release) WCF service cannot verify incoming message with SAML token
hi there, I have implemented an STS service using the June CTP and a WCF service/client to use the STS for authentication/authorization. I use wsHttpBinding for the communication between the client and the STS service and wsFederationHttpBinding for the communication between the client and the service. At runtime, the client can retrieve a SAML token from the STS without any problem. However, if the client try to set up a secure session with the WCF service, which is required in the wsFederationHttpBinding, the service throws up an exception "The security protocol cannot verify the incoming message". I use the WCF tracing tool and see that the SAML token is present in the message for the action "http://schemas.xmlsoap.org/ws/2005/02/ ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Tom Miller's Render Loop
I am using vb.net 2003 an i am at a loss as to how to convert Tom Miller's render loop c# code sample into vb, could anyone help public void MainLoop() { // Hook the application's idle event System.Windows.Forms.Application.Idle += new EventHandler(OnApplicationIdle); System.Windows.Forms.Application.Run(myForm); } private void OnApplicationIdle(object sender, EventArgs e) { while (AppStillIdle) { // Render a frame during idle time (no messages are waiting) UpdateEnvironment ...Show All
