MatthewRWatson's Q&A profile
Windows Forms Gridview and getting current row/cell
This is a truly stupid question. I have done this a million times with 1.1 and asp.net but cannot figure out how to do this using .net 2.0 and a WINDOWS application. Basically I have a gridview control which contains some records. The first column contains the primary key for my record. When the user clicks on a row I want to extract the value held in the primarykey column so that I can get that record from my dataset and display ...Show All
Game Technologies: DirectX, XNA, XACT, etc. need help with code from a book
Hi guys I have the Beginning 3D Game Programming book by Tom Miller In chapter 4 page 62, he says to put code in the OnCreateDevice method in listing 4.2 adding this code causes the program to crash, with the error being Failed to create Direct3D device public void OnCreateDevice(object sender, DeviceEventArgs e) { SurfaceDescription desc = e.BackBufferDescription; ExtendedMaterial[] mtrls; levelMesh = Mesh.FromFi ...Show All
SQL Server Offsite Database Mirroring for standby machine
Hi all, we want to create a offsite redundant server which can be a standby machine if something happens to our primary machine, any input how to do this over internet what type of bandwidth we need, and for security ssl or vpn or anything i missed thats important to consider. Plans are to use sql server 2005. Thanks all Well, there are a lot of options here: 1. "What type of bandwidth do we need " Depends entirely on your ...Show All
Windows Forms ThreadStateException from background thread manipulating its control
Hi, I came to this exception: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. and I don't know what to do with it. My application creates some Panels with a lot of components at run time (according to the database entries). Each panel takes a second or two to load so I decied to use multithreading and choosed the ThreadPool. S ...Show All
Visual C# How to interpret void* in C#?
I am writing a porgram to call function in a dll created by C++. this is not a com dll,so I use pinvoke . In this function,there is a parameter was the type void* how can I translate it in C# so if I have a Int32 value 50 how could I use IntPtr to point memory of the Int32 value ...Show All
Architecture Message vs Service.
EmailValidation message vs EmailValidation Service. SOA is mostly about services and messages. Rather than create a number of services with different names would it be recomended if we create 1 generic service and have it request/reply messages. For ex: EmailValidation service. Instead of creating a service for email validation, create a validationService and have it process all the validation messages for the application. Just wondering how ...Show All
.NET Development Modifying dataset records
Hi All I am trying to overcome a limitation with the version of Crystal Reports I am using. I am writing a Windows Forms application in VB.NET 2003 and I need to inject data into the results in a Dataset before giving that data to CR for report generation. CR 9 requires that images for the report come from a database, but mine are stored separately so as not to bloat the database. I want to load the Dataset with data from the database, inc ...Show All
.NET Development INSERTing multiple values with OleDbCommand
Can someone tell me how to insert multiple rows into a database when use the OleDB* classes I can easily insert one row... string queryString = "INSERT INTO People (firstName, surname, dateOfBirth) VALUES (@firstName, @surname, @dateOfBirth)"; OleDbCommand comm = new OleDbCommand(queryString, conn); comm.Parameters.AddWithValue("firstName", person.FirstName); comm.Parameters.AddWithValue("surname", per ...Show All
Windows Forms How to add a launch condition based on whether a task is running
I want to add a launch condition, so that the install will not continue if my program is already running. I have seen lots of documentation on how to search for a file and use that for a condition. Is there a way to get a files state, or to check for a process. I am using VS 2005 to create my setup. There's nothing in a VS setup project to do that. BTW, if the running process you want to look for has a window, W ...Show All
Visual C++ XP style buttons with PSDK
I recently ported an older Win32 PSDK program to VS 2005. How can I get it to use the cool XP style buttons I have my display "Appearance" set to "Windows XP Style". Further, when in the VS2005 Resource Editor, my buttons seem to be XP Style. Yet when I run the program, the same buttons are just as "flat" as they have always been. There is probably a compiler option that I am unaware of. Can someone please poi ...Show All
SQL Server Profiling SSIS Package
I am trying to start performance tuning a package that is taking awhile to run. I want to know if there is a way to figure out how long each task and/or data flow takes to execute so that I can start figuring out how to tune the slower ones. Thanks, Chris ChrisKinsman wrote: I am trying to start performance tuning a package that is taking awhile to run. I want to know if there is a way to figure out how long each tas ...Show All
Windows Forms Saving a picture
I have a picture box that i can draw in using mousePath.AddLine This works well but now i need to save the image into a datadase. Can anyone let me know how to do this And what datatype in the database table should I use What about to save a document in the same table Great example, thanks. ...Show All
Visual C# BUG? Operator precedence error
We have code such as public string SelectedValue { get { if (this.ddlGenres != null) _selectedValue = this.ddlGenres.SelectedValue; return _selectedValue; } set { if (this.ddlGenres != null) this.ddlGenres.SelectedValue = _selectedValue = value; else _selectedValue = value; } } This line this.ddlGenres.SelectedValue = _selectedValue = value; is being evaluated as this.ddlGenres.SelectedValue = _selectedValue; _selectedValue = val ...Show All
Windows Forms ToolStrip
Hi all, i have a toolstrip with a toolstripdropdownbutton. I'd like to know how can i know if the Toolstripdropitem are visible. Like when the user click on the arrow. it show a submenu ... id like to control the show and hide of that submenu ... i can't find a property in the toolstripdropdownbutton to control the show and hide of the submenu .. please help To show the dropdown for a ToolStripDropDownButto ...Show All
Visual Studio Team System New report
I created a new work item called "Issue" and customized some of the fields. What I want to be able to do is create a report that will give me information on the new work item. I can run the "work item list" report, but I would like for it to give me information on some of the new fields I added. My question is how can I edit the report or create a custom report I've opened the report site and opened the 'work item list' report ...Show All
