spinal's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Rest method (make the computer chill)
I'm trying to put together a method that makes the computer rest or delay itself from going too fast or from looping through the game again. Here's the code I put together, but it doesn't seem to be working. void Rest( int milliseconds) { for ( int i = 0; i < milliseconds; ) i += ElapsedRealTime.Milliseconds; } Has anyone put together something similar that works Its probably better to handle that by just checking the time in the Update method. If you add pauses yourself you will affect the framerate of the game plus if there is any other animation you want to do you wont be able to. Look in the spacewar code for how I did the number counting at the ends of the rounds. ...Show All
Visual C# How to sign EXE using signtool with Verisign SPC and PVK on the command line?
I have a newly-minted Verisign certificate in the form of a SPC and PVK file, and I can sign EXEs and CABs flawlessly using the wizard. How can I do the same from the command line I use the follwing steps to sign using the wizard, and it works great every time: Simply run "signtool signwizard" to start the signing wizard. 1. File Selection: Choose the EXE you wish to sign (ie, RSInstaller.exe) 2. Signing Options: Choose "Custom" 3. Signature Certificate: Click "Select from File" and choose "mycredentials.spc" 4. Private Key: Select "Private key file on disk" and choose "myprivatekey.pvk" - Leave CSP at "Microsoft Strong Cryptographic Provider" - Leave Provider Type ...Show All
Visual Studio 2008 (Pre-release) Cache returns partial results
Assuming I have two following queries, in different places in my application; one can run before another, the order doesn't matter: from p in db.Posts select p; from p in db.Posts select new Post() { PostId=p.PostId,Title=p.Title }; Post, by definition, contains PostId, Title, Body and Image. Since the second query interprets as select PostId,Title from Posts while the first one contains all fields, and since DLinq uses cache, when running 2nd query before 1st one, post.Body and post.Image are null. I guess that occurres because the cache contains key with Identity column (seems to be the reason for the problem here ). I think this key should contain a list of fields. Or DLinq should know when to fill the instance t ...Show All
Visual Studio Tools for Office Need help with programming with outlook 2003
I am using VC++/CLI and I am trying to create an outlook object to connect to outlook and create appointments. Outlook::Application ^outlookApp = gcnew Outlook::Application(); Outlook::AppointmentItem ^oAppointment = gcnew Outlook::AppointmentItem(); The second line gives me the error: Error 1 error C3767: 'Microsoft::Office::Interop::Outlook::AppointmentItemClass::AppointmentItemClass': candidate function(s) not accessible Oh, right, you will need to do some casting in there as well... outlookApp->CreateItem actually returns a generic 'object' type, so you have to do a cast to what you want. In C# you have to C-style cast it to (Outlook.AppointmentItem). I am sure there is some sort of cast ...Show All
SQL Server Huge amount of memory (SQL25K.MS)
I’m seeing that Management Studio is cosuming a huge amount of memory either development server or mine’s workstation. I mean, even when it’s on inactivity way. Wonder I, this behaviour is assumed as normal or not Thanks for that or provide me any link or information related. Also, clearly separate memory usage by SQL Server Engine (which is the subject of this forum) and Management Studio (which is a tool). There is also a dedicated forum for tools where questions like this may be answered faster: http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=84&SiteID=1 Also note that SQL Server memory usage is not necessarily correctly displayed by Task Manager when AWE or locked pages on 64-bit are u ...Show All
Visual Studio Express Editions VC# hangs after creating new project
Okay, this problem didn't happen the last time I installed VC# (some 6 months ago). Recently, I downloaded the VC# Express ISO (2 weeks ago), and installed it. But it hangs as soon as I create a new project. Did Microsoft change the ISO files or something Here are all the wierd things that are happening in my VC++ Express and VC# Express 1) I installed VC# Express first, it hangs immediately as soon as I try to create a new project. It just says it's creating a new project and hangs. 2) I tried uninstalling every sign of VS Express and then reinstalled first VC++ and then VC#. The problem still persists. 3) Right now, my VC++ Express install fails to install the MSDN Express Edition component. 4) Even after closin ...Show All
SQL Server Double Quotes in CSV File
I have a lot of data coming in from CSV files. I have many CSV files (~20), with varying amounts of data- but some are quite large (largest file is ~230mb) I'm trying to import it into a SQL database via SSIS, but the data is a little bit frustrating. I have data that looks like this: "Text from vendor ""Vendor Name, Inc."" blah blah", "Next string", "", 1234 Many things to notice here - as well you can imagine some of the difficulties here. After parsing, this data should have 4 columns- Column1 &n ...Show All
Visual C# how to load datatable with xml
<tables> <row> <table_name>ticket</table_name> <record_key>68</record_key> </row> <row> <table_name>sales</table_name> <record_key>3001</record_key> </row> </tables> how can i load a datatable with above xml string you could use a StringReader to read the xml from the string into the dataset. Using your example, this works for me: string theXmlString = "<tables><row><table_name>ticket</table_name><record_key>68</record_key></row><row>"; theXmlString += "<table_name>sales</table_name><record_key>3001</record_ke ...Show All
Visual Studio Express Editions How to extend the Report Margin to 132 columns
Sir, I'm working in a project in VB6 and MS-access (back end) and have completed most of the code and is working fine. But the problem come to me when I started to prepare reports. The requirement is that the report could not be accomodated in 80 columns and needed to expand it to 132 columns. I have tried my best to do it, but in vain, Please suggest how to taggle the situation. Thanks T hese forums are for VB.NET and there are better places to find answers for older versions of VB. Maybe the VB6 newgroups - http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.vb.general.discussion&lang=en&cr=US Or perhaps the VB6 resource center http://msdn.microsoft.com/vbrun/ or ...Show All
Visual C++ CreateFile to device in VB.NET 2005
I have an application that communicates with a USB or Serial device using CreateFile(). It was originally created in VB6 and I ported the project to Visual Studio 2005, and it works fine. But, I wanted to move the old C code to a dll or class and then use the new GUI features in VS2005, along with CLR, managed code, etc. With the class version (done in a mixture of managed C++ and the old C code compiled as not managed), it compiles fine and I can step through the code from my managed VB GUI to the unmanaged C code in the class, but now CreateFile fails, with a return code of 2 ("The system cannot find the file specified"). Can anyone explain why CreateFile works fine in the old unmanaged code, but now doesn't work in my new 2005 pro ...Show All
SQL Server Missing "Foreach File Enumerator and Foreach Item Enumerator"
Ever since installing SQL Server 2005 SP1, when using the Foreach Loop container in SSIS the Foreach File Enumerator and Foreach Item Enumerator are missing from the Enumerator drop down box. Anyone else seen this issue and know how to fix it thanks Eric Hi, I have the same problem as EJaloustre after I installed SP1 for SQL Server 2005. I tried the KB workaround cited by Michael and I ran it as as simple user called test. The C# program does not list anything. I also uninstalled SQL Server 2005 and installed it again without the SP1 but I still don't have the For Each File Enumerator. Is there another way to restore this functionality. Thanks in advance for your h ...Show All
SQL Server Can I add a record number as data passes through
Hello. In SSIS, is it possible to add a record number to each row of data as I copy it from the source to the destination. An example of my source data is below, For each MemberID want to record the number of times it occurs in the table. MemberID 2898 2899 2899 What I want it to look like when it gets to the destination is: MemberID RecordNumber 2898 1 2899 1 2899 2 Like an Identity column I suppose, not for the whole table but for each MemberID. Thanks You are looking at the Data Flow page in the Choose Toolbox Items You ...Show All
Visual C# Static function cross thread sharing problem.
This is my code to close a form. public static void Clear() { if (form1 != null) { form1.Close(); <----- cross thread error } } first i got a problem with cross thread sharing. then i created a safe method to close the form. private delegate void Delegate(); private void SafeCloseForm() { if (InvokeRequired) Invoke(new Delegate(SafeCloseForm)); else form1.Close(); } so now i got public static void Clear() { if (form1 != null) { SafeCloseForm(); } } But i have new problem with the static method An object reference is required for the nonstatic field, method, or property... What should i do ...Show All
Software Development for Windows Vista Windows SDK RTM Help problem
I have Windows SDK RTM (6000.0.0) installed on Windows Vista RC2. Initially I did a full install, but when I ran out of space on the system drive, I hit ' Change ' from Programs and Features and removed the documentation for .NET 3.0 Now I can no longer launch Windows SDK Documentation. Whenever I try to launch it, it fails with the message " Microsoft Document Explorer cannot be shown because the specified help collection 'ms:help://MS.MSSDK.1033' is invalid ". Is there a way I can fix this without having to reinstall Windows SDK (I no longer have enough space on my system drive to permit a full installation) Try running Repair for your installation. From 'Change' you'll see the Maintenance screen. Click the 'R ...Show All
Visual Studio 2008 (Pre-release) Default value?
I have the below contract but it does not seem to work. When the client calls this api without specifying the optional argument instead of setting the value to the default it is always null. I have included the datacontract and a portion of the service reference from the client. The client service reference code seems to "know" that this parameter is optional but it does not seem to "know" about the default value. What am I doing wrong Kevin < xsd:element name =" Culture " type =" xsd:string " default =" en-US " minOccurs =" 0 "/> [ DataContract ()] public class GetPaymentTypesRequestType { private string cultureField; public GetPa ...Show All
