Donal Lafferty's Q&A profile
Windows Forms BindingSource.EndEdit() does not throw exception
I've a business object, and it validate value when new value is assigned to its properties, exception will be thrown if value violate validation rules. Business object is bind to UI controls by a BindingSource object, when I input a invalud value in TextBox and call BindingSource.EndEdit() programmically on FormClosing, exception is eaten by somewhere, I do not allow user to close the form if error is detected, Thank you very much! public class Customer { private string _customerNo; private decimal _balance; public string CustomerNo { get { return _customerNo; } set { _customerNo = value; } } public decimal B ...Show All
Visual Studio Express Editions Does VC# 2005 Express edition support 3D rendering?
Hello, I'm facing a problem while developing a 3D application in VisualC# 2005 Express Edition. The editor does not recognize 'Viewport3D.Camera' property. The following code is recognized by XAML Pad but shows an error in VS. <Viewport3D> <Viewport3D.Camera> <PerspectiveCamera LookAtPoint="0,0,0" Up="0,1,0" Position="-5,2,3" FieldOfView="45" /> </Viewport3D.Camera> <Viewport3D> VS recognizes the Viewport3D class but says Viewport3D.Camera is an invalid child element. Can somebody point out the reason Thanks in advance, Sowbhagya ...Show All
Windows Forms Differentiate the dates in month calender control in different colour
Hi, I am using MonthCalender control in my application,my requirement is to show the different dates in different colour. say for example.. All saturdays & sundays should be in Green Colour Assuming all local holidays to be in Red colour How do we achive this in windows application. Incase anyone have any clue about the above mentioned senario.. please let me know. Thanks in Advance Mohanakrishnan.G I think you would have to write your own class that derives from MonthCalendar in order to do what you want. However, as an alternative to coloring the dates in green or red, you can just set those d ...Show All
.NET Development SQL strings and distributed applications
I am building a solution in VB 2005 which uses SQL strings to determin varoius totals etc. It works fine on my machine - but when I deploy the solution and install it on another machine, it fails to show the totals at all. I am in no way an expert so i assume that I have overlooked something simple. I would be most grateful if anyone could point me in the right direction. I don't get any error message, when you say what kind kind of a statement do you execute - could you give me clue as to what you mean Chris ...Show All
Visual Studio Extending with a new Platform / Device.
How can I introduce a new device / platform into visual studio I'm talking about the integration you see with SmartPhones, XBOX, etc. Is it even public the interface to integrate stuff like that There's another example, altho a little bit different - F#. It has source code and all, except for the imteresting part - the integration. I think it's interesting because it's using another compiler - an exe file. I dont really understand why this part of the extensibilty is kept "secret", because i would think that it'll make Visual Studio even more popular to developers - especially game developers because it will create a mechanism of ...Show All
Windows Forms Does calendar control has method to omit saturday and sundays
Does calendar control has method to omit saturday and sundays and calcute the duration of days. help me No it doesn't. You'll have to use a 3rd party custom control. -mark Program Manager Microsoft This post is provided "as-is" ...Show All
.NET Development Remotely accessing system certificate stores
I am developing a C application to use SSL/TLS. Using the samples provided by MS, I have been generally successful. I am using a stand-alone CA at this time. I have been able to run my server and client with a SSL connection on the same machine as well as 2 separate machines. However, to get this to work I have had to install the certificates on the machine on which the program is running. The issue that continues to "dog" me is how to get "remote system store access" to work. When I open the certificate store I am constructing \\<machine name>\My, but the opening of the certificate store only works ...Show All
Visual Studio 2008 (Pre-release) GridView representation of XML
Hi, I am trying to display the contents of an Xml Document in a GridView. An example of the the Xml is as follows; <Table> <Column>Name <Cell>Dave</Cell> <Cell>Pete</Cell> </Column> <Column>Age <Cell>32</Cell> <Cell>26</Cell> </Column> </Table> I want the GridView to look as follows; [Name] [Age] Dave 32 Pete 26 That is, in tabular form. My Xaml contains an XmlDataProvider; <XmlDataProvider x:Key="TableModel" /> and the C# XmlDataProvider xml = (XmlDataProvider)FindResource("TableModel"); xml.Document = doc; Each Gr ...Show All
Visual C# FileSystemWatcher hell... stops watching after event
I created a FileSystemWatcher object to watch for newly created files. Once a file is created, the FileCreated() method is called through the FileWatcher event handler. Problem is, after this happens, FileWatcher doesnt seem to listen anymore. I have to create a new FileWatcher every time the event is fired and the method completes. Below is my code. This is a seperate class from the Main class. From the Main, I call this class to set up and create the FileWatcher. I have tried to put the new FileSystemWatcher() in the MAIN class, but it stil quits listening after event. I also caled this watcher.WaitForChanged( WatcherChangeTypes .Created) ...Show All
.NET Development Killing Asynchronous Calls
Hi, I have thee following code that uses a delegate to make an asynchronous call. What I would like is a way of killing this call if need be. That is, the user could click on an abort button while the call is in progress, I want to then end that process immediately. Please can anyone help //instantiate delegate and make call AsyncDelegate dlgt = new AsyncDelegate(objModel.CreateMDCFiles); IAsyncResult ar = dlgt.BeginInvoke( null , null ); // Poll until call is finished. while (!ar.IsCompleted) { Application.DoEvents(); } Thanks in advance The best that I can come up with is ...Show All
.NET Development '\0' in xml string
hi i am reading an xml document from a string which i receive bytewise from the network. the string is assembled out of char like that s\0e\0n\0d\0 for "send" for example. i really don't know how the '\0' came in there, but so far they didn't bother me. but no with an xmldocument they do. if i try to load the string with either document.LoadXml(string) or document.innerXml = string then i get an exception saying "name cannot begin with '.' character, line 1, position 2", so there seems to be a '.' right where the \0 is in the string (so my assumption is that \0 stands for a '.', but i am really not that good at this chara ...Show All
Visual Studio Team System Baseless merge and version conflicts
I am trying to do a baseless merge between two branches. The conflicts are all of Type Version except for the few files that actually were different. When I tried to do a Autoresolve, it could not resolve the Version conflicts, of which there were 9700+ of them. Is there way to tell TFS to ignore the version conflicts There's no way that we can manually resolve 9700+ conflicts... Thanks, Jim "AcceptYours" is the resolution that means "don't touch anything in the target branch," or equivalently, "discard the changes coming from source." You can select everything in the ...Show All
SQL Server Should this be an error rather than a warning?
If you have a package that uses an environment variable for an indirect configuration and the environment variable is not present when the package runs you get the following warning: The configuration environment variable was not found. The environment variable was: "Seer.ConnectionManager.CUECommonReference". This occurs when a package specifies an environment variable for a configuration setting but it cannot be found. Check the configurations collection in the package and verify that the specified environment variable is available and valid. IMO, if the package is expecting to find something and cannot find it then ...Show All
SQL Server Report task?
Hello, I'm not sure if this one should be in this forum. Anyway... I need to build some reports in MS Word format. Is there are any way to do that It can probably can be done in Reporting Services, but how I can merge these two tools in one project (solution) for example Thanks. You can have a SSRS project and a SSIS project in the same solution. As an aside...you can also share data sources between those projects which is a handy feature. -Jamie ...Show All
.NET Development System.IO.SerialPort sample in V C++ Express
Could someone please post an entire example (with includes, using , namespaces, etc) I have found several samples for C# and V Basic, but none for V C++. It could be just opening a commport and exitting. I can't quite get things set up and through build. Thanks, Rich The following is very simple example of how to user SerialPort in C++. using namespace System; using namespace System::IO::Ports; int main(array<System::String ^> ^args) { SerialPort^ serialPort = gcnew SerialPort( L"COM1", 9600, Parity::None, 1, StopBits::One); serialPort->WriteLine("Hell ...Show All
