Mikey Stevey's Q&A profile
Windows Forms Variation of the Master/Detail
Hi All, I have a slight problem with my master/detail scenario: I actually want to show the same data in the detail view as in the master view. I have a form that shows the master table as a grid and I have a form, that will, when things work, show the same data as a details form. When I double click a row in the grid view, I want the other form to show only data for that row in the details form. Now, when I double click a row in the grid, the details form comes up, but it does not necessarily show the row I was on, rather the first row in the data set. How do I set up the data sources etc. correctly such that this is possible Thanks ...Show All
Visual Studio Express Editions prob using afxdisp.h /MFC use/ CLR support
I'm making a project on vc++ 2005, I want to plot graphs, so using MSChart evrything goes fine, till i come to point where I've to include afxdisp.h by defualt i'm using Project properties as.. use of MFC: standard windows library clr support: /clr:pure but i got this error Visual Studio 8\VC\atlmfc\include\afx.h(24) : fatal error C1189: #error : Building MFC application with /MD (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD so I changed project properties to : use of MFC = MFC shared but then i got series of errors WINVER not defined. Defaulting to 0x0502 (Windows Server 2003) E:\Visual Stu ...Show All
Visual Studio 2008 (Pre-release) dragging control will immediately crash visual studio
Problem repro: create a new windows application fx project, create button on the grid, drag it to another location. After about 0.5 seconds visual studio throws an error and asks me if I want to debug. If i choose yes, I can get to this call stack: > ntdll.dll!7c901230() [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] milcore.dll!53216a95() milcore.dll!5316ba53() milcore.dll!530d9318() milcore.dll!530d5b1b() milcore.dll!530d5b38() milcore.dll!530d93c2() milcore.dll!530d9204() milcore.dll!530d9464() milcore.dll!530d94b3() milcore.dll!530d57be() milcore.dll!530d57c8() milcore.dl ...Show All
Visual Studio Express Editions Debug Mode vs Release Mode
I am working through a beginning C# book which is attempting to demonstrate the Debug.WriteLine and Trace.WriteLine functionality in both Debug and Release mode configurations. The book states to simply choose the release mode option from the standard toolbar. I believe that the book is assuming the use of the full blown version of Visual Studio 2005, whereas I am using Visual C# 2005 Express Edition. I see a drop down box in the standard toolbar that, when rolled over, shows solution configurations. However, this box is grayed out and not accessible. Is there some configuration setting that needs to be made in order to "activate& ...Show All
.NET Development Partial File Downloading
I want to download file from 3,221,225,472 bytes (3 Gb) to 3,328,599,654 bytes (3.1 Gb) for example Windows Vista Beta ISO if I use HttpWebRequest.AddRange Method (Int32, Int32) occure exception: "System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: The From or To parameter cannot be less than 0. at System.Net.HttpWebRequest.AddRange(String rangeSpecifier, Int32 from,Int32 to)" because 3,221,225,472 > MAX(Int32)=2,147,483,648 How can I download from 3,221,225,472 bytes (3 Gb) to 3,328,599,654 bytes (3.1 Gb) Using Reflector you can ...Show All
Windows Forms DataGridView perf questions
Continuing the conversation on the forums so everone can participate... Adam asks: This is a great FAQ . I'm curious, why would they make the Alternating Style override the DataGridViewColumn.DefaultCellStyle It seems like that should be an underlying style more like DataGridView.DefaultCellStyle. What do you think about SuspendLayout and ResumeLayout I notice your FAQ doesn't mention those two methods. Will they help performance I'm trying to optimize my DGV's as much as possible, but the ones with 500+ rows and approx 10 to 20 columns are very slow. Unfortunatly the ones with many rows are also the ones that I have to perform custom ...Show All
Windows Forms Change MessageBox Buttons Text
Hi for ALL I am use the MessageBox.Show() to Provide a Standard MessageBox in My App I am using VB.NET 2.0 My REQUEST IS :- How to change the Text "Yes", "No" , "OK, "Cancel" to provide my own from My Language Thanks for all sorry for any bad english If you want to change text of message box buttons , you will have to use windows API's and hook them. The similar example can be found at http://electroly.com/mt/archives/000005.html Check it out for detailed view ...Show All
Visual Studio 2008 (Pre-release) Convenience question: global setting of panelitem margins
If I have a panel, like the uniformgrid or the stackpanel, I regularly do not want the items within it to be next to eachother, but I want a margin around them. I set the margin for each individual item. I can not find a fast way to set these globally. That would be really convenient though for quick layouts. I'd love to see a property like 'ElementMargin' on the stackpanel that will set that margin around each element it shows. Well, depends on what's in your StackPanel. Is each child of the same type If so you can put a type specific style on the StackPanel once and it will be picked up by all children. For example: ...Show All
Visual Studio Express Editions What books to get
I have looked at the local book store for books on programming. There seems to be a selection of books on VB6 and also on VB.Net. Which would be a better choice for me to get in order to learn the Express edition Any major differences I should know about when reading one of those that I need to keep in mind when I'm applying it to VB Express Thanks! Whatever book(s) you get, get those that cover VB2005. The other versions, won't help you with VB2005. There are a lot of new books for VB2005 and even some that include a copy of VB2005 Express Edition. I haven't used but one book on VB2005 and that was Introdu ...Show All
Visual Studio Express Editions How do I detect when the right mouse button is down?
Visual Basic 2005 Express Edition: I would like to perform an operation when the right mouse button is down. How do I detect when the right mouse button is down Private Sub Form1_MouseDown( ByVal sender As Object , ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me .MouseDown If e.Button = Windows.Forms.MouseButtons.Right Then 'Do something... End If End Sub ...Show All
Visual C# Newbie: Two Questions on Generated Delegate Class
Hi everyone, I'm new to C# 2.0 (moving over from Java) so these might be easy. I have two questions I'd like to ask regarding delegates. I know that when I declare a delegate the C# compiler automatically generates a class that extends MulticastDelegate . Here's a simple delegate declaration: delegate bool Charlie(bool b1); First Question When I use ildasm to view the generated class for Charlie I see there is a generated c'tor that takes two parameters: an object and a native int. Yet, when I instantiate a Charlie object, I only pass one parameter to the constructor. Here's an example: Charlie c = new Charlie(someMet ...Show All
Visual Basic Accessing a Function in a different Form.
In my project I have two forms Form1 and Form2. I have a function in Form2 that I want to run from Form1. Is there any way that I can do this Wow, that was way too obvious. I think it's time for some sleep. Thanks. ...Show All
SQL Server Old Excel files after SQL2000 > SQL2005 migration
Hello there! We are having some problems over here after our SQL2005 upgrade. If we try to use an excel file that previously accessed the SQL2000 database (same DSN name and credentials), and then try to refresh the data after the 2005 upgrade, we get the errormessage "[Microsoft][SQL Native Client][SQL Server]User 'DOMAIN\username' does not have permission to run DBCC TRACEON." We have tried to delete and recreate the DSN file.. Tried to use SA user instead (with offcourse full access).. An even bigger problem is that we can not even get into msquery to copy the SQL query to make a new file, the same problem appears. ...Show All
Visual Basic VB 2005 Compiler Optimization Discussion
There's been something percolating in the back of my mind. I come from a computing environment that preceeded windows and the Intel Architecture and instruction set. n comparison to the instruction set that i'm used to, the Intell instruction set looks like a house wreck which may or may not be important to the discussion at hand. Everyone knows that moderators agree on everything and that in moderator space we just stand in love circles and sway back and forth. So when I was discussing a compiler one day, I said I really admired a language which had a seven pass compiler. "Nonsense", was the response, "two will do it." Wi ...Show All
Visual Studio Team System Credentials probem connecting to TFS
I have installed TFS beta 3 on a single server in workgroup (Server A). Now I have some clients (WKS01, WKS02, ...) in a win2k domain (DOMAIN). If I connect from WKS01 using IE then IE pops to ask the credentials, I type the workgroup user credentials and then I can see the WSS project portal. If I try connect using VS 2005 it fails. I think that this problem is due to the fact the VS2005 pass the credentials of the user (DOMAIN\User1) belonging to the context in which VS is running. There is a way to bypass this problem If not and I decide to move Server A in the domain, do I need to install again TFS Thanks Fabrizio ...Show All
