Search results

  1. J

    Question Use Multiple Type in Generic T C#

    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...
  2. J

    Question Problem loading dll on Windows 11.

    If only there was some way for us to know what code was being executed and what the error message was.
  3. J

    2 Filesystem Watchers or Get out of loop in 1 watcher

    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...
  4. J

    2 Filesystem Watchers or Get out of loop in 1 watcher

    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.
  5. J

    Question Does support Crystal Report in .Net 5 or .Net Standard?

    It can't be. One is asking others what you can/should do and one is telling others what they can/should do.
  6. J

    Question Does support Crystal Report in .Net 5 or .Net Standard?

    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.
  7. J

    How can I convert a ms access database to ACCDE?

    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...
  8. J

    How can I convert a ms access database to ACCDE?

    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.
  9. J

    How can I convert a ms access database to ACCDE?

    So you're saying, without actually saying, that you have no idea what that number 603 is supposed to mean?
  10. J

    How can I convert a ms access database to ACCDE?

    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.
  11. J

    How could I optimize my filtering on the database side?

    Off the top of my head, I believe that it's calling ToQueryString on the query.
  12. J

    Resolved Number format culture

    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...
  13. J

    Resolved Number format culture

    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.
  14. J

    Resolved Number format culture

    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...
  15. J

    Resolved Number format culture

    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...
  16. J

    How could I optimize my filtering on the database side?

    Perhaps you could explain what you're trying to achieve, rather than making us work it out from the code.
  17. J

    startup object visual studio c# not showing up

    Please provide a full and clear explanation of the problem.
  18. J

    Printing values of an array using "while"

    Also, the C# equality operator is ==, while = is the assignment operator.
  19. J

    Resolved Help Needed Please (comboBox Items)

    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...
  20. J

    Installer Wix size

    84 KB or 84 MB, because 84 KB is not huge?
Top Bottom