Uncle Davy's Q&A profile
Windows Forms Problem with value DataGridViewComboBoxCell
In VB 2005 Express I have a problem, which completely do not understand. I use a DataGridViewComboBox in a DataGridView. When I change data and save it, I have no problem. But when I close the form I a repeting error, being: System.ArgumentException: DataGridViewComboBoxCell value is not valid. Can anybody help Thanks in advance, Simon If you autosize the column but have not provided the combo box column with a valid datasource or you haven't yet added items to the combo box column's items collection then you'll get this error at startup because autosizing requires the cell's FormattedValue to be requested. Requesting the FormattedValue of a combo box cell is where the check is done that may raise the d ...Show All
Software Development for Windows Vista How are tokens w/o mandatory integrity SID treated?
I have a question related to Mandatory Integrity Control (MIC). Usually all user tokens contain an additional SID in the groups list, which is one of the MIC SIDs (S-1-64-x) denoting the integrity level. Tests under RC2 (Build 5744) with tokens missing the MIC SID don't show any special behaviour. A process running with an administrator's token w/o MIC SID seems to have all permissions which an administrator usually has. In terms of MIC the result looks like the token is treated as having "high" integrity (S-1-64-12288). The question is this: What happens in the kernel, if the token does not contain one of these MIC SIDs How is that token treated Does it automatically belong to one ...Show All
Windows Forms Running ClickOnce app clears DOM document object in IE7
Hi, I have a javascript method that launches a ClickOnce application from a portal front page in our web application. It does this by launching the *.application file. The Launching Application window comes up as expected and the application launches fine. However, once the application is launched, the "document" object is set to "undefined" in the containing web page. This has the effect of rendering any javascript that needs to access the document object useless, and the user can not continue to use the portal page. No javascript is running after the application has been launched. This only happens while using Internet Explorer 7. Does anybody have any idea why the document object is effectively being clea ...Show All
SQL Server Cursors
I have a table which do not have any primary key defined. Neither does it have any identity column. Is there any way possible to traverse through that table one record at a time without using a cursor. I guess cursors take much more time. I am not sure what part you are unfamiliar with. If you need to get one record, do something to it you are describing a scenario where a cursor it motivated to use. There is nothing bad about cursors just that for some scenarios you can write a single query that do all the job for you. If you need to update the price for all products in a database you probably can do a set-based operation like this to give 25% reduced price. update dbo.Products set prdPrice = prdPrice * 0.8 Another ...Show All
Visual Studio Team System History of merge's?
Is there any way to get history on if a particular changeset was merged into a particular branch If not, it would be nice if there is some way to pull this off. I guess if you had a work item associated you could relate both changes to the same work item, but sometimes there is not a direct correlation. In this case we don't use work items yet and a developer should have done a merge of changesets, but I can't think of an easy way to tell other than just try to compare files. Granted since merges involved manual steps to do merging, a merge may not be able to have a direct correlation with a changeset, since there may have been changes to the changeset to do the actual merge, it still would be an interesting view as it at least track ...Show All
Windows Forms Progressbar in Managed C++
Hello! I found this link http://www.codeproject.com/miscctrl/text_progressctrl.asp about a Progressbar with text in it. I am programming in Managed C++ and I was wondering if there is a similar progressbar out there somewhere that I can use in my managed applications I am trying to code my own one but I cant figure out how to get the text to behave like it do in example in the link. Is there any tutorials about this in managed C++ Um... that progressbar doesn't really look like its done in managed code... in fact it was originally done in 1999 which is before .NET 1.0 came out I think. Have you looked at the progressbar control in .NET 2 its quite an improvement on previous versions. Alternatively I think there is actually ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Suggestion for stock Vertex structs
I notice that the framework provides a few stock vertex structures like VertexPositionColor etc. This is cool but it would be great if these could inherit from an interface which provides a mechanism to get the SizeInBytes and Element information abstractly. These structs currently provide this information as static properties but this is no good if you are are trying to write a generic function that can deal with a number of different types of vertex structures seamlessly. My suggestion is that in future something like an IVertexInfo is provided that lets you deal with these concrete vertex structures abstractly. Perhaps something like this. interface IVertexInfo { VertexElement [] Elemen ...Show All
Game Technologies: DirectX, XNA, XACT, etc. bounding boxes
I am having trouble with bounding boxes. I am not sure if I created it right or if I am using the intersect lines properly. I started programming with turing where I just used the variables coordinates of the pictures to detect intersection. This is what i have so far. BoundingBox car = new BoundingBox ( new Vector3 (spritePosition2.X, spritePosition2.Y, 0), new Vector3 (myTexture2.Width, myTexture2.Height, 0)); BoundingBox incoming = new BoundingBox ( new Vector3 (spritePosition10.X, spritePosition10.Y, 0), new Vector3 (myTexture1.Width, myTexture1.Height, 0)); if (car.Intersects (incoming) == true ) { spriteSpeed2 = -spriteSpeed2; } Cavetroll wrote: Ya I have problems ...Show All
.NET Development Using ASP.NET Session to manage remoted objects
Hi, I have a simple remoting server object which is a SAO Singleton object Factory that has two methods: int Count {get;}IService GetService(string serviceName); The GetService() method creates new objects that implement IService by calling their default constuctor e.g. IService GetService(string serviceName) { ... return new Service(); // (assuming that the value passed in serviceName is "service"). } The Count returns the number of "Services" created. The object Factory is hosted by a Windows Service. Every "Service" object implements IService and inherits MarshallByRefObject. The client application is an ASP.NET web application and there are two requirements that I am strugglin ...Show All
.NET Development xsl tranformation file problem
i have an xsl file like this; < xml version = " 1.0 " > < xsl:stylesheet version = " 1.0 " xmlns:xsl = " http://www.w3.org/1999/XSL/Transform " xmlns:xsi = " http://www.w3.org/2001/XMLSchema-instance " xmlns:xsd = " http://www.w3.org/2001/XMLSchema " xmlns:msxsl = " urn:schemas-microsoft-com:xslt " > < xsl:strip-space elements = " * " /> < xsl:output method = " xml " omit-xml-declaration = " yes " indent = " yes " standalone = " yes " /> < xsl:template match = " / " > < xsl:for-each select = " annPanel " > < xsl: ...Show All
Visual C++ Syntax of VS 2005 autoexp.dat [Visualizers] section
i have wrote a script to parse my list. My problem is that the indice doesnt start from zero , here my script : NAME::NAMEList<*,*,*>|NAME::SacList<*,*,*>{ preview ( #( "{m_size=" , $c.m_size, "..}" ) ) children ( #( [original]:[$c,!], m_size:$c.m_size, m_tag:$c.m_tag, #list ( head: $c.m_node.m_next, next: m_next ) : (NAME::SacList<$T1,$T2,$T3>::ListNode *)&$e ) ) } here is the output in the debug watch something like that [original] m_size m_tag [3] [4] [5] Is there a way to make indice start from 0 i ahve like 20 script to write like that for all my container and im under going a lot of frustration be ...Show All
Visual C# problem with String.Format function.
hi friends, i got a problem when i do the following operation. String.Format("{CN={1}}","hello"); this is giving error while execution.String not in proper format. but the following thing works, fine String.Format("{0}CN={1}(2}","{","hello","}"); Is, their any better way to do the above operation.Like, is their any escape sequence for {. Any suggestions, Ranu. apart from the 1 instead of 0, more important is the double brace. basically as soon as the formatter sees { it assumes that whatever falls after it is format data information. The escape sequence for a brace is {{. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Really, REALLY strange "bug" with Vector3
For my ray tracer, I created my own Vector struct that pretty much wraps a Vector3. The thing is, I used to have just three floats; X, Y, and Z. Now I just unioned them with the Vector3. For some reason, rendering time cut down by about 15% (i.e. from 10 seconds to 8.5). I removed the Vector3 and it went back to being 10 seconds. ...Wtf Is there a hidden type constructor with Vector3 that makes it much more efficient I'm not even using any of the Vector3 methods for my transforms and such. Could anyone tell me what the hell did I stumble into Pon t3h pony wrote: They're exactly the same. Are you sure There must be a difference somewhere! If all of the methods and constructors are t ...Show All
SQL Server DB connection from file vs local SQLServer instance
I want to add a data source to a C# project that comes from a local SQLServer instance. But when I attempt to do a new connection, it only allows me to specify a file . That is, the only choices I have to select a data source type are "Access DB file" and "SQL Server DB file". I know that with the non-express VS edition there are more choices available. But reviewing limitations of express editions on the web, I find a frequent mention that one cannot access remote data, only a locally installed data source. But is not a SQL Server instance on my local machine a local data source This is an issue because if I proceed with connecting as a file, then VC#Express complains the file is in use. If I first go into SqlServe ...Show All
Software Development for Windows Vista All WorkflowRuntimeServices running in the same thread?
Hi, If I add three services to WorkflowRuntime, does the services will run in the same thread (3 services inside only one thread) Regards RL I think that I didn't understand very well. My services inherit from System.Workflow.Runtime.Tracking.TrackingService and System.Workflow.Runtime.Hosting.WorkflowPersistenceService. ...Show All
