GraemeP's Q&A profile
.NET Development Is C# working with degrees or radians?
When you use the Math library the Sin, Cos, ACos, etc methods work with radians but in graphics.DrawArc the startAngle and sweepAngle must be given in degrees. It's not a big problem but it's a bit confusing to have to go passing between radians an degrees all the time. PS Sorry, I know I have to improve my English C# doesn't use either. The C# language has no built-in notion of angles. And since it doesn't have any native representation of an angle, it doesn't actually make sense to ask whether it works with degrees or radians. Math.Cos, Math.Tan and so on are not part of C#. They are part of the .NET Framework Base Class Library. As such, they are language-neutral - the same functions are available to VB.NET ...Show All
Visual Studio Obfuscate Web Deployment Project-Output (bin) before Packaging into Web Setup Project
Hi there. I have a solution that contains various projects. One of them is a Web Deployment Project and I need to secure the containing dll before it is packed into a Web Setup Project. Unfortunantly that can’t be done via command line and I need the ability to tell the Web Setup project to just take the already compiled files from the Web Deployment Project without recompiling them during its own build process (because my modified dll’s are replaced). How can I accomplish that Best regards, Brokit ...Show All
Windows Forms System.AccessViolationException in System.Drawing caused by DataGridView
How do I solve the following problem or work around it I'm using the VS2005 Professional Version 8.0.50727.42, with the .NET Framework version 2.0.50727, and writing in C#. I have a project that uses several DataGridViews on it's forms. These cause intermittent System.AccessViolationException errors as shown in the dump below. Sometimes the error is caused upon first displaying of the form that contains the DataGridView, and other times when windows are moved across the top of the form that displays the DataGridView. Interestingly, almost every time this happens, I get a small diagonal line on my DEVELOPMENT ENVIRONMENT window that doesn't go away until I close and re-open I saw a post back in June that briefly mentioned this prob ...Show All
Visual Studio Problem after install of VS 2005 - unable to start debugging - coloader80dll
After I installed Visual Studio 2005, when I try to start/debug a visual basic program it gives the following error: Error while trying to run project : Unable to start debugging A Visual Studio DLL, coloader80.dll, is not correctly installed. Please repair your Visual Studio via 'Add or Remove Programs' in Control Panel. If the problem persists, you can manually register coloader80.dll from the command prompt with 'regsvr32 "%CommonProgramFiles%\MicroSoft Shared\VS7Debug\coloader80.dll" ' I have tried both suggestions to no avail. I have tried to remove anything related to VS 2005 and start anew, no luck. Any ideas Thank You. Solution: Export and Import a project templat ...Show All
Visual Studio How to filter ItemTemplates in "Add New Item" dialog?
Hi there, I implemented my own Project SubType and some Project and ProjectItemTemplates. When adding a new item, I'd like to filter the shown list of ItemTemplates. Is that somehow possible Regards, Jens Actually, I don't have a HierarchyNode or ProjectNode implementation. All I got is a project subtype. Is it still possible ...Show All
SQL Server Grandtotal row diff between analytic and regular aggregate functions?
Hi, Assume there is no sale with over 2000 units, the first query returns no row while the latter returns 1 row with a null value. I am not questioning the result, I would like to understand conceptually what semantic difference between the Sql99 analytic function and regular aggregate function makes the result different in this case. select sum(Quantity) over() from orderdetails where Quantity > 2000 select sum(Quantity) from orderdetails where Quantity > 2000 thanks in advance, Jeopardy thanks, that makes sense. I guess the root reason is that unlike group by, partition by is not a row reduction operation, so there is no need to produce an aggregated rowset as in the case of regular aggregate f ...Show All
SQL Server Reoprting Server cannot be viewed by the client machines
I have set up a RS on my local machine and it can be viewed by the machine. However this cant be viewed by the client machines ..wonder what could be the settings that need this to work. Regards Alu Hi, Can you just explain little more on your probelm. If i am correct, are you getting any ASP.Net page error while trying to view the report from client machine If it is so, then try out the following, In your client Internet Explorer, just delete all cookies and offline contents. after that do the following. Tools --> Internet Option --> Setting(Temp internet files) --> select Every vist to the page. Now you should be able to view the reports from your client machine. I dont know the root cause for this por ...Show All
.NET Development COM+ EnterpriseServices distributed transaction between XP SP2 and Windows 2003 SP1 fails
In my system ClientApp.exe calls ComPlusApp1.dll on XP and ComPlus1.dll calls ComPlusApp2.dll on Windows 2003. I get error << System.Runtime.InteropServices.COMException (0x8004E003): You made a method call on a COM+ component that has a transaction that has already aborted or in the process of aborting. >> I have ClentApp.exe and ComPlusApp1.dll on XP: using System; using System.EnterpriseServices; namespace ComPlusApp1{ [assembly: AssemblyVersion("1.0.1.1")] [assembly: AssemblyKeyFile("..\\..\\ComPlusApp1.snk")] [assembly: ApplicationName("ComPlusApp1")] [assembly: ApplicationActivation(ActivationOption.Server)] ...Show All
SQL Server Error while restoring database,
Hi, Im trying to restore a database, when i try to restore by selecting the file groups option it gives me an error Microsoft SQL DMO The backup set holds a backup of a database other than the existing database. RESTORE DATABASE terminated abnormally. I tried deleting all the tables and the stored procedures that are there, but it still gives the same error. I had a similar problem, but I was trying to restore the ".bak" file from my laptop to my pc. I had copied the file my pc My Documents folder and tried to restore from SQL Management Express, kept getting the same error. Eventually i tried placing the file in the original backup location it was created but this time on the pc i.e. " ...Show All
SQL Server Logger
Dear all, I'm using the following command to schedule an export data job. Now I would like to know how to use the option "/logger" getting a log file for verification. DTExec /FILE "C:\Test.dtsx" /CONNECTION DestinationConnectionFlatFile;"c:\test.csv" /CONNECTION SourceConnectionOLEDB;"Data Source=CP0762;User ID=user;Initial Catalog=DATA_CONV;Provider=SQLNCLI;Auto Translate=false;PASSWORD=password" /MAXCONCURRENT " -1" /CHECKPOINTING OFF /REPORTING EWCDI Hi Craig Is there any way to tell DTExec to output XML logs without having to configure a file connection inside the package My context: I have many different DTSX packages, and would like to enforc ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA and its runtime libraries
I haven't heard anything on the runtime files that would be needed to fully execute a XNA program, at least, officially. Managed DirectX caused three runtime files before which I think stopped a ton of programs from being released. Little Timmy wanted to show his friend a Pong game that he wrote, but he needed the .NET framework installed, the Managed DirectX files and the DirectX runtime itself. Add each one up and it was roughly an extra 80mb (I'm guessing). Downloading the games from the web was easy, but executing them had requirements like "you have to download this, this and this." I would have skipped to another game. Is this going to be the same issue with XNA How does the installation process differ ...Show All
Visual Studio IE Maximized
How do I get IE to open maximized when I run a web form I have been trying to figure this out for weeks. Eric ...Show All
Visual Studio Slipstream Sp1 into VS 2005.
Because of the long duration (2-3 hrs on Vista Business), I think it would be a great idea to slipstream the SP1 into a new DVD, just like I can do this with XP. Is this possible and how can I do this Please read the following blog post from Heath Stewart: Slipstreaming Visual Studio 2005 Service Pack 1 ...Show All
Visual Studio 2008 (Pre-release) Unwrapped messages
Hi I've developed a WCF-WebService. Now I've the problem, that when I generate the client-code, it always unwraps my Request/Response-Messages. I tried it both with svcutil.exe and wsdl.exe, and both made it the same way - so I think something is wrong with my service-definitions. Sample: Server: [MessageContract] public class Request { [MessageBodyMember] public string Test; } [OperationContract] public void Test(Request req); For this I got the following result on the client: public void Test( string test); Any Idea Thanks Dani Yes I saw that... but I don't like that behavior at all :-) I mean, for the in-values I can agree, but for the return-values, it's just bad. When I have ...Show All
Visual C# Switch statement
Hi, all: [I guess this could be considered a rant, but I'm still curious if anyone shares my opinion on this] I am still wondering why the switch statement is not more flexible. For example, I feel that a switch statement using objects makes sense. I'll give a more visual example for ease of understanding more than anything else, so picture this: I have three buttons on my form, button1, button2, button3. I set the click event to the same event handler, button_ButtonClick. Inside the button_ButtonClick method I want to check the sender to see which button was clicked, so I do this: switch (sender) // or even (sender as Button) { case button1: // do something here break ; case button2: // do somethi ...Show All
