Search results

  1. JohnH

    Question .NET6 Open Hyperlink (Start Browser with URL)

    Set UseShellExecute to true, it is false by default for .Net (Core), opposite of .Net FW. Process.Start(new ProcessStartInfo() { FileName = url, UseShellExecute = true });
  2. JohnH

    FYI .NET WinForms UI/UX Component Library

    Just design examples @Skydiver see ReaLTaiizor/sample at develop · Taiizor/ReaLTaiizor
  3. JohnH

    Resolved Enums in Linq

    Blame it on multi-threading queuing.
  4. JohnH

    Resolved Enums in Linq

    When things go wrong in complicated expressions it can be a good idea to break in down into multiple statements: var values = (DealStatuses[]) Enum.GetValues(typeof(DealStatuses)); var myNewCollection = values.Select(fg=>
  5. JohnH

    Resolved Enums in Linq

    Right now you're trying to Select directly on Enum.GetValues which return System.Array. Put another paranthesis around the enum array cast: (...).Select
  6. JohnH

    My purpose is to remove a specific Row..

    Loop from highest index to lowest when removing items from that list.
  7. JohnH

    Problem .Net 6 COM and excel VBA revisitied

    Just guessing, could it be Debugger.Launch() in LiqComponentEnthalpy?
  8. JohnH

    Question add firewall rule in C#?

    This Nuget package looks easy to use: GitHub - falahati/WindowsFirewallHelper: A class library to manage the Windows Firewall as well as adding your program to the Windows Firewall Exception list. The first basic example shows adding an application rule.
  9. JohnH

    Question Randomized Playlist

    Start with this: "pick a random index in source" - can you do that? var index = random number from 0 to source list count -1
  10. JohnH

    Question Randomized Playlist

    A higher random number than 0 is statistically more likely, but that could happen too. Anyway, the approach must be changed. For example if you want to only add the items once you can pick a random index in source, get that item, remove it from source and add it to target list.
  11. JohnH

    Question Randomized Playlist

    You're trying to insert at an index that is higher than the number of items in RandomPlaylist.
  12. JohnH

    Why do some Methods not require a specified class? (Extremely basic question)

    This works: var abs2 = (-19.69M).Abs(); Without the paranthesis the - is applied afterwards. If you do this: var test = -14.ToString("x"); Compiler complains:
  13. JohnH

    Why do some Methods not require a specified class? (Extremely basic question)

    Math methods work on several numeric data types, but not all of them, and they don't have a common type.
  14. JohnH

    Resolved how do you compare ordered lists and find the difference int values in the list?

    In .Net framework projects you also have to provide a resultSelector, change before.Zip(after) to before.Zip(after, (First, Second) => (First, Second))
  15. JohnH

    Resolved how do you compare ordered lists and find the difference int values in the list?

    before.Zip(after) .Select((pair, index) => (pair, index)) .Where(x => x.pair.First != x.pair.Second)
  16. JohnH

    Slower site performance?

    Today I got one at VB.Net Forums, managed to open dev tools and in Network I saw that it hung on vbdotnetforums.com/webmanifest.php for 14 seconds before continuing. At same time C# Forums didn't respond too, got a "could not load page". When reloading both sites right after there is no delay or...
  17. JohnH

    Question How can I code so records filtered between two dates in DataGridView display in the Textboxs?

    Nothing in your code is associated with the da data adapter, you just create an instance and call Fill. For the Fill to be able to do its thing you must assign a select command to it, either by passing it to the constructor or later assigning it to the SelectCommand property...
  18. JohnH

    Slower site performance?

    It was maybe a week ago last time I saw it. (Chrome here too)
  19. JohnH

    VS2022 Format Code

    Still same here, check the keyboard settings. Here I have searched for "formatdocu". This action is common for all languages in text editor by the way.
  20. JohnH

    Slower site performance?

    Occationally lately I've seen a long delay when opening pages first time, coming directly in from RSS feed links, don't know if that's on my end. 99% super fast as @Neal say.
Top Bottom