dakerson's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Creating projectiles, need help with list.
I am trying to make projectiles that my object can shoot, but am having trouble adding new projectiles to my List<projectile> object. My projectile code (so far) looks like this: public class projectile { float rotation; float rotationAlpha; Vector3 position; Vector3 velocity; float life = 0f; public void Update() { position += velocity * 1000f; life += .1f; } public projectile(Vector3 position, Vector3 velocity, float rotation, float rotationAlpha) { this.position = position; this.velocity = velocity; this.rotation = rotation; this.rotationAlpha = rotationAlpha; this.life = 0f; } public void Create(Vector3 position, Vector3 velocity, float ...Show All
SQL Server Union problem
I have follow query declare @z int select id from table1 union select id from table2 i want after union in @z save value 0, 1 or 2. 2 - when first and second select returns any results 1- when one of selects return any result, and another return nothing 0 when both selects returns nothing Can you help me. How i solve this problem 10x this is a good idea. Now I have another problem. I have ntext field in table and when select table, who include him, it execute very slowly. Do you know options to improve this. I want preview onli first 256 characters of field. Thank you ...Show All
SQL Server No Service Pack 1 installation steps ?
Hi There I understand that from Sql Server 2005 service packs should be able to be applied with no disruption, is this true I want to install service pack 1 on our 2005 instances but i cannot find any documentation in BOL or the official SP1 website on installation steps. Is there no thing i need to do when i install the service pack I am just weary of applying a service pack to the instance while users are woking etc. I find it very starnge that they are no reccomended steps to follow before applying th service pack. If anyone has a link to this i would really appreciate it as i cannot find ot anywhere Thanx Ok so i tried just installing SP1 , i got many , file lock waringing that requir ...Show All
Visual Studio 2008 (Pre-release) Images with raw pixelsize, not DPI-relative.
How do i display an image in it's real pixelsize If you just add an image in xaml it will be resized to the image's DPI / the screen's DPI or something like that. The best would be if there's some kind of global property so no images in my app will be resized, but a simple property for the Image will also work fine. I agree with your feedback - I'd encourage you to submit it as feeback on the SDK page on MSDN ( http://msdn2.microsoft.com/en-us/library/ms748873.aspx ). That said, we do call our 96th's of an inch "device independent pixels", or "pixels" for short, though obviously this term is overloaded when we're also talking abour raster images. ...Show All
Visual Studio Express Editions install problems
ok i went to intall and it said i needed to download system pack 2 so i did and i restarted my computer but when i went to install it it still said i needed to install system pack 2 Hello Re: install problems I am going to mark this thread as answered since you have not followed up with any further information on your problem - I assume you solved the problem yourself or one of the suggestions in this thread helped you solved the problem. If you have a solution you could post it so others can find it. If you do not have a solution then please submit further details and then mark the thread as unanswered. Thanks Damien ...Show All
Windows Forms control updates and various events
Hi, In a windows application, I am trying to update a control after all the other updates are processed. Ok, maybe need some clarifications: I have a control containing other controls. Those controls have event handler connected to some of their events (such as updated). What I am doing is this: Load the main control and its controls Update the data bound to those controls Notify that update is completed The problem I run into is that the events fired by the controls occur after the last step (Notify). Short of disconnecting all the signals and reconnecting them (long and manual process), is there a way to let the system know to process the pending events and continue I was under the impression that events we ...Show All
.NET Development Convert string to int
Is there anyway to convert a String to Int say if I have String width ="640"; I want it to assign to int dimension=width I don't want some conversion like String char="A" to integer which become 10. Just a straight conversion Is it possible Matt Sipes wrote: Don't make it so hard on the guy! Parsing Come on! lol string width = "640"; int dimension = Convert.ToInt32(width); Convert.ToInt32() just called int.Parse() anyway. :) ...Show All
Windows Forms Drag and Drop between my application and windows explorer
Hello Gurus, I have an application developed in C# ,drag and drop option implemented within the appication. In fact, I am able to drag the files from external windows explorer and drop em on my application. Now I want to drag the files from my application and drop em on external windows explorer or desktop and my application should be able to copy them. Could you please give me some suggestions or sample code that does similar thing BTW, I am using Visual Studio.NET 2003 version. Thanks, Sathish Kumar It is the shell that gets the drop notification and it must handle the action, your app has no idea. That's normally done with a Shell Drag and Drop handler. Unfortunately, you cannot write ...Show All
SQL Server When Windows Firewall is ON, SQL Server does not get connected thru TCP
I am using SQL Server 2005 Express + SP1 on a Windows Small Business Server(SBS) box. The SBS is connected to a client thru LAN. Following are what I gave as IP address and DNS on the server: IP: 192.168.16.2, subnet mask : 255.255.255.0, Preferred DNS server: 192.168.16.2, Default gateway and Alternate DNS Server blank On the client, I have, IP: 192.168.16.4, subnet mask : 255.255.255.0, Preferred DNS server, Default gateway and Alternate DNS Server blank I can ping and connect to either of the machines. If I do a sqlcmd -S "tcp:servername\INSTANCE,port", I get the following error message: HResult 0x80090304, Level 16, State 1 SQL Network Interfaces: The Local Security Authority canno ...Show All
Visual C# Simplified way to assign date values
Hi all, i have a Form that allows the user to enter an Hour and Minute value, which I then need to convert into an actual date value, which I am doing as follows... objInspectionHeader.m_dtInspectionDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, intHour, intMinute, DateTime.Now.Second); But to me, this seems very long winded. Is there a more simplified way that I can just assign the entered Hour and Minute value to a date current date Thanks Thanks for the reply. But doesn't that add the hours and minutes onto the current datetime For example: Now = 19-01-2007 13:00:00 DateTime.Now.Date.AddHours(3).AddMinutes(30) = 19-01-2007 16:30:00 I need the hour and minute value replacing their respective values ...Show All
Visual Basic regsvr dialog confirmation
This might be a imple solution to someone but I can't figure it out. I need to know how to register a dll without getting that annoying confirmation message. My code is below. Thanks! Shell( "regsvr32 operate.dll /i" ) 'to install Shell( "regsvr32 operate.dll /u ") 'to uninstall How are you deploying you application. If your using clickonce which is the default publish functionality on VB and rather neat. The you can do generate a bootstrapper package to include as a requirement on the installation - just like you would have the .net 2.0 framework as a requirement. Some other tools / resources which are extemely useful in generating the bootstrapper files · ...Show All
Windows Live Developer Forums Saving pushpin into database
How do I save push pin into database http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1060253&SiteID=1 Its a pretty generic question, there are so many possible answers. If we assume you have some interface already to allow users to create pushpins then you need to save that data into a database. Design a table to store the data Build server side code to retrieve the data and send to client page Build server side code to accept new pin data from client and save to database. I would take a look ASP.NET and create webservices, then look at ASP.NET AJAX to call the webservices directly from javascript. John. ...Show All
.NET Development error 25015 .net framework 2.0
hi im new to this forum so i dont know if im posting this in the right forum. im having this problem while installing .net framework 2.0 sorry for my bad translation Error 25015.the instalation of assembly C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll has failed cause of a system error: the system cannot find specified path. can somebody help me pls Moving to the NEW .NET Framework setup forum: http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=1020&SiteID=1 ...Show All
Visual C++ XP Manifest Problem
I have a problem using an XP Manifest file for Common Controls. If I create a template Win32 project, which creates a simple window with an About Dialog, build it, then run it, it works as you would expect. However once I add the manifest in the Linker -> Manifest part of project options, when I click Help -> About, nothing happens. I've debugged the code and DialogBox is returning -1, but GetLastError is returning 0. This happens when I try to run any program I've compiled with a manifest that uses DialogBox or MessageBox. They fail but GetLastError returns 0. What's going on The Linker -> Manifest File -> Addition Manifest Dependencies entry is as follows: "type='Win32' name='Microsoft.Windows.Common- ...Show All
SQL Server Date in String doesn't work
Can anyone please tell me why this query works: DECLARE @valuation_date smalldatetime, @non_admit_date smalldatetime SET @valuation_date = '2006-03-31' SET @non_admit_date = DATEADD(dd, -90, @valuation_date) SELECT SUM(Premium) FROM Reserves WHERE Reserve_Paid_to_Date >= @non_admit_date And this one does not: DECLARE @valuation_date smalldatetime, @non_admit_date smalldatetime, @arc_sql nvarchar(4000) SET @valuation_date = '2006-03-31' SET @non_admit_date = DATEADD(dd, -90, @valuation_date) SET @arc_sql = 'INSERT INTO Results SELECT SUM(Premium) FROM Reserves WHERE Reserve_Paid_to_Date >= ' @non_admit_date SELECT @arc_sql exec sp_executesql @arc_sql The second one gives me this error: "Syntax error converting ...Show All
