kirchu's Q&A profile
Visual Studio 2008 (Pre-release) How to override instance property value with style value?
Hi, I am trying to create style for my button which would set its color, font type, size and so on. Unfortunately, it seems that button instance values take precedence over template values. Is there a way to change precedence such that style values will take precedence What I would like to achieve is that in following sample my button to have text 'Hello' and background to be black: < Style x:Key = " GeneralButton " > < Setter Property = " Control.Background " Value = " Black " /> < Setter Property = " Button.Content " Value = " Hello " /> </ Style > ... < Button Background = " #FF008000 " Style = " {StaticResource GeneralB ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Where is the PositionColoredNormal Vertex type in XNA?
I'm migrating from mdx to xna but I can't seem to find the xna equivalent of the mdx vertex type 'PositionColoredNormal' how do i get this vertex type in XNA I just want a texture-less colored cube with lighting, it seems strange that there is a more complex VertexPositionNormalTexture type, but no VertexPositionNormalColor type... Am I missing something here Here's a link on implementing a vertex structure: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Vertex_format.php ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Video/Animation Playback
Hi, I'm currently writing a library (for XNA/DirectX) for animation/soundless video playback, and I have a few design questions for the pros out there if you don't mind answering them : I'm having my animation class inherit from game component, and update the frame depending on game time in the overriden Update method, and render it in the overidden Draw method, but even when I preload my textures to render, playback is choppy. Not sure exactly why, but I notice this only when I have significant number of frames (I noticed it with 100 frames, but *not* with 10/15). This problem may be linked and solved by the 2nd point, so please read on. When I preload all the textures for the frames in the animation (and the no. of frames ...Show All
Visual Basic Referring form objects
Hi all, I'm converting a VB 6 exe project to a VB 2005 project. One main functionality in VB 6 that gives errors in VB 2005 project is as follows: In VB6, i have a initial form called frmApplication that loads up. There are two other forms Form1 and Form2. Based on the user settings, frmApplication then loads either Form1 or Form2. Form1 and Form2 differs only by appearance. What i mean, all the controls in both the forms are same including the name except there position of the control on the respective forms. When frmApplication is loaded, it creates a object of Form1 or Form2 depends on the setting and assigns to frmObject. Now in VB6, i access the controls in Form1 or Form2 in runtime using frmObject.lblName.Caption = ...Show All
Visual Studio Tools for Office Field code in mail merge documents
hi all i am converting some mail merge documnts to VSTO solution. i need to copy the field code expressions but what i get is the actual value. how can i get the expression as simple text. i have visit the cindy's website but the macro there is not working for me i m using office 2003 with service pack 2. any help in this regard is highly appreciated. thanks in advance. Actually i want to make a utility which converts these field codes in to c# code all i need to get is field code as a simple text so i can pass that expression to my utility which returns me the c# code. i am replacing merge fields with bookmarks which will be replaced according to the field code expressions in my solution. thanks for ur support c ...Show All
Software Development for Windows Vista using a series of bitmaps in memory as the source for a filter graph
Dear DirectShow forum, I would like to create a series of bitmap files in memory, then use them as the source of a directshow filter graph to create a video file (one bitmap per frame). I understand the video end (use AVI encoder and FileWriter filter or ASFWriter filter), but how can I use bitmap files in memory as the source for a directshow filter graph I can't find any appropriate filter. Thanks in advance for your time. Best regards, wtrn Hi Geraint Davies, Thanks for the info, I may have to write the filter based on the ball sample as you suggest, but is anybody aware of any standard filter which could be used for this task Like the samplegrabber filter but in reverse. I'm surpris ...Show All
SQL Server Divide by zero error only with top
In the following expression, the query executes with no errors (there are sometimes 0's and nulls in IRON and ENERGY): SELECT * FROM gff2vg WHERE ( gff2vg . ENERGY > 0 and gff2vg . IRON > 0 ) order by IRON / ENERGY desc but when TOP is added there is a divide by zero error. Is there a way to avoid this SELECT TOP(64) * FROM gff2vg WHERE ( gff2vg . ENERGY > 0 and gff2vg . IRON > 0 ) order by IRON / ENERGY desc Thanks. The error has to do with SQL Server evaluating the expression IRON/ENERGY before the WHERE clause. There is no guarantee on the order in which various expressions in a SELECT statement (WHERE clause, SELECT ...Show All
SQL Server How do i XQuery the a Node from Dynamic Hierarchy ?
Hi, I am very new to XQuery. I'd like to find a node whose id is a certain value. my XML is ====================================================================== <!DOCTYPE root [ <!ELEMENT root ANY> <!ELEMENT joint ANY> <!ELEMENT node ANY> <!ATTLIST node nodeID ID #REQUIRED> ]> <root> <joint ID="1" PCount="1" SCount="0"> <joint ID="2" PCount="2" SCount="0"> <node ID="1" PCount="1" SCount="0" Type="R" nodeID="nodeE"/> <joint ID="3" PCount="2" SCount="0"> <node ID="2" PCount="1" SCount=" ...Show All
Windows Forms ClickOnce file share icon?
This is probably a really basic (maybe stupid) question, but I have done several searches and haven't found an answer Here's one version of the documentation I'm referring to: Install from the Web or a Network Share Using this strategy, your application is deployed to a Web server or a network file share. When an end user wants to install the application, he or she clicks an icon on a Web page or double-clicks an icon on the file share. The application is then downloaded, installed, and started on the end user's computer. Items are added to the Start menu and the Add/Remove Programs group in the Control Panel . Where is the icon they are referring to in the statement: double-clicks an icon on the file share When I pub ...Show All
Smart Device Development Breakpoints causing connection loss on debug
What started out as a random problem has become a full-time issue. Attempting to run a WM 5.0 app causes a "The Connection to the Device has been lost, blah, blah, blah" error. Deleting ALL breakpoints allows the app to deploy and run perfectly. Breakpoints can then be set for debugging. Setting a SINGLE breakpoint before deploying, however, will now cause this problem. The larger the app became, the more prevalent the problem became until some critical point was reached...now it happens every time. VS2005 and ActiveSync have been removed/reinstalled. I've tried VS SP1 Beta and ActiveSync 2.5 Beta. I've tried several different devices along with the emulators. No change. Has anyone heard confirmation of this ...Show All
.NET Development Configuration Enterprise Library - OnDeserializeUnrecognisedAttribute
HI, I'm currently attempting to convert my applications existing configuration to the enterprise library method, and am having some problems. I need to configure groups of items where the items share some generic configuration detail, but must also be able to contain item-specific configuration. I intended to configure this by having the shared configuration as attributes on the item configuration node, and then permit a child node that could contain any specific configuration. I thought that I would be able to parse the child node into an XmlNode property by overriding the OnDeserializeUnrecognisedElement method in ConfigurationElement, but this seems to be causing some problems. If I use the XmlReader.ReadOuterXml() to acquire ...Show All
SQL Server How useful to have a clustered index within a SQL Server database table?
Hi, all, Would please any expert here give me any guidance for how useful a clustered index can be within a SQL Server 2005 database Thanks a lot for any guidance for that. With best regards, Yours sincerely, clustered index sort the data physically in the harddisk. Using Clustered Indexes A clustered index determines the physical order of data in a table. A clustered index is analogous to a telephone directory, which arranges data by last name. Because the clustered index dictates the physical storage order of the data in the table, a table can contain only one clustered index. However, the index can comprise multiple columns (a composite index), like the way a telephone directory is organized by last nam ...Show All
Visual Studio Team System Now that we've made a total mess of things... How to put it back again
It all started when we added three new assemblies and files to the solution. Not noticing the "Add Solution to Source Control" in the massive solution explorer context menu, we added the assemblies manually using Source Control Explorer Add Files / Add Folder. To our surprise it was as if these files were not in source control at all! You could edit them all day without checking them out. You had to check them out using source control explorer or nothing, and they did not show locked in solution explorer. They do show up in the check in window. So we tried to create an entirely new project by adding the existing solution to source control. This was an even worse idea. What we got was the new assemblies at one level in th ...Show All
Game Technologies: DirectX, XNA, XACT, etc. What Is The First Step In Game Development?
Dear, I Decided To Use C# And XNA. Now What I Have To Do Do I Have To Learn Some Books Or What Plz Tell Me. After you've been through th tutorials on LearnXNA as suggested by Glenn, I would reccomend drifting over to http://www.xnaresources.com , a great tutorial by Kurt Jaegers on 2D game design has a really good style for bringing you into the graphics mold. After that head over to the Game Programming Wiki - http://gpwiki.org , a fabulous weath of game programming goodness Have fun learning ...Show All
Smart Device Development Getting the calling application path
Hi, Is there anyway of finding the application name from a class I'm trying to build a configuration setting class (like the one in the full framework). It all works fine if it is called from the application .exe but if I call it from a class which has been created by the exe it does not work. The reason being that I get the path of the calling assembly and then add .Config to it get the settings file eg assemblyPath = Assembly .GetCallingAssembly().GetName().CodeBase; configFileURL = assemblyPath + FILE_EXT; Is there any other way of getting the application filename, either through a specific method or by walking up the call stack. Thanks in Advance. Andy Hough Andy, My ...Show All
