Kamen's Q&A profile
Visual C# MDI + Serial Port
Hi,... I have a MDI application. I am using SerialPort class of C# in it... How i can use same instance of that SerialPort class in my application for all child forms of MDI... Regards, VInay You can use a class with a static propertie that will hold the serial port: public class MySerialPortHolder { private static SerialPort _serialPort; public static SerialPort Value { get { if (_serialPort == null ) { _serialPort = new SerialPort("..."); // TODO: Initialize serial port. } return _serialPort; } } } In all your forms you can so: SerialPort seriaPort = MySerialPortHolder.Value; ...Show All
Visual Studio 2008 (Pre-release) .ForEach on Dlinq objects and Linq CTPs
In future version of LINQ will I be able to do a .ForEach directly on the Dlinq objects For example: var batches = from b in this.m_Database.Batches where b.EndTime == null select b; batches.ForEach(b => b.EndTime = DateTime.Now); Also will there be any other CTPs of Linq for Visual Studio 2005, or will I have to download the entire Orcas CTP if I want to use the newest features Thanks. Also will we be able to .ForEach on a query For example: List<string> test = new List<string>(); test.Where(s => s.Contains("LINQ")).Select(s => s).ForEach(s => s.ToLower()); ...Show All
Visual C++ messagebox
What's wrong with this MessageBox("Hallo. Dit is mijn eerste Visual C++ programma!"); I think you should try this: MessageBox( _T( "Hallo. Dit is mijn eerste Visual C++ programma!" ) ); I hope it helps. ...Show All
Visual Studio Reference Itemgroups within an itemgroup
Hi, Can you do this Why can't we reference an itemgroup within another itemgroup while batching <CreateItem Include="$(DeployProjectPath)\Config\%(ConfigurationToBuild.FlavorToBuild)\*.*"> <Output TaskParameter="Include" ItemName="SourceConfigFiles"/> </CreateItem> This statement errors: <CreateProperty Value="@(SourceConfigFiles->'$(BinariesRoot)\%(ConfigurationToBuild.PlatformToBuild)\%(ConfigurationToBuild.FlavorToBuild)\_PublishedWebsites\%(RecursiveDir)\..\..')"> <Output TaskParameter="Value" PropertyName="DestinationFullPat ...Show All
Visual Studio 2008 (Pre-release) Data Syncing between PPC DB and Desktop PC DB
Hi Rafik, The web link (Sync Services demos) published on your blog is not working. Please provide a link to view demos. I have few queries, 1) I wanted to sync data from pocket pc device database (.sdf) to SQL server database on Desktop pc. connect ppc device to desktop pc and perform sync operation can be supported by using OCS or .sdf database should be moved on to desktop pc using RAPI etc. 2) Sometimes I would need to sync data from pocket pc DB to desktop pc DB through wireless enbled n/w on PPC. Does OCS provides me unique solution in both the cases Please suggest me. Thanks, Hi, OCS support for devices is a matter of time, we are working on it. If you are looking for a solution today, ...Show All
Visual Studio Error 1305
While installing VS Professional Edition 2005. I am encountering Error:1305, cannot read from the file " file path" make sure files exists and have a access to it.. can you please suggest what is the cause of this error. Thanks Ravi Thapliyal I had trouble a while back installing an older SQL Server version on a then new laptop. It would give some type of file access message, I can't remember if it was similar to yours or not. Regardless we discovered that because file sharing was not yet enable on the laptop we could not get the SQL server set up. - It may be useless info, it might help. Good luck! ...Show All
.NET Development how to generate tables in access
Hi everybody, How can we generate tables in access using mysql and vb with the required columns thanx a lot Val and Paul .... your posts turned out to be really helpful .... and I able to create those tables .... thanx a lot .... A Very Happy New Year to u .... Vishal ...Show All
Visual Studio Express Editions Problems Installing VB 2005
I ran the installation process for VB 2005 via Internet. No errors were displayed during the installation but nothing gets installed. I see new folders in the hard drive: MS Visual Basic Studio 8 with the subfolders: Common 7, MSDN 2005 Express Edition - ENU, MS Visual Basic 2005 Express Editon - Enu, MSDN Express LIbrary y SDK. Can somebody help Can you try installing from the manual download to see if that fixes your issue: http://msdn.microsoft.com/vstudio/express/support/install/default.aspx If not can you post your installation logs: Open Windows Explorer Paste %temp% into your address bar Paste the contents of dd_vsinstall80.txt into a post (only from the timesta ...Show All
Microsoft ISV Community Center Forums Address Book Issues
Hi All, Recently we have installed another two more Front End servers and activated with 2nd LCSpool. Now we have two pools pool1 and pool2. Users are in the pool1 and are configured for pool1 and we have planned to move the users to pool2 and remove the pool1. We have set addressbook for pool2 and I want to know: When users are moved to the pool2 is the office communicator client automatcially download the addressbook from the configured links on the pools 2 or it will be still using the same addressbook. As soon as the server name or IP is changed to pool2 will the new full address book is downloaded or the delta file is downloaded. If full abs is downloaded then there will be chances of Bandwidth choke since the ...Show All
Windows Forms Pass data from one Windows Form app to another?
Hello, I have an application that takes command line parameters. I have code within the Main() method that makes sure only one instance runs at a time. The initial running works great. If it is attempted to be run again, it will notice this and not run the new instance thus keeping the original instance still running. That works great too. My problem is, if they attempt to run a second instance of the app, thus passing in new command line parameters to that 2nd instances, I need those parameters to be passed to the original, running application. How can I do this Thanks, Kevin If you're using the 2.0 Framework you can use the StartupNextInstanceEventHandler to get this information. You can use the ...Show All
SQL Server Enable and disable websync.log
Hi, is there a way how to enable / disable logging on web merge synchronization into the file websync.log The file exists in the ISAPI folder, on some machines there are some messages, on others there is nothing. There are Timeout messages on the client during synchronization and we need to find where is the problem, if it is on the server side or if it is a network error or something else. Thanks, Pavel I dont know how you got into this situation, but here is what you can try: Check if you have this key in your registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\Replication\WebSyncLoggingOff Is this value 1 If it is, reset it to 0. Then do iisreset. That should solve yo ...Show All
Software Development for Windows Vista break WhileActivity
Hello, everybody. Is it possible to break (close) WhileActivity from one of its child TIA There is no built in way for this but you can throw an exception from within the while and catch it in a fault handler added to the while, like the following: using System; using System.Workflow.Activities; using System.Workflow.ComponentModel; namespace WorkflowConsoleApplication20 { public sealed partial class Workflow1 : SequentialWorkflowActivity { public Workflow1() { InitializeComponent(); } #region Designer generated code /// <summary> /// Required method for Desi ...Show All
Visual Studio 2008 (Pre-release) Entity Model Designer - System.Data.Mapping.MapConnectionStringBuilder error! - urgent
Hi everyone! I installed the ADO.net vNext august CTP, and the Entity Model Designer prototype. I know other people have used the "Generate from database" function and it has worked all right. But when I select the "From database" and press "next" I get this error message: "An error has occured! Error message: Could not load type 'System.Data.Mapping.MapConnectionStringBuilder' from assembly System.Data.Entity, version = 2.0.0.0 ... " I can load the Assembly and create a MapConnectionStringBuilder object just fine... Anyone knows how to fix this I have uninstalled and reinstalled the CTPs. I have Visual studio 2005 Team Suit installed. Thank you! Ok, thank you for the fast reply Sanjay! Here it goes: Microsoft Windows XP [Version ...Show All
Visual Studio Express Editions VB2005, Datagridview and JOIN
Hello all, I have a problem with Visual Basic 2005 Express Edition and Datagridview that I was not able to solve. I need to get data from two tables of a MDB Access database and showing them into a Datagridview. Firstly, I tried to add into my VB form a Datagridview linking it to the first table's bindingsource object. So, I modified the table layout by adding an ID field, its ColumnType property to DataGridViewComboBoxColumn; its DataSource, DataMember and ValueMember properties. In this way, I can add/modify/delete records from the Datagridview but I need to show other fields coming from the second table (I could do that only using DataGridViewComboBoxColumn...). So, I tried to add in my Dataset.XSD a new TableAdapter using the simple fo ...Show All
.NET Development Exception: DataTable internal index is corrupted: '5'. on ...
Hi, I have a problem with bindingsource component in framework 2.0. I have a combobox bound to a bindingsource which is also bound to a dataset with 2 related tables and a datagridview bound to the same bindingsource. What I want to do is : When the selectedindex property of my combobox changes, the corresponding cell value must be changed in the datagridview. But although the value in bindingsource changes, datagridview does not display the new value. That value is displayed after I move the mouse over that cell and make it invalidate its region manually. Another error I caught is the one that you can see as the subject of my post. I do not know why i have that message when I try to change the property of ((DataRowView)mybindi ...Show All
