USACoder's Q&A profile
Windows Forms ListView (CLR 2.0) in virtual mode and OwnerDraw with mouse over = problems
Hi, I use the new version of the ListView (.net framework 2.0). I decided to make it virtual (due to the large amount of items) and set the ownerdraw property to true (to have the full control on the items drawing). The items (and sub items) are correctly displayed as long as i do not move the mouse over the items/subitems. Since i start to move the mouse over the items/subitems, the content of the subitems (a string) disapears. It is like the Invalidate was not correctly done internally by the control. I put a break point in the function that draws the subitems and i never break into it (protected override void OnDrawSubItem) when i move the mouse over. Also, the selection of the items is not painted correctly. I joined the class derived ...Show All
.NET Development .Net Runtime Error
Pls I am having these errors on my win2k3 server running terminal server service and my remote staff connect through this server to their applcations.Any Idea as to how to stop this error 1 .Event Type: Error Event Source: .NET Runtime Event Category: None Event ID: 0 Date: 10/6/2006 Time: 8:58:46 AM User: N/A Computer: TS Description: The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the ...Show All
Community Chat My creation: Galaxy war (2D game using DirectX)
Hello there. This is my game: Screens: Selecting a map, lets start on Easy Shooting stars in game, fun multiply backgrounds Lets see my score Download game: Galaxy war Official website (for more information) The game saves progress as you advance (the save is encrypted so forget cheating ;) There are multiply backgrounds and multiply ships. The design of the game is so good that the user can create ships himself. It takes about 2 second to add another level on the map, the information is kept in an array inside the program. I have created a version containing songs in the background (the ending background music was set to Back to the Future theme song) but first: It was a .wav file over 30 mb and I still haven't learned how to play m ...Show All
Visual Basic Vb6 to Connect With SQLEXPRESS
Hi I am trying to connect to sqlexpress from vb6 and getting error: a database with the same name exists,or specified file cannot be opened, or it is located on UNC share. Using following code Dim cn As ADODB.Connection Set cn = New Connection cn.ConnectionString = "Provider=SQLNCLI.1;Integrated Security=SSPI;" & _ "Persist Security Info=False;" & _ "AttachDBFileName=" & App.Path & "\northwnd.mdf;Data Source=.\sqlexpress" cn.Open If anyone please help Zaabdullah Thank you for help. I used this string it worked. cn.ConnectionString = "Provider=SQLNCLI.1;Integrated Security=SSPI;AttachDBFileName=" & ...Show All
Visual Studio Express Editions Visual Basic 2005 Express
Hi, I need help to start the GPIB programming using visual basic 2005. I used visual basic to write to RS232 and TCP/IP port before but nv use visual basic 2005 with GPIB. Can someone please show me how i can initialise a GPIB port and how i can send a simple command to the equipment Thks Hi I want to do automation testing using GPIB port. I have purchase PCI-GPIB card from NI and would like to use Visual Basic 2005 Express to do the programming. Is Visual Basic 2005 Express sufficient enough for the task Please advice. Thanks ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA 360 games.
Will you be able to burn game's off your computer from the XNA game studio or not I was talking about using XNA's game studio and burning the games on a dvd to play on the 360 instead of saving it on your hard drive! ...Show All
Visual Basic Moving and Renaming (date&Time stamp) directories problems in VB.Net 2005
I am trying to move the content of directory "C:\WIM\Current" to "C:\WIM\Archive" then move the content of the directory of "C:\Pics_Detect" to "C:\WIM\Current" and rename it with a current date and time stamp. When I run my code I have an exception "Cannot create a file when that file already exists." and I am not sure about renaming using datetime stamp how good is it going to work. this whole application will be executed every 2 minutes on average. --------------------------------------------------------------------------------------------------------------------------------------------- Module Module1 Sub Main() For Each foundFile As String In My .Computer.File ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA with VertexBuffers only? (No loading content)
I'm trying to create just a simple test app that draws some triangles on the screen. I don't want to load any models, just use a VertexBuffer and IndexBuffer right now. I load the buffers and set them on the GraphicsDevice. When I call DrawIndexedPrimitives, I get the following error: "Both a valid vertex shader and pixel shader (or valid effect) must be set on the device before draw operations may be performed." After some searching, I found a few people mentioning that your graphics driver must support vertex shader 2.0 and pixel shader 3.0. The card isn't all that old, but to be sure, I checked the GraphicCapabilities on the GraphicsDevice and both the vertex and pixel shaders are 3.0. So I don' ...Show All
Visual C# Time Manipulations
How to store only Time in objects Which data type should i used I want to Manipulate only Time. Means difference between times and add seconds to Time. In that there is no date. Tell me any suggestion Hi, You mean TimeSpan System.TimeSpan ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Orienting 3D objects along a velocity vector
I'm working on a bullet/missile class for my 3D game and I'm struggling with trying to figure out how to construct the rotation matrix to have my mesh oriented with the direction of my velocity vector (a Vector3). It seems like it should involve two rotations (since one axis will be the up-vector) and probably a little bit of Math.atan2 magic. Can anyone help me out thanks for the input everyone. I seem to have gotten part of the way there with Gerix's explanation. This is how my code goes at the moment: Matrix world = Matrix.Identity; // create an identity matrix to start with Vector3 v1 = new Vector3(0, 1, 0); // the model's natural direction Vector3 v2 = bullet.velocity; // the bullet's vel ...Show All
Smart Device Development DLLs and Message Queues
Hi all, I have a service EXE which creates a window and recieves windows messages from one other exe that I have. Based on the message recieved, it performs necessary operations. I need to convert the service EXE into a service DLL. I am not able to make this work. The findwindow fails in my EXE and I can not find the handle to the DLL where I need to post the messages. The reason I understand is, service DLL is a child window now and findwindow do not find child windows. One more problem is since this DLL makes a window I am not able to see my EXE's main windows also. How to tackle these Any guidance on this would be appreciated. Best regards, Ashish Vyas However I do not see my code re ...Show All
Windows Forms Design Time Settings of Size Does Not Stay At Run Time
I have developed a USER CONTROL in Visual Basic 2005 I have specified that its minimum width should not be less than 150 and height should not be less than 6. As I have not put any restriction on maximum size, I can give WIDTH = 250 at design time. But when I run FORM having this USER CONTROL, it automatically becomes WIDTH = 150. I am not setting width anywhere from code, but it takes 150 as default width at run time and dont remember design time setttings I did. Why Help... ...Show All
Software Development for Windows Vista my code
Tell me how to set a image as wallpaper using c# Willfin David PJ. van de Sande wrote: This works for Bitmap's only, so when you want to set a other image-format you must first convert this to a Bitmap image. And how does Windows set a wallpaper When you do this through Display Properties->Desktop, Windows absolutely normally sets not only .bmp file as wallpaper. If user of my application wants to set one wallpaper from .jpeg, then another, and so on, and so on, I think, it is not rational to convert and save each .jpeg file to .bmp, because .bmp files are too large.. how can I solve this problem ...Show All
SQL Server Execute multiple statements at once...
I am not even sure if this is possible but I want to be able to excute several statements (or SPs) at once from inside a SPs (or any other method). What I am doing is a I am taking data from a single column, multiple rows and making it into one row (i.e. data1 + data2 + data3....) But I am doing this to a total of 2.1 million individual rows and the result will be about 204k rows.... what I have written is basically a nested loop and it works fine but very slow... slow as in it has been running for 24 hours now and it is about 60% done... I need this to finish in under 36 hours preferably... If I could handle more than one set of data at once (there will be no duplicates) I could speed up the process by how ever many I feel like work ...Show All
Visual Studio 2008 (Pre-release) Support for SQL Server 2005 Schemas
Hi, I tired to port my existing schema to ADO.NET vNext and this didn't work at all. The wirzard just said that the connection is closed and I need to call Load before within the output window. Finally I figured out that the reason for this is that I'm using various Schemas. After bringing all tables into the "dbo" schema the wizard worked fine. Is this only a limitation of the wizard Are the any plans to support schemas in the near future Thanks in Advance, Thomas If, by "schemas", you are referring to the SQL Server 2005 ability to store schemas as columns in tables, then that is not currently supported. I looked for a reference to it but couldn't find anything. Given t ...Show All
