dbdoc's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Mouse Pointer not visible in Spacewar
I managed to get the Spacewar game running after modifying the code by setting graphics.AllowMultiSampling to false. However, the Mouse pointer is not visible on the screen and I have no control to start the actual game play. Can somebody assist me Go to the “GamePadHelper.cs” file and uncomment this line. //#define USE_KEYBOARD Now you can use the A,B,S,W,D, and X keys. I got this information from http://www.xnaspot.com/Tutorial_GettingStarted.aspx which is really helpful. ...Show All
SQL Server How to use cell data security with visual totals?
Hi, We are working on a project with SQL Server 2005 and SSAS. We created several roles using dimension security and one special role that requires cell data access permissions (i.e. cell security). This last role is giving us trouble since we do not know how to implement visual totals on cell security. A problem description follows: 1) We have a budget and expenses cube with a) Account, b) Time and c) Cost Center dimensions 2) The special role was created for a group of users who have the following requirement for data access permission: - for some cost centers, restrict access to some accounts - and for the rest of cost centers see all accounts 3) When looking at data at the cost center and account level, the role works fi ...Show All
SQL Server x64 Management Studio
Hello, I have a Win2003 x64 Server with a SQL 2005 x64. My client is not x64, and I can't install the x64 Management Studio. I understand that I need a 32bit-version - but where can I get it Do I have to buy a complete 32bit SQL 2005 just to get the Management Studio Best regards, /Mikael S I've got the same setup and use the developer edition that comes with Visual studio. You can buy the dev version for £25 as a standalone item. Dave ...Show All
.NET Development Escaping decimal points in regular expressions
I'm trying to do something that ought to be very simple. I'm trying to test whether a string (which is an argument to a command) is a valid value of the type I need. That is, I want it to be convertable to a double and be in the range 0.1-1.0. I have this line in my code: Regex ValidPause = new Regex("^((1\.0)|(0\.[1-9]))$"); The problem is that VS marks the string as bad and gives me the message "Unrecognized escape sequence." If I take out the backslashes, the red squiggly line goes away, but then it matches "0x0", which is obviously not what I want. How should I escape the decimal points correctly Hi. The correct regex is Regex ValidPause = new Regex(@"^((1 ...Show All
Visual Basic HOW TO: Loop Through a DataGrid and send it to a TextFile.txt
How do I Loop Through a DataGrid subform and send it to a TextFile.txt 'Este es el codigo que envia la informacion hacia el texto desde El DataGrid 'This is the code that sends the DataGrid Information to the Text File For Each currentrow As DataGridViewRow In Me .DataGridView1.Rows ' The Cells are the Colums For Each currentcolumn As DataGridViewCell In currentrow.Cells 'objfile.WriteLine(currentcolumn.Value + ",") objfile.Write(currentcolumn.Value & " " ) Next objfile.WriteLine() Next objfile.Close() ...Show All
SQL Server Stored proc poor performance need help with query optimization
I currently have a stored procedure in our SQL Server 2000 environment that will run great most of the time but periodically throughout the day it will start to run poor. Once I issue an sp_recompile on one of the largest tables (NominationScheduledQuantity with 2 million rows) in the database the stored procedure runs great again. I am assuming this is because a more up to date plan was generated. The code of the stored proc is: CREATE PROCEDURE ursp_Nom_GetDisaggNominations ( @ContractID INT, @DateGasFlow DATETIME, @CycleCode CHAR(3), @FilterZeroQuantityNomFlag CHAR(1), @TransTypePooling CHAR(2), @CycleCodeTmy CHAR(3), @CycleCodeEvn CHAR(3), @CycleCodeID1 CHAR(3), @CycleCodeID2 CHAR(3) ) AS BEGIN Set NoCount On DECLARE @TodayDat ...Show All
Visual C# Buiding a Resource String File
Hi, I'm a bit new to C#, comming from a delphi environment, but have been through quite a numerous amount of tutorials and have learnt a good amount. But for now, i have the issue of trying to figure out how to make a resource string file in C# and use it. Second Question - How do i use ansi strings in C#. Such as 32 for space and 13 for enter and the such Hello All. Netmaster0000: I'm sorry but I have no idea about Borland C# Builder. You might try and see if you can find any user forums or newsgroups on the Web, and post this question there. As this is an MSDN forum, I would imagine that most folks around here use VS in one form or another. Do you mind if I ask why you are using Borland I only ask because, if poss ...Show All
Visual Studio Team System How to modify email template sent via Project Alerts
I want to be able to modify the email template that states that a build was successful or not that is sent via Project Alerts Specifically, I want to be able to add a link to a report that is run via the daily. Can I do this Where can I find the template and how do I modify it Thanks, Staffan Can you be more specific on the app you are talking about Is that the TFSServerScheduler Or restart SqlServerReports or something Thanks, Staffan ...Show All
Visual Studio Express Editions Save
How do I Save a file with out calling the dialog box, at the moment I can SaveAs the file(with dialog box) but what I'm after is when you click just save it just saves the file that is opened in its original format with any alterations that have been made. The program is a cut down version of a text editor. When you use the dialogbox you presumably have something like: If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then ' some code to save the file End If To save it without the dialogue then just put the code you run there into your Save button click event, replacing the dialog.filename property with the name of the file you opened originally. Or am I missing the poin ...Show All
Windows Forms Keeping two data bindings updated.
I have two data bindings for the same data that are not staying quite synchronized. For the main table, I have a DataGridView that is displaying all records from my table. Next to it, I have text boxes that are also bound to the data grid's data source. When I select a row on the grid, the text boxes are populated. Everyone's happy... Until I start making changes to the data. I would like to have the data showing on the grid update automatically as I type in the text boxes, and vice-versa. I'm fine adding the events to handle this, but is there a function that will force the data to update automatically, so that I don't have to manually set the values That works great to keep the data updated... Thanks! On a related note, after editi ...Show All
Visual Studio 2008 (Pre-release) How to use constructors or methods of data object with WCF service
I have some questions regading how to use of data object using WFC Service. For example I have an object called Student (see codes below), and property IsOver25 this is readOnly property. However, if I do not put set { ;}, it's won't compile . What I need to do here in order to get rid of set { ;} statement. Another problem is using contructors and methods of data object. Since we don't put [ServiceContract] on the data object, I could not use the override ToString() version of Student object on client side. So the question are: 1. What should I do in order to use the constructor of data object 2. What should I do in order to use the methods on data object ( will not many but somes) Regards, John dang using System; using Syste ...Show All
Windows Forms How to add new row from dataGridView
I bind dataGridView1 with bookBindingSource, now i wanted to add a new record from dataGridView to dataBase book table, how can i will do so. Thanks I think I'm having a similar issue. I have a DataGridView that is bound to a Strongly Typed Dataset. The dataset is a simple Single Table collection of records. I GetData() to fill the dataset, but when I try to Add a new row Dim thisDataGrid As DataGridView = RevisionEntities.PkgGrouper.Controls.Item( "PackagesDataGridView" ) Dim thisDataRow As Integer = thisDataGrid.Rows.Add() I get an error stating "System.InvalidOperationException: Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound" ...Show All
Smart Device Development HardwareKeys Enumeration
I Have a Pocket PC device which has 8 Hardware Button. I have a program written in c# from which i could able to capture the key events for only 6 buttons because HardwareKeys enumeration supports only 1 to 6. Iam able to capture the all the hardware keys events using RegisterHotKey function in VC++ but not from C#. Why is this distinction Is there any way i can capture these remaining hardware keys from C# code PS: I dont want to PInvoke RegisterHotKeyFunction with C# code. I know that it can be done. Anyother sugestions are greatly appreciated. Arun ...Show All
Game Technologies: DirectX, XNA, XACT, etc. new SpriteBatch(graphics.GraphicsDevice); InvalidOperationException
I get an invalidOperationException when I run the following code: mSpriteBatch = new SpriteBatch (graphics.GraphicsDevice); I just installed GSE Beta 2. This did not happen in Beta 1 with a different PC. Not tried this PC yet. Simon http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=886016&SiteID=1 Basically have to have a 2003 or newer graphics card with DirectX 9 to support Beta 2. ...Show All
Visual Studio Express Editions Help Opening PDF file on browser
Hi, I have a class that implements a thread which check whether a certain file exist or not (pdf file). If the file exist the thread should open the file on the browser then kill itself (the thread) but Im having a problem with Response.WriteFile() method, I always encountering an error saying "object not set to an instance." I'll Attach my code here.Please Help ASAP. Thanks FIRST CLASS . . . . FileTracker f = new FileTracker("c:\\Temp\\BCS_Temp.pdf"); f.createFinder(); . . . . SECOND CLASS using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.We ...Show All
