We used to implement our own unit of work and repositories in my office and we initially kept doing so when we switched to Entity Framework. We started encountering difficulties and then we realised that your EF context basically is a unit of work and each DbSet (I believe they were EntitySet in...
There's a bit wrong there. Firstly, the whole point of a using block is to dispose/close objects automatically, so closing your writer inside that using block defeats the point. Secondly, checking for the file and deleting it is pointless when you can just overwrite it...
Given that a FileSystemWatcher raises its events on a secondary thread by default, I wouldn't have thought that there would be an issue with multiple event handlers running at the same time. They should just run on different threads.
From what I have read, up to about the middle of last year, Crystal Reports does not and will not support .NET Core. Note that .NET 5 and later are based on .NET Core. You will need to either stick with .NET Framework, at least for the reporting part, or else look to a different reporting product.
Here's some information on, as I suspected, undocumented functionality of the SysCmd function, including this one. The issue here is the fact that C# is a strictly-typed language and that function is defined as having a first parameter of type Microsoft.Office.Interop.Access.AcSysCmdAction so...
You need to find out what that 603 actually means and that would appear to be a VBA question rather than a C# question. It may be some undocumented functionality because even the VBA documentation seems to suggest that the corresponding line of VBA code is invalid.
What command are you trying to perform? The documentation for that Microsoft.Office.Interop.Access.AcSysCmdAction enumeration is here. I don't see a value that corresponds to 603.
Note that I generally wouldn't use those custom controls myself. I'd generally use a NumericUpDown, which will do the work for you, or else just let the user type whatever they want into a TextBox and then validate on the Validating event. Even the NumericUpDown will let the user enter multiple...
It's also worth noting that you can display a prompt in a TextBox without setting the Text, using the SendMessage API and the EM_SETCUEBANNER message. I'm not going to go into detail here as there are many examples on the web.
For the record, here's a custom numeric text box control I created some time ago, which you can use in place of a regular TextBox:
Imports System.Globalization
Public Class SimpleNumberBox
Inherits System.Windows.Forms.TextBox
Private Const WM_PASTE As Integer = &H302
Protected...
Why don't you just respect the number formatting of the current system, whatever that may be? You can parse and format numbers without specifying a culture or specifying the current culture and it will just work, showing every user what they expect to see and allowing every user to enter what...
This is easily achievable using data-binding if the data is stored in DataTables in a DataSet. You can create a DataRelation between the two tables and bind the child control to that. Selection of a parent will then automatically filter the child list.
Create a new Windows Forms Application...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.