SB's Q&A profile
Windows Forms The order of files returned by the OpenFileDialog
I have a question about the order of files returned by the OpenFileDialog. I have four files (File1.txt, File2.txt, File3.txt and File4.txt). In the OpenFileDialog I select them in the order of: File1, File2, File3, File4. However in the OpenFileDialog.FileNames array they are in the order File4, File1, File2, File3. If I select them in the order File4, File3, File2, File1, then in the array they are in the correct order (File1, File2, File3, File4). Why, and is there any way they can be forced to be returned in the order selected, or at least alphabetical order I’m using VB .NET v7.1 and .NET Frame ...Show All
.NET Development Beginning .Net Framework Beta 2.0
Hi Experts, I have installed the .Net 2.0 so that I can use the serial communication namespace for some software development. What I heard is that .Net 2.0 have this. However I hope you experts can guide me on what I need to look out for. Currently my system have the following: 1) Windown 2000 SP4 2) .Net Framework 1.1 (as well as 2.0 beta) 3) Visual Studio .net 2003 What I did: Downloaded the .Net Framework 2.0 Beta Redistributed and run the dotnetfx I got from your website. Some questions I have in mind are: 1) Can I use Visual Studio 2003 with the .Net 2.0 Framework How 2) Will the 2 versions ...Show All
.NET Development "Transport-level error" using .Net Beta2
Hey, When I run the following code, I get the error: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) The code is: cnxn.Open() adptDeathMechanisms.Update(tblDeathMechanisms) adptCases.Update(tblCases) cnxn.Close() The error occurs when executing adptCases.Update(tblCases). The connection is fine...that is proved by the fact that adptDeathMechanisms.Update executes just fine. The connection is the same for both data adapters. I don't know why the "specified network name" would suddenly be unavailable when exec ...Show All
Visual C++ using a textbox from a 2nd Windows form
I've got a Windows Forms .NEt application that uses 2 forms. I've got Form2 which is created from Form1 : (inside a Form1 button click event handler) : namespace::Form2 *myForm2 = new namespace::Form2; myForm2->Show(); This Form2 works well, & I now have the need to write text to it's textBox1. So I create one in Form2[Design]. I need to do this textbox population inside a function X that is defined within namespace but outside the definition of Form2. Function X is called from another button click event handler of Form2. How should I do this I've tried : (inside the function X definition) : namespace::Form2::textBox1->set_Tex ...Show All
Visual C# How to serialize and deserialize an object
Hi, I'd created a class named ShoppingCart, I only know that to make the instances of a class serializable, [Serializable] attribute should be exist in the class declaration. But I don't know what method should I call in order to serialize and deserialize an object. I wanna do that because this object needed to be saved in and retrieved from database. Anybody can tell me Thanks! You should also implement the ISerializable interface if you want to control serialization of your class. The link has example code how it can be implemented ...Show All
Windows Forms Deployment - Multiple Sites (ex: QA/Production)
How do you deploy multiple versions of the same application to different web servers For example lets say I have 2 QA sites that will run the same version or different versions of the application. Currently I am getting the following error: + Inplace update of an application is not possible, please revise its version. I have two sites: qa1.app.com qa2.app.com I have even gone as far as changing the .application name from app.application to app.qa1.application and app.qa2.application and changing the Name, ProductName and Start Location. Is there anything else I need to change I a side-by-side deployment ...Show All
Software Development for Windows Vista GetWorkflowQueueData error
Hello, I'm calling the method GetWorkflowQueueData from an instance to inspect the workflow queues to take further action. But when I do it in the Idle event of the tracking service or in the SaveWorkflowInstanceState of the persistence service it raises the following error: InvalidOperationException Instance operation is not valid on workflow runtime thread " at System.Workflow.Runtime.InstanceLock.InstanceLockGuard.EnforceGuard(InstanceLock theLock)\r\n at System.Workflow.Runtime.InstanceLock.InstanceLockGuard..ctor(InstanceLock theLock)\r\n at System.Workflow.Runtime.InstanceLock.Enter()\r\n at System.Workflow.Runtime ...Show All
.NET Development Progress indication of recursive XmlDocument processing
Hi, I have an algorithm which processes an XmlDocument recursively (iterate through all childs recursively). It takes some time to go over some Xml documents and I want to show some progress indication to the user (WinForm). How can I do it How can I know in what position I am inside the whole XmlDocument Thanks in advance ... You can use the ProgressBar class but it requires that you have a relatively big base selection. XmlDocument xmlDoc = new XmlDocument (); // Load the XML XmlNodeList xmlNodes = xmlDoc.SelectNodes( "/some/path" ); progressBar1.Minimum = 0; prog ...Show All
Windows Forms Novice :)
I want to do something simple, but I'm from a long time ago and I am only familiar with Batch Files and Basic. All I want to do is make a nice interface application to copy a file from one location, a CD, to my Hard Drive. This is a daily task and I want to make it simple. I just want to have an icon on my desktop, Po ...Show All
.NET Development make ver 2.0 default on iis5
i install framework 2.0 on my server windows 2000 server. all my websites still configure to use framework 1.1 and i can menualy change each website to use framework 2.0. the problem is that each site i change to use framework 2.0 couse my iis5 to restart it self which is a big problem too me. in additon, all new website i configure on my server is set to use framework 1.1 by default and i need to manulay change it to framework 2.0 (iis restart again) is there any way to make my iis5 use framework 2.0 as default framework, so all the exiting web site will use it and every new website i configure will use framework 2.0 by default ...Show All
Smart Device Development No ResumeBindings on PropertyManager
I use the PropertyManager in Windows Forms applications when binding form controls to custom class properties. The method used to update the controls on a form when the underlying object properties have changed 'ResumeBindings' is missing from the Compact Framwork. How can you achieve the same functionality with CF NETCF V2 supports ResumeBinding() and SuspendBinding(). On CF V1 you can try calling CancelCurrentEdit () to push data from data source to the control. ...Show All
SQL Server Created table in SQL SERVER EXPRESS but don't see it
I installed SQL SERVER 2005 Developer Edition over SQL SERVER EXPRESS in order to get the Management Studio. I created a new Database called TRADING. I then started a NEW QUERY and created a table and inserted 2 rows. I then selected from the table and got 0 rows . I then went to Trading database on the left side and clicked tables and did not see the table I created. What am I doing wrong. SHould I remove SQL SERVER EXPRESS and then install SQL SERVER 2005 Developer Edition. look in the master database. you might have created it there. ...Show All
Visual FoxPro Need help on a small open table code
Hi, I m trying to make a general opentable function that I will use with all my apps in the future. Now I need someone to explain to me a few things to see things more clear. Here is my code: function OPENTABLE(TABLENAME) LOCAL TABLETOOPEN *Ok this is just a full path I make for the dbf file. I do not know if it the right way.what it gives is eg. c:\program files\my app\data\mytable.dbf TABLETOOPEN=TOSTRING(checkpathforslash(GETCONFIGVALUE("DBF_PATH"),.t.))+TOSTRING(RTRIM(LTRIM(TABLENAME))) IF !USED(TABLETOOPEN) USE (TABLETOOPEN) IN 0 SHARED RETURN .t. ELSE RETUR ...Show All
Visual C++ windows C++ form
Hi all, I have a problem I've build a windows form with microsoft visual C++ and it runs perfectly on my computer. But as soon as I try it on an other computer an error message tells me that the program doesn't work and to reinstall it might be the solution. I think I just didn't copy the right files with the .exe form. Thanks in advance J-F You need CRT to be deployed on another computer together with your winform applications. Check docs in CTPs or follow instructions outline on my blog, http://blogs.msdn.com/nikolad/archive/2005/03/18/398720.aspx and http://blogs.msdn.com/nikolad/articles/427101.aspx Thanks, Nikola ...Show All
Windows Forms Question about different classes and EventHandler
Hello again everyone! I'm quite new in C#. Yesterday I made a Clock class - it's using a System.Windows.Forms.Timer and there's a EventHandler timer.Tick. When I define this class in another class. It won't update the clock. Why it is like that and how can I change it What do you mean by " When I define this class in another class" Can you post relevant parts of your code ...Show All
