Rudedog2's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Dynamically casting an object of unknown type
Hello everyone! I think I've got a tough problem for you. I've got a List<object> full of various types of objects, and I want to grab an element from the list and cast it back as the type of object it actually is. Ideally, what I would do is something along the lines of: List<object> objects = new List<object>(); MyClass instance = new MyClass(); objects.add(instance); object something = objects[0]; Type somethingtype = something.GetType(); somethingtype variable = (somethingtype) something; this works fine except for the last line. Once I have the type of the object, I can't use that to either declare a new variable of that type, nor can I use it for casting (as far as I know). Does anyone know of a way to use Type info ...Show All
.NET Development problem in client/server application
Hi every one, I developed a client/server application . client connect to server correctly if both are under the same router (in the same Lan) , but the problem arised when the client and the server arenot in the same Lan they cant connect together. I checked the router configration ,it was correctly setup. please if you have expirense in this problem help me. Thanks for reading my message------------ Hi, RizwanSharp is right that if IPAddress.Any is used then it includes my solution too, I was not aware that you are using that solution so i put my doubt. I saw that his post is marked as Answer so i thought you got solution from his post but wondering that you still have problem.. ...Show All
SQL Server Drill down matrix report slow performance
I have created OLAP cubes and we are creating reports on top of them. The reports take incredibly long to render (40 seconds to 5 minutes). The MDX for the reports runs in less than 15 seconds when executed as a query in Mgt. Studio. Browsing is also fast. The reports are drill down matrix-type reports and they do eventually display properly. Not that this should help with the mechanics of the issue but the report data source query will show how we drill across dimensions: <code> SELECT NON EMPTY { [Measures].[Number of Queries Run] } ON COLUMNS, NON EMPTY { ([ClientProjectDim].[Project ID].[Project ID].ALLMEMBERS * [UserDim].[UserName].[UserName].ALLMEMBERS * [QueryDim].[Status].[Status].ALLMEMBERS * [DateDim].[Date Hierar ...Show All
SQL Server problems at beginning of set up
Before I get into the project that I actually need working I'm trying to get through an example or two provided by microsoft. I'm using the Flights sample from http://msdn2.microsoft.com/en-us/library/ms160889.aspx I've downloaded the files and follow the instructions but quickly ran into trouble. I select the configuration file, enter the needed information, check the 'enable instance after it is created' box, and click okay. This takes a couple minutes but finishes without errors. I then try the register step. I enter my login information for the computer I'm using and use windows authentication. After click okay here's the error I get: Registering Instance - FlightInstance - Updating registry entries (Success) ...Show All
Visual Studio Express Editions starting to use- how to create a program at visual C++??
My question is simple: How can I create a program at Visual C++ and use that in my computer with Windows XP SP2 Please give detailed information i just started using and I know a few about programation. I really apreciate your answer! Well, first of all, you need a basic understanding of how computers work. Also, you need to understand other aspects of programming before you actually begin programming. You need to understand how programs are ran, how the data in a program is stored, and how compilers and linkers work. Here are some links that can get you started: http://www.crews.org/curriculum/ex/compsci/articles/howcomput.htm - This link will explain how computer memory works, and other a ...Show All
Visual C# Thread Message Suggestions
I have a question. In my C++ days, I had straight C++ threads using thread messages to act very similiar to MFC UI threads to process messages even though they weren't connected to a UI. The Win32 calls included ::CreateThread(), ::PostThreadMessage(), ::GetMessage() to simulate the behavior of just dropping a message into a thread queue to process the message. Now that I am in C## land, I can't seem to find any documentation about thread messages which tells me that I am looking at the problem incorrectly meaning C## does things differently. Suggestion Hi Craig, Thanks for your input. While I agree that the fewer the thread the better, I find reasons to question not having a limited number dedicated threa ...Show All
Visual Studio 2008 (Pre-release) Limiting the size of the JournalEntryBackStack
Hi, I am building an application that navigates from one page to another using NavigationService Navigate(object) where the object is a PageFunction that I construct. No Uri-based navigation scenarios are possible in the application. The pages are hosted in a Frame that owns the navigation journal. And, I'm setting KeepAlive to True for all these pagefunction objects involved as it'd be impossible for me to restore the exact state of the page otherwise when I navigate Back to it. I'm also providing some CustomContentState to do some additional context restoration when the page is navigated back to. This works quite well and navigation back/forth is instantaneous but, expectedly, my app's memory footprint grows pretty quickly and out-of- ...Show All
Visual Studio Express Editions Hex values in textbox to send out serial com1 using an array.
I am trying to write an application that sends serial data out com1. The data is entered in to a 'textbox' then you press the send button. An example would be send: 1f ff af 01 55 // These are all hex values. I have a string of hex values to send out the port to turn on a LCD projector but I want the ability to change the string, that is the reason for the textbox. I can setup an array and load the values manually then compile but like I said I want to be able to edit. My problem is with the array load. The method I am using is: byte [] myArray = { byte .Parse(textBox4.Text, NumberStyles .HexNumber) }; This will load the first byte but I can't load any other data or I get a format error. I need to be able to load e ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Quadtree project
I have started a Quadtree project. It can be downloaded at http://www.codeplex.com/quadtreeload I would be interested in comments on the direction I am taking on the Quadtree DrawableGameComponent. I have included a test program called JoshGameXNA. But, open the QuadtreeComponentLib solution and just set JoshGameXNA project as the startup project. Excuse my C#, but I'm new to it. Any construction comments are welcome. It's seems you may have to click on "more releases" to get to the "Special Build 0.1.1" project. Not sure why..... I have now added the ability to put static objects into the quadtree. The test program adds 1,000 rocks into the quadtree and it renders it all really fast. One issue I need to work ...Show All
Visual Studio Express Editions Create project for VB 2005 express
I got 5 folders in my VB2005 express Project, when I want to create a project in VSS2005, I need to create 5 sub project 1 by 1 and Add Files project by project. Is there any faster way to create a project and automaticaly add this 5 folders into sub project without manually add files Are you talking about creating a template for projects with 5 sub projects Creating sub folders in a project does not necessarily constitute a sub project. ...Show All
SQL Server .NET Framwork error when starting SQL Server Profiler
Greetings, I have been having a problem when I try starting the SQL Profiler. I am running the SQL Server 2005 - Developer edition. I get a message box from Microsoft .NET Framework saying: Unhandled exception has occurred in a component in your application. If you click Continue, the application will ignore this error and attempt to continue. Could not load file or assembly 'ConnectionDlg, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its The details listed under the Details button are: See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.IO.FileNotFoundException: Could not load file or assembly 'Con ...Show All
Visual Studio Team System Cant install Build service - not a domain account
Trying to install the build service, however we can't because the install wants a domain user. We installed TFS with local users for TFSSERVICE and the other users. Is there anyway to install the build service with local accounts Or do we have to uninstall TFS and reinstall with domain users Thanks in advance Maurice If you are using it in a workgroup environment there is no need to use domain accounts, althought is recommended for increasing security and not having to use different credentials Which error is giving you the install can you take a look to the installation logs is the user an administrator used Mathew is right also in part, the user you set for Team Build must have permissions ...Show All
Visual Studio Microsoft.WinFX.targets is stealing the Microsoft.Common.targets for itself!
I installed the latest bits and was trying to craft a .csproj using our own msbuild customizations which override some of the "meant to be overridden by customers" targets from Microsoft.Common.targets such as "AfterCompile". I noticed that the stuff that we wire into "AfterCompile" did not take place during the build. Upon investigation I discovered that Microsoft.WinFX.targets is overriding our override of "AfterCompile". So if Microsoft is going to start using these targets in their own project systems, then how are we supposed to be able to work-with/extend/customize the build I am hoping for an answer such as "Oh that was just expedient and before long that will be corrected in ...Show All
Windows Forms format a specifc cell in datagridview
I want to format a specfic cell in a datagrid id dgv2.item(0,1).backcolor = color.red this is what i have but it does the who col i only want row 0 Col1 dgv2.Columns(1).DefaultCellStyle.BackColor = Color.Coral How about using DataGridView's CellPainting event Something like: private void dataGridView1_CellPainting( object sender, DataGridViewCellPaintingEventArgs e) { if (e.ColumnIndex == 1 && e.RowIndex == 0) { if ((e.PaintParts & DataGridViewPaintParts .ContentBackground) == DataGridViewPaintParts .ContentBackground) { ...Show All
Software Development for Windows Vista Is there a "standard place" to store writeable not plublic shared files to please UAC?
Our program has two files must be writeable (a database file and a config file) which are shared by all dedicated users of the program on a single system. The automatic redirection to a single users directory path is not helpfull in that case. Before changing our program: Is there a standard place on Vista to store writeable not public shared files (We whant also to pass Vista Logo test...) Thanks in advance Problem as far as I can see is that CSIDL_COMMON_APPDATA folder under Vista is not writable by regular users, which seems to defeat the purpose of it existing. So unless someone else has any bright ideas, I can see that we're (and everyone else) are going to end up creating c:\our_app_data folders ! ...Show All
