Simon Zeltser's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Does VC#05 Express allow class diagram creation?
I notice some people post screenshots using class diagrams for XNA projects, but I can never find it in VC#05 Express although I can in Standard. Since I'm being forced to use the full XNA experience on VC#05 Express, class diagrams can really be helpeful. Is there a way to use this feature in Express If not, it would be a great tool for students down the road when they go over class design etc. And it definitely helps out on any task! :) Unfortunately not :( My trick is that since most of my code is contained within class libraries and linked in to the XNA game project, I do all my initial design in VS2005. Since you only need the XNA class library when it contains content pipeline stuff, I can jus ...Show All
Audio and Video Development Programmatically setting the default playback device (and recording device)
Under Vista is there a way to set the default playback device programatically I've searched through the APIs but I'm not seeing it. For example, there is a method IMMDeviceEnumerator::GetDefaultAudioEndpoint(), but there is no corresponding IMMDeviceEnumerator::SetDefaultAudioEndpoint(). Can I do this through the endpoint properties Thanks for the info, Larry. I think we cross-posted because I didn't see your post when I started my last reponse. It's true there wasn't previously an api to change the default device, but the OS did not prevent us from setting our device's audio path (under XP, we can control the recording source by setting the value of a Mux control). Under Vista we can set the input li ...Show All
SQL Server SqlDependancy OnChange event problem
I've wrote a component that take advantage of the query notification macjanizm, i use this component in a web service , and its working great, with a little problem , i have imporsonation enabled in my web service and a user and password is set in the identity node in web.config , the impersonation is working great and the web service is running under the user name i've set in the web.config , but, when i change a table in the database and the change event is raised in my application the user name is no more the user in the web.config...The user is now ASPNET .... How can i solve this problem of user name change Thanks in advance , Eden The event raised is a CLR callback, and as s ...Show All
Visual C# attempting to use an array across a class
All events are confined to one class. It is a form Form1 class. The array is declared as follows: public static String[,] symbAndNamesArr; // then in a method I have: Array symbAndNamesArr = Array.CreateInstance ( typeof ( string ), coSymbols.Count, 2 ); for ( int i = symbAndNamesArr.GetLowerBound ( 0 ); i <= symbAndNamesArr.GetUpperBound ( 0 ); i++ ) { symbAndNamesArr.SetValue ( coSymbols , i, 0 ); symbAndNamesArr.SetValue ( coNames , i, 1 ); } // array "symbAndNamesArr" is properly filled. I verified it by printing the values out at the Console. // Then in the next Click method I am trying to make use of the values in array "symbAndNamesArr" and the instance is not recognized. The error message is tha ...Show All
Windows Forms Calling a separate function immediate upon loading the main form.
Dear All, I have main form where I do all my loading of my data like filling up the combo and grid. So I want a function where upon loading and show all my grid and combo frm1_Load method to call a separate function to do some task. The problem now I am having the function call as my last line in my frm1_Load function but is then delaying the viewing of my form. So how can I avoid this delay and allow the form to appear first. Dear BlueMikey, I dont really get your answer. Do you have any sample of it please Thanks. ...Show All
Visual C++ Using floats with % and ^ operators
Why does MC++ .NET 2005 return and error when I try to compile and I use a float type varaible with the % and ^ operators Example: float temp, result; temp = 2.5; result = temp % 1; result = 2^temp; With both of these lines I get an error saying that the type float is not allowed with those operators. I have found a work around for the first but I can not mathmatically figure out one for the second problem. Is there some sort of patch to fix this I am using the % operator to modulus a number by 1 to get the decimal part of the number. This part was for converting the decimal part of the value of gold into silver or silver into copper. So 2.5 silver pieces would be 2 silver pieces and ...Show All
Visual C++ CommandType.StoredProecedure
I am new to utilizing the Oracle client within VC+++. I am having trouble setting up the command information. The code that I am using is: OracleCommand^ UserPassCmd = gcnew OracleCommand( "text of command" ,con); UserPassCmd->CommandType = OracleCommand::CommandType::StoredProcedure; The error message is when I compile is: C2039: 'StoredProcedure' : is not a member of 'System::Data::OracleClient::OracleCommand::CommandType' Thanks Carol K ...Show All
.NET Development go to an element and display the content
I have the following xml file < xml version="1.0" encoding="ISO-8859-1" > <!-- edited with XML Spy v2.5 NT - http://www.xmlspy.com --> < xml-stylesheet href="testing_xsl.xsl" type="text/xsl" > <languages> <language language="English"> <categorie categorie="Colours"> <word English="red" Spanish="rojo"/> <word English="blue" Spanish="azul"/> <word English="green" Spanish="verde"/> <word English="black" Spanish="negro"/> </categorie> <categorie categorie="Food"> <word English="red" Spanish="rojo& ...Show All
Visual Studio 2008 (Pre-release) System.ServiceModel.ChannelFactory does not contain a definition for CreateChannel
I am experiencing some trouble using the latest .NET 3.0 release in a web application. I've created a WCF service and have been able to successfully communicate with that service in a winforms test client using the below code, but when I try to implement this in a web application it fails. A possibly related error is that I can't use the IDE to add a reference to System.ServiceModel but I can manually add a System.ServiceModel assembly node to the web config. However, when I do this, the reference must be different than the one used in the winforms client because I get the build error defined in this post's subject: System.ServiceModel.ChannelFactory does not contain a definition for CreateChannel. The client code I have written to use ...Show All
Visual Studio 2008 (Pre-release) Failed to convert Parameter Value from a Byte[] to a Datetime?
hey sync'ers... anyone having trouble with converting Btye's to DateTime problems I have stepped through every line and double checked both the client and server db's and cannot isolate this error in code... hopefully i'm being an idiot and someone can look at the below and tell me so... the exception is above the sync call below somewhere... i've tried datetime instead of DbType .Binary with no success... anyone else have this problem solution Thanks! I'm using this: SqlSyncAdapterBuilder ProposalDetailBuilder = new SqlSyncAdapterBuilder (); ProposalDetailBuilder.Connection = serverConnection; ProposalDetailBuilder.SyncDirection = SyncDirection .Bidirectional; // base table ProposalDetailBuilder.TableName = ...Show All
.NET Development Add a new DataTable to the DataBase through Code
(VB.net & SQL 2005) Hi i have a "Sales" DataTable that shoulb be archived at the end of each day. i need to store the data(table) in a seperate DataTable for each day and assingn an accending number(index) to its TableName Property. How can i create a new DataTable and add it to my DataBase just by code maybe its sort of a basic job, but i have no idea how to do it. should i use SQL commands such as "CREATE" or is there another way in vb.net thanks alot. Yes, you can use Transact SQL to create your table and then to transfer data from a DataTable you can use the SQLBulkCopy class to export the data to the newly created table. ...Show All
Visual Studio 2008 (Pre-release) Query regarding ListView Control
Hi Experts, Thanks for reply...... Actually i want somthing different which you told not exactly that I have a list view which has 3 coloumns(Header are FirstName, LastName, EmpID) after that in C# i am writing this code ListViewItem lvItem = new ListViewItem(); lvItem.Content = "Dinesh"; //Here subitem property is missing which was in VS 2005 listView.Items.Add(lvItem); If i will run this Then my list view will be appear like this. FirstName LastName EmpID Dinesh Dinesh Dinesh But i want listview like this FirstName LastName EmpID Dinesh Tiwari 1001 So please tell me how to do it. Regards Dinesh What you might want to do is create a new class called "Employee ...Show All
SQL Server How to right justify table field
How do i right justify data in a nchar or nvarchar field e.g. now: 2bbb 3bbb desired : bbb2 bbb3 where bbb is either blank or null, not certain. I would appreciate any help Pauley Hi, see if you come around with that: CREATE FUNCTION dbo.fn_removetrailingchars ( @strValue VARCHAR(200), @TrailingChar VARCHAR(200), @RemoveLeading BIT ) RETURNS VARCHAR(200) AS BEGIN DECLARE @intCount int SET @intCount = 0 WHILE @intCount <= LEN(@strValue) BEGIN SET @intCount = @intCount +1 IF SUBSTRING(@strValue, @intCount, 1) NOT LIKE @TrailingChar BREAK ELSE CONTINUE END IF @RemoveLeading = 1 SET @strValue = REVERSE(dbo.fn_removetrailingcha ...Show All
.NET Development DllNotFoundException- path problems
Hello all, I've got a project that pinvokes an unmanaged DLL and everything runs smoothly with it. The problem begins when I publish the project and install it on a different computer- I get the DllNotFoundException when it's being called, and the oddest thing is that the message says the dll wasn't found on the project's bin\debug path. The problem is that I wish to have the dll on the application startup path, but cannot use Application.StartupPath within the DllImport Attribute, since it takes only consts. Does anyone know why does the application search for the dll in the bin\debug folder Is there anyway to change this (I've tried adding the app startup path to the environment path, didn't work) Or better yet, is there a way of using t ...Show All
SQL Server Security on SQL Server 2005 and windows XP
Dear mems, I have a problem, and i don't khow how to resolve, pls help me: My server is Windows XP (not domain), I work with SQL Server 2005, installed on my server, I configurate my SQL SERVER connection is "Windows Authentication mode", I add user "MyComputer\guest" to MyServer\Secutity\Logins to accept connections from local network I have many databases: Db1, Db2, Db3... But, I don't know to configurate my SQL Server to achive these: 1) My clients using "SQL Server Managment Studio" connect to Databases Db2, Db3... on my Server, they can expand, modify, add new all Tables, Sp, functions of Db2, Db3. 2) My clients are not allow to access Db1 . 2) My clients can add new Databases Db4, Db5, Db6... in the future and they have full permiss ...Show All
