bashok's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Blitting?
I've checked through the XNA Documentation, but there doesn't seem to be any way to 'blit'. For those of you unfirmiliar with 'blit': Blit is a way to draw something. For example, say you create a "Texture2D" variable, set the size etc... But the texture is blank. The normal way to create a texture to this is to load up a bitmap image with it through the ContentManager, right But what if you want to use a whole sprite-sheet with many images Back to the blank, say, 65 x 65 bitmap image, you obviusly don't want this 2D image of the player to be a whole 1024x768 sprite-sheet. So this is where I used blitting in other programs, it basically asks for the x, y co-ordinates, and the length of the bitmap and takes a picture from that x,y and 'c ...Show All
Windows Forms Treeview Question!
I’m using a tree, I’ve populated it fine. But if I have a form with a tree on it, the tree is expanded . Then when there is no activity on the pc for a while I hide the forms, show a log on screen. But when the user logs on again I show the forms again. But the tree is then collapsed on these forms, why did it collapse and not stay expanded Is there a reason it does this Is there a way to stop it from collapsing by itself What would the appropriate solution be Also when filling the tree, I do not want it to scroll down. I use treeGLAccounts.BeginUpdate(); //all my code here to fill the tree treeGLAccounts.EndUpdate(); I thought using the above would not make it scroll down when filling ...Show All
Windows Forms how te get date only?
I am using this code to get all available doctors in a specefic dates (regardless of the time). sql_command = new SqlCommand ( "sp_get_available_staff" , sql_connection); sql_command.CommandType = CommandType .StoredProcedure; sql_command.Parameters.Add( "@starttime" , SqlDbType .DateTime).Value = e.Start.Date; sql_reader = sql_command.ExecuteReader(); and this is mt stored procedure: SELECT working_schedule . id_number , persons . person_name FROM working_schedule INNER JOIN persons ON working_schedule . id_number = persons . id_number WHERE DATEDIFF ( mi , starttime , @starttime ) = 0 ORDER BY persons . person_name but it's not retriveing anything t ...Show All
Windows Forms Vertical Label
Does someone know how i can make a vertical label like this : H E L L O Thanks Here's my adapted version of noBugz in c# : using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using System.Drawing; namespace ALSTOM.STM.PIS.Forms.Controls { public class VerticalLabel : Label { public VerticalLabel() { SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); this.AutoSize = false; } private void CalculateSize(string value) { this.AutoSize = false; int height = 0; int width = 0; Size sizeTemp = new Size(); foreach (c ...Show All
Visual Studio Team System How do I view test results stored in the Load Test Results Store?
I have set up the Load Test Results Store and have ran several load tests. I can see that the load tests are stored in the database. How do I select and view the test results stored in the database What I didn't understand was how to re-connect to the previously ran test via the "Test Runs" window. This explains perfectly how to accomplish it. Thanks ...Show All
Windows Forms Combo Box Items Value
Hi Guys, I wanna have a combo box that returns a value other then its text to its data source. Basically, I have a textbox that has the values 'Male' and 'Female' and I have it bound to a datasource and I want it to return a value of just m or f. Any ideas Thanks in Advance That does help but I need one more thing. I need the value of the selected item to be bound another field in a database. I have tried doing this through the form designer but when I change the field and then click my update button the text changes to F or M respectively. Any ideas ...Show All
Visual C# Reflection of an image (Fastest reply would be nice)
I am trying to make a reflection of an image but having trouble doing so. I have had to take my first image put into a picturebox make another picturebox with same image and flip Y coordinates to make it look like a reflection but when I try to add linear gradient brush in a rectangle around my reflection image picturebox I keep getting an error so far this is my code see if anyone is able to figure out what is wrong. Just so everyone knows I am a newbie at this and just fooling around with code to try to understand C# better because I am having trouble finding webpages with tutorials for C#. Thanks for any help on this. icon_ref is the icon's reflection I am trying to affect so it is the reflection image picturebox. iref is the i ...Show All
.NET Development SQL Connection error
Hi, I am getting the an error when my Web application (running on a Win 2k3 Server, IIS, .NET Framework 2.0) tries to contact the SQL Server 2000 database (running on Win2k3 Server). The error is "Login failed for user <username> Reason: Not associated with a trusted SQL Server connection." I have gone through the points in the URL http://support.microsoft.com/kb/889615/en-us . The SQL Server is using Mixed Mode authentication and below is the connection string i am using connectionString="server=win2003-3;User ID=appuser;password=appuser;database=AppDB;Connection Reset=FALSE" The same scenario is working in my development environment , but i am facing this issue when i have moved to my P ...Show All
Software Development for Windows Vista Skip executing activites or execute desired activity from Sequential Workflows
Hi, We have a workflow requirement to Execute activity A then execute activity B, before executing activity C redirect to human user for response, wait for response, if response is positive, execute activity C, but we will never get negative response. Currently we are using Sequential Workflows. We are invloking these workflow from web services not from application, How to handle this in Sequential WF, because this WF will be executed as an new instance and activity A and B will executed again which we don't want. Is it possible to skip the activities A and B and jump onto the one of our interest e.g activity C or can we directly invoke workflow from activity C Due to varous other issues we don't want to use State Machine W ...Show All
Windows Forms Class Library (dll) On Network drive
I'm currently developing a .net dll which I want to put on a network share and get various applications to use it - can anyone tell me the best/recommended way to do this I have something similar setup for a vb6 dll, I use late binding in the client apps and register the dll on all client PCs. Is there a better way in .net Thanks in advance Jon When you publish an application with ClickOnce you assign the entire package a version number and should something in the package need to be updated the only way to do so would be to make a change and republish the entire thing with the new change and believe it or not this isn’t something that is the fault of ClickOnce. Remember that in .NET, assemblies and a ...Show All
Smart Device Development UPnP: problem with QueryStateVariable
Hello! I have a problem with the UPnP API on Windows Mobile 5.0 Pocket PC Emulator (Microsoft Visual Studio 2005)... My software is able to find devices and invoke their actions but some things don't work: 1) InvokeAction of an action with one (or more) output parameter: it returns an array with one (or more) elements but the type of these (VARIANT) element is VT_ERROR. 2) Same happens if I use QueryStateVariable (returned VARIANT has type VT_ERROR). void CMyProject::QueryStatusVariable(IUPnPService *pUPnPService, CString VariableName) { HRESULT hr=S_OK; TCHAR tszMessage[2048]; CString strVariable; BSTR bstrVariableName = NULL; bstrVariableName=VariableName.AllocSysString(); if (bstrVariableName! ...Show All
Visual Studio VB.Net ReportViewer Local Mode Windows Forms Project
I work in VB.Net and I've got windows forms project that uses the ReportViewer in local mode. When I run my report using Visual Studio 2005 everything looks fine. The form pops up, a little green progress image displays, and the report loads just the way I want it to. However, if I run the .exe outside of Visual Studio this is not the case. The form pops up, but instead of the green progress image, the report displays the message "Report processing was cancelled." and a few seconds later the report displays just fine. I've downloaded sample projects of a similar nature that were written in C# and I do not get this same problem. I tried downloading Visual Studio 2005 SP1 and installing but that did not ...Show All
SQL Server Using Multiple Versions of SQL Server in a Replication Topology
Hi there, I have one publicacion on ms sql 2005 Enterprise w.sp1/MS Windows 2003 Enterprise w.sp2 and one subscriber on MS sql 2005 Enterprise w.sp1/MS Windows 2003 w.sp2, but I have also 3 subscriber on MS SQL 2000 w.sp3/MS Windows 2000 advanced server w.sp4. They replicate the same database with a publication compatible with 80RTM, All works fine with data replication, but I can't replicate DDL to MS sql 2005 suscriber, I don't care that don't replicate DDL, but I want manually alter triggers at MS sql 2005 suscriber, but I get this error at the subscriber on when I run the ALTER TRIGGER statement : Msg 21531, Level 16, State 1, Procedure sp_MSmerge_altertrigger, Line 67 The DDL statement cannot be performed at the Subscribe ...Show All
Visual Studio VSS6.0c vs VSS2005 different behaviour?!?!?
Dear forum members, I have a very strange problem. We store a MS Access database in SourceSafe with VSS 6.0c all the time. For a few months we also use VSS 2005. Sofar so good and having no problems. Recently (and I can also reproduce it) I found out that the 'Get Latest Version' will always be okay for both VSS6 as well as VSS2005 but if I get the database with an older label VSS 6.0c always can get it right but VSS 2005 might get a corrupted version !!! Can someone show some light on this matter Also, it would help to know what encoding VSS2005 thinks the old versions are. Doubleclick each entry in the History dialog to get detailed properties for the old versions. ...Show All
Visual Studio HTML Help from .HLP Projects
I have a series of projects to convert from the older .hlp style to .chm. The HTML Help workshop has a convert option, but it fails most of the time for graphics. I use HTML Workshop to convert the .hpj file to corresponding .hhp relates files. All seems to go fine, but virtually all the graphics images in the original .rtf files are missing from the fiinal .chm result. In some cases, it works fine, but that's the minority of cases. Any ideas Ed Yes, unfortunately there is not a convenient one-to-one conversion mechanism in the basic tools we provide. If you use a tool like RoboHelp, you may be able to more successfully import your .hlp source and convert it to an HTML Help project. ...Show All
