• Hello and welcome to our new forums. We upgraded our forum sites to a more robust and modern system which we hope you will enjoy. Be sure to check out your profile by clicking the button on the top right and configure your preferences, signature, time zone, avatar, etc. as you wish. If you need help with using this new forum'ware try the help link on the bottom right.

    Click here to review your account now.

Search results

  1. JohnH

    Question .NET Framework version

    Lifecycle FAQ—.NET Framework
  2. JohnH

    Question McAfee says this site is dangerous ?

    I'm not using Mcafee, but found this webpage for lookups, here you can also submit anonymous reports it appears: Check Single URL Depending on product chosen you get these categorizations with "medium risk": Neither the S/A/K or PUP categorization are true for this site and must be due to...
  3. JohnH

    Using Regex

    In top-right menu you can 'edit thread' and set a resolved/answered thread prefix.
  4. JohnH

    Using Regex

    The arguments can be added multiple places in the string. That is the regex expression, how sound that expression is you can decide yourself. Lets say you take one illegal char \ and escape it \\ and put that in the placeholders, then you get this string/expression ([\\]*\.+$)|([\\]+) Now you...
  5. JohnH

    Using Regex

    String.Format Method (System) | Microsoft Docs In other words the placesholders {0} are replaced with the string in invalidChars variable. Today you can use Interpolated Strings (Visual Basic) | Microsoft Docs instead of String.Format for same purpose.
  6. JohnH

    Multiple threads, progress in order

    Here is an alternative using TPL with continuations, in this example I will also use a Function instead of a Sub. In TestJob class add this method: Public Function ProcessSimpleResult(time) As Task(Of String) Thread.Sleep(time) 'processing WaitTask?.Wait() Return Task.FromResult(ID)...
  7. JohnH

    Multiple threads, progress in order

    Let's say there is a nested loop where each item has some processing time, each item should be reported (to UI) when finished and the items must be reported in work order. Here is pseudo code of the problem: for A for B process AB report progress AB Progress report must be in...
  8. JohnH

    Resolved Using Alpha Vantage API

    I would prefer any .Net way to download data instead of XmlHttp COM object, there are several including HttpWebRequest, WebClient and HttpClient which is the latest and greatest. Here's a sample with that: Public Shared client As New Net.Http.HttpClient() '(intended to use as single instance for...
  9. JohnH

    Question How do I add a multi-line TextBox to a PropertyGrid?

    Here you can see what assembly and namespace it is defined in: MultilineStringEditor Class (System.ComponentModel.Design) | Microsoft Docs
  10. JohnH

    Question How do I add a multi-line TextBox to a PropertyGrid?

    The question is not clear, possibly you should look up MultilineStringEditor, this is the kind of editor you get for Text property of TextBox control for example.
  11. JohnH

    Resolved platform selection

    Edit first post in thread and change Thread Prefix to Resolved or Answered, same as in our previous forums. Possibly you use the menu top-right of thread that says 'Edit Thread' to do this..
  12. JohnH

    AES Encryption of a string

    It makes sense that the hex string is two hex digits per char (it can also be one) so you initially got twice key/IV the length. You can also use this in your loop (16 is the number system base for hex): bytes(i / 2) = Convert.ToByte(text.Substring(i, 2), 16)
  13. JohnH

    AES Encryption of a string

    Look at .LegalBlockSizes/.LegalKeySizes, they are 128-256 bits which is 16-32 bytes. IV is usually equal to block size, default 16 bytes, but can be upped to 32 bytes it looks like.
  14. JohnH

    Question Need help with some NetSH concepts...

    Why not use the Process class? The app must also run as admin of course. This works fine for me: Process.Start("netsh", "advfirewall set allprofiles state off")
  15. JohnH

    Resolved platform selection

    That is the way to create x86 platform in Configuration Manager, you can check app in runtime with Environment.Is64BitProcess. Actually since VS 2013 there is a checkbox in Compile tab of project properties that says 'Prefer 32-bit' also for AnyCPU builds for .NET 4.5+ projects.
  16. JohnH

    Resolved How to avoid exceptions while looping through processes

    It could depend on VS version, for older versions there was a hosting process that could prevent this check (you could start VS as admin yourself to debug elevated). I'm using 2017 and it ask to restart VS as admin (elevation) if I include that manifest and started VS normally.
  17. JohnH

    Resolved How to avoid exceptions while looping through processes

    MainModule of most processes with SessionID=0 can be accessed if you run the app elevated as admin. I think the limitation is Process.GetCurrentProcess.SessionId for regular user process, but even for those some access is denied or could throw other exceptions.
  18. JohnH

    Need full path returned from Listview double click event

    I haven't seen it, but maybe this can be used: ImageList.TransparentColor Property (System.Windows.Forms) | Microsoft Docs
  19. JohnH

    Need full path returned from Listview double click event

    I noticed that in Details view the icon wouldn't show (ImageList is set for SmallImageList), but if I change the order of code and add to ImageList before adding the ListViewItem then it works.
  20. JohnH

    Need full path returned from Listview double click event

    Here you see the Add method used: ListView.ListViewItemCollection.Add Method (System.Windows.Forms) | Microsoft Docs As you can see the second parameter is the imageKey, then see that ListViewItem has such property: ListViewItem.ImageKey Property (System.Windows.Forms) | Microsoft Docs In event...
Top Bottom