Ali Majdzadeh's Q&A profile
Windows Forms Can't get progress bar to work
Hello, I'm somewhat new to .NET and very new to Winforms and am trying to use a progress bar in my app to gauge the progress of a SQL 2005 merge replication process. I have a class that keeps the Syncronization code. The syncronization agent has an event handler that in turn calls a method to grab the status and percent completed of the current merge process: subscription.SynchronizationAgent.Status += new AgentCore.StatusEventHandler(SynchronizationAgent_Status); subscription.SynchronizationAgent.Synchronize(); Here is the method it calls: static void SynchronizationAgent_Status(object sender, StatusEventArgs e) { m_percentComplete = e.PercentCompleted; m_statusMessage = e.Message; } ...Show All
Visual C# how can i serialize a object received from a MessageQueue?
I am sending to a message queue objects of a type "employee" ( a type that i created), sending part executes properly.. i need to know how i can retrieve the objects properly, how can i serialize it back to "employee" type currently i'm using the following code.. it doesnt work.. BinaryFormatter binaryFormatter = new BinaryFormatter (); MessageQueue msgQueue = new MessageQueue (MessageQueueName); System.Messaging. Message msg = msgQueue.Receive(); msg.Formatter = new System.Messaging. XmlMessageFormatter ( new string [] { "System.String" }); Employee emp = ( Employee )msg.Formatter; MessageBox .Show(emp.Name); Hi, Have you i ...Show All
Game Technologies: DirectX, XNA, XACT, etc. SaveStateMode.SaveState performance
Back when state blocks were brand spanking new, they yeilded poor performance. I haven't really looked at them since. As I understand it, Effect.Begin(SaveStateMode.SaveState) would use state blocks internally. Is it ok to rely on this I would like to set all render state in my .fx file techniques rather than in the code. To do this, I would just use .SaveState on everything. Will this hurt performance Are there other things to worry about with this Thanks, Brandon I found this post: http://blogs.msdn.com/shawnhar/archive/2006/11/13/spritebatch-and-renderstates.aspx Recent and trusted source... saving state can be slow... I think this is a big opertunity for improvement in D3D and Xn ...Show All
Visual Studio Team System Performance Profiler Documentation Discrepancy
I've been using the Performance Profiler and I've noticed a discrepancy. The "Functions Taking Longest" section in the Summary view for intrumentation profiling is defined as "the functions that took the most time while INCLUDING all time spent in their sub-functions" (http://msdn.microsoft.com/vstudio/teamsystem/reference/technotes/profiling_windows_apps/vsts_profiler.aspx). In the Function view there is a column called "Elapsed Exclusive Time" which is defined as "the execution time for the code in the method only (EXCLUDES all child function times)" (http://msdn.microsoft.com/msdnmag/issues/04/12/EnterprisePerformance/default.aspx loc=&fig=true#fig6). However, I checked the values in "Fun ...Show All
Game Technologies: DirectX, XNA, XACT, etc. DDS : 360, PC
Will DDS files that are created for PC work with the 360 is there not some subtle difference between the two or is this something that will be patched up via the XNA runtimes on the 360 upon asset loading Well, from my experiments, the nVidia one works fine in my PC apps, even the MS DDS/DXT viewer views the image as it should be, however, I'm convinced the block order is different on the 360. I'm sure (and hope) one of the nice MS guys can shed some light :) ...Show All
SQL Server Error: 18456 Severity: 14, State: 10
I have SQL 2005 Expess installed on Windows Server 2003 SP1. My application is running as a service and is set to depend on SQL Server instance... During the startup my app attempts to connect to the databes and it fails to do so, after 30 retries (1second appart). SQL Server log has this error msg: Error: 18456 "Severity: 14, State: 10" Once the server has started, I cam manually start my application and it then sucesfully opens a connection to the database. What does this error mean Srdjan Hi Srdjan, Looks like you are getting a login failed error: http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx How is your app connecting to your db If you are using Windows authen ...Show All
Software Development for Windows Vista UnloadOnIdle Memory Leak???
In the ASP.NET WF application we've written, we're utilizing the SqlWorfklowPersistenceService, SharedConnectionWorkflowCommitBatchService and a custom ExternalDataExchangeService. Our persistence service is configured as follows: < add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" EnableRetries="true" UnloadOnIdle="true" LoadIntervalSeconds="10" /> Our problem is that over the span of a day or so, the application consumes more and more memory until eventually (once it's reached several hundred MB) it causes performance issues on our servers (excessive paging, etc.). As I began to investigate the issue ...Show All
SQL Server Using SqlCeEngine to verify/Restore a database
I have a compact pc program that uses a sql server database (sdf file). I want to check the database integrity when program starts so I added a call to veriy method of SqlCeEngine string dbFullName = System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\NessDB.sdf"; SqlCeEngine engine = new SqlCeEngine("Data Source = " + dbFullName); engine.Verify(); The call to verify always returning false and when I call repair string dbFullName = System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\NessDB.sdf"; SqlCeEngine engine = new SqlCeEngine("Data Source = " + dbFullName); engine.Repair(null, ...Show All
Visual C++ new operator changing parameter values in release build
Hi, I hope someone can help me. I've been in the process of trying to sort this bug out in my code for some time now. I think I've isolated the problem but I can't for the life of me work out why this bug is happening. Basically, the program uses a simple template class that is a dynamically allocated array of arrays (each element of which holds an object of the type which the template is instantiated for). The template class has one method which sizes the array accordingly. It takes two parameters - the first is the total number of elements in the array and the second is how much you wish the size of each subarray to be. Now this code compiles fine and under debug build works correctly. However, on release build the array is not al ...Show All
Visual C# Regarding Properties
Hi, I have a problem can any one help me ASAP I have developed a property which is of type collection, it works fine if i access that property with coding, when i try to access the property at design time it shows me not marked as Serializable if i add this attribute it is asking for DeSerialize. How to Serialize and DeSerialize the Property with collections, I have created a class that class I am using as Collection in my usercontrol, class code as below : File Name : DGVDataSource.cs using System; using System.Collections.Generic; using System.ComponentModel.Design.Serialization; using System.Text; namespace IrsGrid { public class DGVDataSource { private DGVColumnType _dg ...Show All
Windows Live Developer Forums microsoft virtual earth 3d installation error
Hello, I am trying to install microsoft virtual earth 3d on my laptop, and I get the following error: The following error occurred attempting to install 'http://go.microsoft.com/fwlink/ LinkId=72053': "Application not found " The following components were successfully installed: - Windows Imaging Component See the setup log file located at 'C:\DOCUME~1\Kabenla\LOCALS~1\Temp\VSD12.tmp\install.log' for more information. Has anyone had the same problem or can anyone direct me to a solution Thanks in advanced Kabenla ...Show All
Visual Studio Is VS Win XP Home Edition Capable??
Peace be upon you all, Hi All, First of all I'm a newbie so I'm sorry if my question is stupid. I just want to ask if VS 2005 works fine on Win XP Home Edition If so what about the IIS *** IIS isn't in the Add/Remove Components on the Windows XP Home Edition... Thanks for your help ahmedilyas wrote: IIS is NOT available on Windows XP Home therefore you cannot create ASP.NET applications. Everything else will work fine except for ASP.NET This is true for ASP.NET 1.x, but ASP 2.0 can use the build in Development Server of Visual Studio 2005 as stated in the ASP.NET 2.0 FAQ at http://msdn2.microsoft.com/en-us/asp.net/aa336670.aspx Do I need IIS to run Web applications If you are using Vis ...Show All
Visual C++ XML with vc++ 2005
Hi, I recently converted a vc++ 6.0 project to vc++ 2005 that was using msxml3.dll. I managed to get it to work but now i would like to know if vc++ 2005 has something to offer regarding XML. Should i conitnue to use msxml.dll whenever i need xml functionalities or is there some other new way with vc++ 2005 thank you very much for any informations on the subject. Eric. Yes, .NET Framework class library is designed to be the foundation on which .NET Framework applications, components, and controls are built, including XML support . regards, rico ...Show All
Windows Forms How to Raise and handle Events
I have searched every server connected to the internet and msdn help but they returned no answers to my question Heres what i want to do I have a switch connected to my parallel port and i need to write an event to make textbox1.visible = true when it is pushed Please note i have every thing to do with the parport under control please help dav In addition, I found this article explaining how to program with parallel port in an interesting way and learned a lot, though you have everything to do with the parport. ...Show All
Visual Studio 2008 (Pre-release) Secure Service, Mex and code...
Hi, I have the following App.config for a service: < xml version="1.0" encoding="utf-8" > <configuration> <system.serviceModel> <services> <service behaviorConfiguration="MexBehavior" name="Registrar.ServiceRegistrar"> <endpoint binding="netTcpBinding" name="TcpBindingCallback" bindingConfiguration="TcpBinding" contract="Registrar.IServiceRegistrarCallback" /> <endpoint address="Mex" binding="mexTcpBinding" name="MexTcpBinding" contract="IMetadataExchange" /> <host> ...Show All
