Markus Wos's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Debugging program that won't start
Whenever I try to start my program, I get a dialog box saying "The application failed to initialize properly (0xc0000022). Click on OK to terminate the application". With the debugger, it does the exact same thing, giving me no opportunity to find out what is going on; if I try to break it once the dialog box is up, I get another dialog "Unable to break execution. Please wait until the debuggee has finished loading, and try again" The only vaguely informative piece of information is a message in the debug window: "Debugger: An unhandled non-continuable exception was thrown during process load" ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Using Sprite to draw 2D graphics
Hi all, I use Sprite class to draw Bitmaps on the screen. In the sprite class, I only know how to do some simple effects on the texture, such as setting the transparency. The problem is that I want those textures to be affected by Lighting. E.g. If the color in the texture is blue, the outcome result is Green. Also I want to do other effects like a spot light on the texture. I have read a book (C++) and seems that I have to use "device->draw primitives" instead of Sprite to do such effects. But I don't know whether there are simply ways to do that(in C# and MDX). Thank you ...Show All
Visual Studio Macro EnvironmentEvents stopped firing
The title of the message pretty much sums it up. I have no idea when they stopped firing or what might have caused it. Can you run code within that macro project If there are any code errors, then the code will not compile and event handlers cannot be connected. Craig ...Show All
Windows Forms Copy one DataTable to another DataTable?
Hi, How can I copy selected columns from one DataTable to another This should be easy, but I can't seem to figure it out. Beener Hi, Why dont you just copy the datatable and remove the rows you need -Edward ...Show All
SQL Server Error when importing Access report
Hi! When i'm importing into ReportServer report made with Access i've got those errors: An error occurred while the report Bank Account Transactions By Type was being imported: Item has already been added. Key in dictionary: '[Bank_x0020_Account_x0020_Transactions_x0020_By_x0020_Type].Parameters![trans type]' Key being added: '[Bank_x0020_Account_x0020_Transactions_x0020_By_x0020_Type].Parameters![trans type]' An error occurred while the report Bills from Purchase Orders by Supplier was being imported: Item has already been added. Key in dictionary: '[Bills_x0020_from_x0020_Purchase_x0020_Orders_x0020_by_x0020_Supplier].Parameters![vendor]' ...Show All
Windows Forms Encode email as HTML
Hi, I’m trying to send an email using MAPI32.dll. I’ve succeeded to send a simple plain text using P/Invoke and MAPISendMail function. Do you have any idea how can I send an email with HTML format Thank you in advance You need to set the BodyFormat proprety of your MailItem class, e.g: mailItem.BodyFormat = Outlook.OlBodyFormat.olFormatHTML; Hope that helps, - ...Show All
Windows Forms Getting Output Debug screen messages to show on a listbox in windows form
Hi... How do I get output debug messages generated by the debug mode (ie. Start with debugging) If I can get them, I wish to display them to listbox that I have in the windows form I created. Is there a smarter way other than using the following : lstDebugMessage.Items.Add("Whatever is inside debug message"); Where lstDebugMessage is the listbox I generated in my windows form. Thanks for any ideas! hi try { //Operation } catch (Exception ex) { lstDebugMessage.Items.Add(ex.Message); } Hope this helps ...Show All
Visual C++ Anyone know a good way to draw an Ellipse inside a tilted rectange using CDC?
I know using CDC you can quickly draw an ellipse inside a rectange using the ellipse function. However, the sides of the ellipse's bounding rectangle must be parallel to the screen axes. I need to find a quick/easy way to draw an ellipse inside a bounding rectangle that has been rotated. Anyone have any advice on how I could do this Thanks alot for the help guys. Jeff Sholl The simplest method is to use SetWorldTransform function. If you are using VS2005 this method is included in the CDC class. For older versions you need to call the Win32 API function using the HDC that you can obtain from the CDC o ...Show All
SQL Server Get value of 10 textboxes to decide footer color
If I have the 10 textboxes in my footer with a value of "X" (from an IIF() expression), then I would like to alert the users and have the footer a different color. I'm trying to get the value of the textbox, but keep getting an error of it being undeclared. I'm trying different syntax, but can't get it to work. Here's the code: = IIF( textbox11 ="X" or textbox15="X" or textbox19="X" or textbox27="X" or textbox23 = "X" or textbox31 = "X" or textbox35 = "X" or textbox39 = "X" or textbox43 = "X" or textbox47 = "X" ,"Gainsboro","Transparent") That seems to get me closer, but it still doesn't get me ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Rotation matrix: absolute rotation instead of relative?
Hi, When multiplying rotation matrices for rotating around x, y and z-axes R = Rx * Ry * Rz ( http://en.wikipedia.org/wiki/Rotation_matrix ), I get a relative rotation matrix, meaning that rotation around Y is not the original Y-axis, but the new axis that has "occured" after rotating around X. What I want to do, is to have absolute rotation, so that the Y-rotation is performed around the original Y-axis, and not the new one (absolute rotations instead of relative). If you know the math for this, I would appreciate if you let me in on it :-) Thanks!! > I get a relative rotation matr ...Show All
Visual Basic Calculation in Visual Basic 2005 express
I need help please on this question and i could not understand where to begin.The question say, Input Calculate Circumfrunce Area of Circle. Value and surface area sphere. : Pi i = e Pi i square =theda 4/3 Pi i cube = V 4Pi i square = SA please, some give at least some sort of direction i'm just a starter in Visual basic. thanks guys. i'm covering a pillow. i know the diameter, 16". i couldn't remember the simple formula to measure the piece that goes around to attach the top to the bottom. a measuring tape you be to unseamly. thx ...Show All
Windows Forms replacing a column of the dataset
Hi, I want to replace a column of a dataset with certain string depending on the numerical value returned in the dataset. When I try to replace that column cells with appropriate strings, it says that I cannot store string in the column that is supposed to store Int16 type. My datagrid should be printing that string and not the number, is there any&nbs ...Show All
Windows Forms TaskVision VB.NET
YES! After a full week of dedicated work, I have ported every single line of this application to VB.NET! jc, what a butload of work. Soon as I can actually verify that all is working like it does in the C# version. I'll be happy to post my source here to anyone who is interested. I have learned a lot porting it over, and I hope you will& ...Show All
Visual Studio Express Editions another Problem after SDK\VC++
I just installed my SDK with VC++ EE, On the directory paths i just wrote this: C:\Program Files\Microsoft Platform SDK\Bin C:\Program Files\Microsoft Platform SDK\Lib C:\Program Files\Microsoft Platform SDK\Include. I dont know if this is the same problem with SDK installation but the error is not the same: befor the error was cannot find windows.h . now the error is: Error 1 error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup MSVCRTD.lib and Error 2 fatal error LNK1120: 1 unresolved externals C:\Documents and Settings\Quim Costa\My Documents\Visual Studio 2005\Projects\ ...Show All
SQL Server Locking tables...
Hi, I have a question regarding locking tables in transact sql. The situation is the following: a table named TableA which has two columns; ID and Name. a table named IDTable which has two columns REF_ID, REF_PREFIX in the IDTable we have the following entry: REF_ID = 1, REF_PREFIX = 'TbA' I have a stored procedure that will make a lot of inserts into the TableA. However there is another program that makes insert into TableA as well. They both read from the IDTable to get which ID to use (ID of course needs to be unique). A simplified version of the stored procedure is: "SELECT all entries to move from another table&qu ...Show All
