steuerlt's Q&A profile
Windows Forms Grouping
Has anyone had any luck creating a control that is derived from the DataGridView that implements grouping This control is a major letdown without it. Yes, I have seen this control. When I speak of grouping I mean simply the ability to group data in a grid view grouped by a common value in one of the columns. For instance, supposed I have a grid that is populated with information about a list of people (name, age, sex, etc.) and one of the columns is "Hair Color". I may choose to "group" the grid by the "Hair Color" column. What I would envision is a grid that would allow me to open or close the results (like a treeview) for all results in the grid who have a common "H ...Show All
Visual Basic How can I cycle through all the System.Drawing.Colors?
I worked out the Console version to cycle through all 16 available colors: Sub Main() Dim x, y As Integer For x = 0 To 15 Console.BackgroundColor = CType(x, ConsoleColor) Console.Clear() For y = 0 To 15 Console.ForegroundColor = CType(y, ConsoleColor) Console.WriteLine("Background: {0}; Foreground: {1}", x, y) Next y Console.ReadLine() Next x Console.ResetColor() Console.Clear() Console.WriteLine() End Sub I also worked out a program that cycles through 4 colors in a Windows form: Private Sub btnCycle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCycle.Click Static x As Integer x = x + 1 If x = 5 Then x ...Show All
Visual C# List<T> and T[]
Hi, Is there a generic methof that can convert an array of T (T[]) to generic list (List<T>) Thank you, Riady Hi, you could pass the array as a parameter in the generic list constructor, take for example the following function: public List <T> MakeGeneric<T>(T[] list) { List <T> genericList = new List <T>(list); return genericList; } To call, use: string [] strings = new string [] { "One" , "Two" }; List < string > genericList = MakeGeneric< string >(strings); Hope this helps, Andrej ...Show All
Visual C++ Explorer Runtime Error, preventing me from accessing Windows Updates, Disc Search, ect.
Hi! Everytime I try to launch Internet Explorer (Version 6.0, SP2), I get the following msg: Microsoft Visual C++ Runtime Library Runtime Error This application has requested Runtime to terminate it in an unusual way. I found threads on this error msg., with suggestions to remove Google Toolbar (which I don't have). I tried to reinstall IE 6.0, but I wasn't allowed to, because my existing IE is a more recent version. Furthermore, this is now preventing me from accessing Windows Update (I get a blank page when I visit it). Related to this, I am also having trouble accessing the Search function and the Help and Support function under my Control Panel. When I tried, it gives me the follwoing error msg. Exception: Automation Server Can't Cr ...Show All
Visual Studio Document Explorer crashes
Thought I'd start a new thread, since I'm using Visual C# Express, rather than full VS2005. Windows XP Pro SP2, Visual Studio 2003 Pro, SQL Server 2000 Developer Edition, Visual C# Express, Visual Web Developer Express, SQL Express 2005, MSDE. I also have Virtual Server 2005 SP1 beta installed. Problem just started this weekend. Whenever I click on any topic in the Index, Document Explorer crashes. I've tried Repair on Visual C# Express, Visual Web Developer Express and MSDN 2005 Express. Same problem. It was working fine last week, I'm not sure what's changed. I have previously had VS2005 beta2 installed, but I removed that by following the instructions before installing the Express Editions -- and, as I said, they were working fine last ...Show All
Windows Forms HeaderCell text in datagridview
I have seen various examples of how to set the text in the row headercell, however none of them actually work. Here is one example that I tried with no results. This is the event handler for RowsAdded private: System::Void dataGridView1_RowsAdded(System::Object^ sender, System::Windows::Forms::DataGridViewRowsAddedEventArgs^ e) { this->dataGridView1->Rows[e->RowIndex]->HeaderCell->Value = e->RowIndex.ToString(); } That compiles just fine, but doesn't set any text. The interesting thing is, hovering over the headercell displays a tooltip with the CORRECT value, however it's not displaying. Ok I am retarted, I had my header cell to narrow and it wasn't showing up. Here is my nex ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Using windows forms components with XNA?
Is it possible to use windows forms components with XNA For instance... what if I wanted to add a menu bar to my game I realize that most games have their own interface, but it would still be very useful to have (especially for setting up quick temporary interfaces). Any ideas EricBrown wrote: Can you run XNA in a control on w win form, like say some sort of Picture box that'd be handy too. Yes you can. The higher level XNA application model (the Game class, and associated component system) are not designed to coexist with WinForms (because Game itself creates the application window, that will conflict with any existing windowing system). But if you create the underlying GraphicsDevice ...Show All
Visual C# Intellisense list images vanished
Hi. My colleague's IntelliSense dropdowns just lost all their images, which was weird (especially because there were two items with the same name and she couldn't tell which was which). A restart fixed the problem. Anybody else had this happen No, this was in a fresh XP SP2 install, although it did have Office 2007 Beta 2 installed after the VSTS installation, which I thought might have caused the problem - there were actually a couple of other oddnesses, and following an uninstall and reinstall of VSTS they seem to have gone away. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Minimizing and Maximizing
I have my application set to use the full screen. If I hit alt tab, go into another app, then alt+tab back into my game, it's solid gray, and then locks up. I wrote some simple code to check the keyboard state, and close the app if I hit escape, but that doesn't even work. I just assumed that this would all be handled for me, out of the box... Do I have to write anything myself to fix this Hey... I was having a hard time with the minimizing and restoring as well, but now I've got it sorted out. Still, I'd appreciate some clarification with a few things. I have an Menu object in my program that stores references to a RenderTarget2D and a SpriteBatch that are initially created by and stored as members of th ...Show All
SQL Server Where is the config?
Hi all, I made a custom assembly for SSRS 2005. It works well. I would like to make some things to be configurable via config file. Is it possible How thanks, fs. Dear Lakshmi, the RSConfigTool configure SSRS virtual directory, Win/web Service Identity, Database, Encryption, Init, email, exec account - but dos'nt permit configure my assembly. eg: string s = ConfigurationManager .AppSettings["ExternalWebserviceUrl"]; fs. ...Show All
.NET Development IDbConnection.CreateCommand not intended to be used directly
Under the IDbConnection.CreateCommand online helptext it is specified: This member supports the .NET Framework infrastructure and is not intended to be used directly from your code. What exactly does that mean Am I not allowed to use it Will it go away eventually I see it used abundantly on the examples and other user's code in this forum. Johannes Thanks Matt, I did not express myself very well. What I meant was am I "allowed" to use implementations of the interface e.g. System.Data.SqlClient.SqlConnection.CreateCommand) ...Show All
SharePoint Products and Technologies Updating SQL database using asp:dropdownlist
I have created a dataview to an SQL database and added the edit function. This is the default tag when I add the edit <td class="ms-vb"> <asp:TextBox runat="server" id="ff2{$Pos}" text=" {@min }" __designer:bind="{ddwrt:DataBind('u',concat('ff2',$Pos),'Text','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@min')}" /> </td> I have changed the text box to a drop down box and this is what I now have <td class="ms-vb"> <asp:DropDownList runat="server" id="ff2{$Pos}" DataSourceID="SqlDataSource3" DataTextField="min" __designer:bind="{ddwrt:DataBind('u',concat('ff2',$Pos),'Text','TextChanged' ...Show All
Software Development for Windows Vista Tracking of handled exceptions.
Is there a mechanism that allows exceptions to be caught and handled within an activity without having the details of the exception logged by the SqlTrackingService What we are trying to accomplish is to use the tracking database as a way to determine if the workflow and activities completed successfully. In some situations thrown exceptions can be handled but we don't want this information logged as an exception to the tracking database. Yes you can configure the tracking service with a tracking profile . Here is a sample that shows how to do it: http://msdn2.microsoft.com/en-us/library/ms742184.aspx Hope that helps, Kavita ...Show All
Community Chat My new community site for stundents and pros on MSDN
My name is Sam England, and I am 16. I have, over the last few months been building and perfecting a community site, with articles and reviews, for professionals, businesses and students, in IT, Web, Media, Gaming and business. Soon, I will make the community site invite only, but I need a good initial base. Each user wiill get 5 invites. I am planning on making the site full AJAX/web 2.0/ASP.NET so you can move the new grey modules around. The site was just redesigned, a couple of days ago over the weekend. I am calling on you guys to come by and sign up for free, and maybe introduce yourself. I'd be really honoured to see you there, and have some valuable people to help drive my project, and become a very special part of my community. I ...Show All
Visual C# How to get uptodate user information with WindowsIdentity object?
I have the folling codes in C# WindowsIdentity user = WindowsIdentity .GetCurrent(); IdentityReferenceCollection groups = user.Groups.Translate( typeof ( NTAccount )); Everything works fine. However, whenever I change something in ActiveDirectory for a user, the user must logoff and log back in to see the changes. Are there anywany for me to force WindowsIdentity object to get the uptodated Groups without logoff and logback in Regards, JDang Until at this point, the user must logoff and login again to see the changes. You can call GetCurrent() many times but the Groups remain static. Do you think this is a bug Regards, Jdang ...Show All
