Tilfried Weissenberger's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. GameComponents class inheritance
Hi, Right now, when you add a GameComponent to your project, it inherits from the class GameComponent in Microsoft.Xna.Framework. In project that is fairly small or for giving components to other peoples, it works great. But I see a problem when you want to build components for a large scale engine. Let's take a Grid GameComponent as an exemple. This game component cannot inherits from any of the class that already exist in my engine simply because C# does not allow multiple inheritance. So, I cannot give the grid any of my scene graph functionality since that functionality is not built in inside GameComponent. I could use an interface to implement this but then I'll have to add the same code to every component. ...Show All
Visual Studio Express Editions FontStyle
Here is what I am using Dim font_style As FontStyle = FontStyle.Regular and here is the errorr that I am getting Font 'Monotype Corsiva' does not support style 'Regular'. My question is how do I tell the program to load the font in it's default style Tricky problem. There is no way to find out what styles a font supports, other than by trying them all until you don't get an exception. Of course, it is quite unusual for a font not to support the Regular style. Try something like this: Public Shared Function CreateWeirdoMonoTypeFont(ByVal family As String, ByVal emsize As Single) As Font Dim styles() As FontStyle = {FontStyle.Regular, FontStyle.Italic, FontStyle.Bold} For Each style As FontS ...Show All
Visual C++ unresolved external error
I am having an unresolved external problem. This is my error output: Linking... tryagain.obj : error LNK2019: unresolved external symbol _furnsh_c referenced in function _main C:\Documents and Settings\sharyl\Desktop\cspice\exe\tryagain\Debug\tryagain.exe : fatal error LNK1120: 1 unresolved externals I have the enviroment variables set so that the library that contains furnsh_c is in the lib path, and the include folders, etc are also in the system's enviroment variables. I have also added the lib that has furnsh_c to the additional dependencies. What am I missing Is it possible that I changed another setting that is causing this Thanks! ok thanks. here is what i came up with: running dumpbin on the object file ...Show All
Visual Studio Tools for Office VSTO Excel Deployment; Need Help; Please Reply
I have already created a setup that works for a local install of my "TestExcelTemplate" as long as the pre-requisites exist on the target machine. The problem is, I need to know how to deploy the Template in a "distributed fashion" - to users that may or may not have the pre-requisites. Consequently, I have been working through the article below to help with my deployment: http://msdn.microsoft.com/office/default.aspx pull=/library/en-us/odc_vsto2005_ta/html/OfficeVSTOWindowsInstallerOverview.asp I am at the point where I am trying " To prepare the Office application and primary interop assemblies check ". I need to add the correct pre-reqs to my "bootstrapper". I tried running the ...Show All
Visual C++ PrintTo command in the ShellExecute
Hello, I'm trying to use the ShellExecute API to print an HTML file to a specified printer passing the "printto" as the command verb. My default Internet Explorer is IE 7.0 Beta (I tried this also on IE 6), the problem that also I use the PrintTo verb and I pass the printer name to the ShellExecute, the Print Dialog of the IE. Is this a bug in IE Please give me a hand. Your question is actually off-topic as this forum relates to C++ language issues. For a better response, I would go to the Win32 newsgroups here: http://msdn.microsoft.com/newsgroups/default.aspx ...Show All
Visual Studio 2008 (Pre-release) svcutil and IDictionary
I use the /ct option on svcutil to specify the collection types I want it to use for lists and dictionaries: /ct:System.Collections.Generic.IList`1 /ct:System.Collections.Generic.IDictionary`2 The first one works - it generates all generic list types using IList<T>. But the second one does not work. It still uses Dictionary<K, T> instead of the interface I specified. Is this a known problem or am I missing something Thanks... Hi, ReyCri, thanks for the follow up. Apparently I was reproing your problem different with the way you used it. Because I didn't see your contract, so I tried to repro it for datacontract so I used commandline option /dconly and /ct, in this case, the svcutil generated something li ...Show All
Visual Basic Lock on DB
Hi, I have developed a VB.NET windows based application and am using SQL 2000. After using this application for a while then it becaomes slow.I found out that it is because I use select statements and readers and these cause a LOCK on the DB so that the correct data is always displayed..... How do I use select statements and readers so that they do not cause a LOCK Thank You, There are a variety of lock options for SQL server. These are included in the SQL statement. The one you are talking about is NOLOCK The following article details some of the others. http://www.sql-server-performance.com/rd_table_hints.asp I would however say that unless you really see the default locking as causing problems then dont change ...Show All
Windows Forms How do I copy a file to specific folder??
In my application I have used an openFileDialog. And user can select picture file from his/her hard disk. I want to copy this file to Resourse folder of my application. Does anybody know how can i do that pls help.... since the File.Copy support the relative path, you can use this feature to specify where the Resources directory is, i.e. up 2 levels of the Current Directory where the exe locates. Here is a sample code may help you OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.RestoreDirectory = true; if (openFileDialog1.ShowDialog() == DialogResult.OK) { string filepath = openFileDialog1.FileName; string filename = filepath.Substring(filepath.LastIndexOf( ...Show All
Visual C# Saving from a RichTextBox control in the selected TabPage
I have a text editor program I am making, where a new tab page is added to a tab control every time the user clicks a specific button. A Rich Text Box Control is added to each new tab page that is created, and I need to be able to save the text from the Rich Text Box Control that is on the currently selected tab page when the user clicks another button. Does anyone know how I'm not sure if this has been asked before, but can't seem to find a soloution (I'm only a beginner). I add a new tab page with this code: private void toolNew_Click( object sender, EventArgs e) { RichTextBox newText = new RichTextBox (); string title = "New " + (tabControl.TabCount + 1).ToString(); TabPage newTabP ...Show All
Visual Studio 2008 (Pre-release) Is this the expected behavior ? (Animations)
I'm trying hard to use animations in my application. Along the way, I felt many pains, some of them being: Let's put 2 animations in a storyboard: <Storyboard> <DoubleAnimation ... Completed="DoneHandler" BeginTime="0:0:0" Duration="0:0:1" /> <DoubleAnimation ... BeginTime="0:0:1" Duration="0:0:01" /> </Storyboard> Do you think it's normal that the Completed handler is called after the whole storyboard is completed, not when the first animation completes Is it normal that if I put the same code as above into the Resources section of a template, the Completed handler isn't called anymore at all, and no error is raised It would be awesome to be able to do some a ...Show All
SQL Server Qusetion about return values from EXEC('select count(*) from xTable')
Hello everybody! As the topic: Can i get the value "count(*)" from EXEC('select count(*) from xTable') Any helps will be usefull! Thanks! How about this ; create table #results ( cnt int ) insert #results exec ('select count(*) from master..sysdatabases') select cnt from #results ...Show All
.NET Development .ASMX page design view
I got a WebServices project on VS2005, modified the generated class name from Service1 to Service, run it and got the following error: Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not create type 'CabWebService.Service1'. Source Error: Line 1: Source File: /Service.asmx Line: 1 I need need to view the .ASMX page to change the class above to 'CLASS="CabWebService.Service", on 'design view' I got a blank page on 'view code'I got the .cs display. How can I change the above line in .ASMX page Thanks, Ben ...Show All
.NET Development Printing Directly to Printer
I have a client that has a process which builds a text file. This text file contains commands that is used by their thermal printer, i.e.: ^XA^CF,0,0,0^PR12^MD30^PW800%^PON ^FO0,147^GB800,4,4^FS ^FO0,401^GB800,4,4^FS ^FO0,746^GB800,4,4^FS ^FO35,12^AdN,0,0^FWN^FH^FDFrom:^FS ^FO35,31^AdN,0,0^FWN^FH^FDAri Rothman^FS ^FO35,51^AdN,0,0^FWN^FH^ They want this to print directly to their printer. I have attempted using the following code to produce the results: public class Printer { [DllImport("winspool.Drv", EntryPoint="GetDefaultPrinter")] public static extern bool GetDefaultPrinter( StringBuilder pszBuffer, // printer name buffer ref int pcchBuffer // size of name buffer ); [ DllImport( "winspoo ...Show All
Visual C++ How can i make my editing auto completed?
I use vs2005 to write cpp code A class is defined in a .h file, and I refer to this class in a cpp file including the .h. when I type "->" following a pointer of that class, no hint is showed about the members How can I make it work, thanks Then you should put define blocks around it. //a.h #ifndef __A_H__ #define __A_H__ class a { //whatever is in a }; //b.h #ifndef __A_H__ class a; #endif class b { /whatever is in b } By doing this you will have it only resolving the decleration when there is no previous inclusions of a. Or another step in this could be. #ifndef __A_H__ #include "a.h" #endif So you can include the entire class decleration when no previous include for a.h exists. ...Show All
SQL Server SQL BKP Error 3211
When trying to generate bkp, recived an error: Executed as User: transportist\administrator. ConnectionRead(wrapperRead). (SQLstate 01000)(message258) general network error. Chek your network documentation. (SQLstate 01000)(error11) 10 percent backed up. (SQLstate 01000)(error3211) the step failed. ...Show All
