LeoXue's Q&A profile
Windows Forms Window shrinking on restore.
I'm using Visual C# 2005 Express to make a windows forms application. The application works fine but when I added some user settings to keep track of the window size and position, the window shrinks to no size when the window is restored. If I start the application, resize the window, and close it, it will remember its size and position on restart. When I minimize the window and then restore it, however, it briefly returns to it's original size (a fraction of a second) and then resizes itself to have no client area at all. I can then manually resize it to it's original size. What is going on Thanks for any help. Bob I am experiencing the same problem with bound control properties. I don’t save window position ...Show All
Software Development for Windows Vista Problem with activity execution status
Hi All, I am having a state machine XOML Workflow which has custom activities in it.I have the activity execution status method for the custom activity.When i run the xoml i am able to create the workflow instance but i am not able to get the workflow in the method what i have in custom activity to execute.I set a breakpoint in that method and tried running the workflow.I am not able to execute the custom activity in the workflow.Can anyone help me to sort this out Thanks in advance. Karthick. If you are using XAML Activation, passing XmlReader to CreateWorkflow, then you can't include the x:Class attribute in the xoml file. Remove the attribute and you shouldn't get the error any more. If the ...Show All
Visual Studio 2008 (Pre-release) Data Binding and Exceptions
Hi, I'm trying to use data binding with properties of a business object that will validate its data in the property setter and raise an exception if invalid. Everything works fine only if I add the fake ExceptionValidationRule to the Binding which is not very convenient if I have to do for every properties I want to bind to!!!! Is there a way to activate this behaviour by default or is there any callback triggered each time a binding is bound to a dependency property I looked at OnPropertyChanged but it doesn't tell which dependency object changed and the new value does not contain the BindingExpression object. I tried adding a handler for the Text property change of a TextBox like that: AddHandler(TextBox.TextChangedEvent, new RoutedEven ...Show All
Visual Studio How to correctly register a custom logger in an IDE's BuildEngine?
Hi again, In my endless search for a solution, I'm trying yet another method, but I'm still running into a wall. I am trying to register my own logger class into my solution's build engine. I get the instance of the engine like so: this.m_engine = Microsoft.Build.BuildEngine.Engine.GlobalEngine; and then on the OnBuildBegin event, I try to register my custom logger as follows: if (this.m_engine != null) { this.m_engine.RegisterLogger(this.m_logger); } This calls my logger's Initialize() function correctly, and just before the OnBuildDone event fires, my logger is Shutdown(). However, my logger's hooks into the IEventSource (to capture the errorraised and warningrased events) don't seem to be firing in betw ...Show All
Visual C# if i want to convert whole array
How can i convert whole array at same time is it possible at all or not. please help. Please clarify your question. What is the data type of your array and to what collection object to you want to convert it Regards, Saurabh Nandu [ www.AksTech.com ] ...Show All
Visual C++ C++/CLI destructors and finalizers chaining
According to the topic "Destructors and Finalizers in Visual C++" in the "C++ Language Reference" implementing a ~ destructor or a ! finalizer automatically chains to base classes which have these semantics after the derived class destructor or finalizer code is run. However it is suggested in that topic that the C++/CLI programmer call the finalizer at the end of the destructor processing. Would not this then mean, in that idiom of calling the finalizer of a class from the destructor of that class, that the order of destructor calling whenever a destructor is run would be: 1) destructor of derived class -> finalizer of derived class ( through suggested call ) -> finalizer of base class ( through chaining ) -> ...Show All
Visual Studio Team System get latest on checkout macro
We just started using team system, and were switching over from vss. We're used to the vss get latest on check out way of working. I know there's a million reasons given as to why this is taken out in team system...but our team wants it to work the regular way (it's to the point where superiors will can the product if a workaround isn't found). It's currently our only draw back to fully using team systems for all internal projects. I posted the macro mentioned on other posts to accomplish this functionality below. My question is how do you set this up to work Does it work automatically when you check a file out Do you have to bind it to a button that you hit when you check it out Any help or solutions will be greatly appreciated. ...Show All
.NET Development How to connect two application via internet
Hi Sorry for a new bee question :-) I want to make a application that have a blank board and allow two people can draw on that at the same time. Two people will use different computers and connect via internet. What is the best way of making this application Client - Server or p2p or other kind of structure In c# what is the class that support connect two application Thanks a lot for your help. I do appreciate it Best regard Thanks a lot for your answer. It's really helpful. Can you please give me an example of code to connect two computer directly and method to listen the other side action What is the class in c# .net that i will need to make this type of connection Thanks in advances Best Regard Have a nice weekend ...Show All
Windows Live Developer Forums Auto select all
Is it possible to have, when signed in, all contacts selected Jeroen Hauser wrote: Is it possible to have, when signed in, all contacts selected Hi Jeroen, "Possible" of course, but "likely", no. The only scenarios that would benefit from selecting all contacts are to export the entire address book to another contacts manager, or to send spam to everyone in the address book. That's not what the contacts control is intended for. Our goal is to make it easy for end users to use of their contacts with third party web sites in everyday scenarios, such as shopping, sharing, and socializing. None of those scenarios require *all* the contacts in the user's address book. ...Show All
Visual C# how to convert from hex to arabic language
I have wrote this function to help me convert hexa to arabic language but always there is runtime exeption which is ... Input string was not in a correct format. what is the problem this is my function... public string Hex2Arabic( string msg) { long i; string hex; string c; string correct=""; hex = msg; if (((hex.Length % 4) != 0)) { MessageBox.Show("hexa to arabic bad length (it is not divided by 4","error"); } while ((hex.Length > 0)) { c = hex.Substring(0, 4); //i = int.Parse(("&H" + c)); i = Int64.Parse("&h"+c); correct = (correct + (( char )(i))); hex = hex.Substring(( ...Show All
.NET Development Socketpermission in control (vb.net) for IE same an applet
I make a control in VB.Net and i want to use it in Internet Explorer. This control connect a socket in special port on a server (port 1200). My control in local exe is ok but when i use it in IE i have an error about system.net.socketpermission I add this lines in my code Dim IPermSocket As New System.Net.SocketPermission(Security.Permissions.PermissionState.Unrestricted) IPermSocket.AddPermission(Net.NetworkAccess.Connect, Net.TransportType.All, strIP, System.Net.SocketPermission.AllPorts) IPermSocket.Demand() and where cursor is on IPermSocket.Demand() i have the same error: autorisation failed (french error is Echec de la demande d'autorisation de type 'System.Net.DnsPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b ...Show All
.NET Development <customErrors> tag should have its "mode" attribute set to "Off".
Running a vb.net application on a windows 2003 server I receive the following error message, I checked: the mode attribute of the customErrors tag in the config file is set to "Off" and it still produces the same problem. I read in some forum that if the config file is unreadable then this error message would occure so I removed the config file completely and created a new one and still no luck. Please Help! Server Error in '/abeltools/Admin' Application. Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browser ...Show All
Commerce Server LineItem DisplayName is always the DisplayName of the standard language
Hi, after running the basket pipeline the DisplayName of every lineitem is always the DisplayName of the standard language for the catalog. --> this .basketHelper.RunBasketPipeline(); I expected that the basket pipeline should deliver the display name according to the language of the user. Is there any option to activate this Thanks in advance. Christian Hecht Hi, have you made sure that the Name and Display Name for each product is populated (for each language) This sounds very similar to the problem I had a while back (I had blank names in the line items). Paul ...Show All
Visual Studio 2008 (Pre-release) Storyboard pause behavior
I have a storyboard animation running forever and want to pause it when the element is not visible - the animation continues to run as evidenced by cpu usage. When the animation is running, cpu usage is about 22%. With storyboard sb, sb.stop stops the animation (cpu approx 0%) and returns the visual appearance of the element to the initial appearance. sb.begin(me,true) starts the animation again. When sb.pause is used, the visual appearance freezes and the cpu usage drops to 8-10%. When sb.resume is called, the visual appearance jumps ahead to some appearance proportional to the amount of time since sb.pause was issued. So, it looks like sb.pause freezes the visaul changes but does not pause the animation clock. Is this corre ...Show All
SQL Server Sum on conditional Values
Hi I have a table with Records for employees and evry record has a record type now i need to have a sum in the table footer or in a group for all employees of Amount Column when Record type is "E" and the conditions is if this employee by RecordType "D" the amount column is not 0 else then shuld be 0 is it posible with SSRS Thanks Jhknys Thanks all for the reply but what i am trying to do is get sum amount form records that have RecordType "E" but i want to check if thay have a amount in Record by Record Type D so i can just check the sum with this record is it posible Thanks Jhknys ...Show All
