Search:

Type: Posts; User: nbrege

Page 1 of 13 1 2 3 4

Search: Search took 0.20 seconds.

  1. Replies
    6
    Views
    330

    VS 2019 Re: Get status code with HttpClient

    Can you give me a quick example?
  2. Replies
    6
    Views
    330

    VS 2019 Re: Get status code with HttpClient

    PD ... I did try HttpRequestException, but it never gets thrown. The only ones that get thrown are generic Exception, as in my code above, or AggregateException. BTW, the code above is running in a...
  3. Replies
    6
    Views
    330

    VS 2019 Get status code with HttpClient

    I am using the following code to get a string from a server:


    Dim handler = New HttpClientHandler With {.UseCookies = False}
    Dim http As New HttpClient(handler)
    Dim url1 As String =...
  4. VS 2019 Re: Populating a Combobox display/value of states from text file

    I'm sure that no matter how you choose to do this, it will be kludgey. I was also not aware of SortedDictionary. Does that offer any benefit over a SortedList?
  5. VS 2019 Re: Populating a Combobox display/value of states from text file

    I found a solution that works exactly how I want, using a SortedList, which I didn't know existed until today.
    I just had to handle the error I was getting when setting the SelectedIndex to -1,...
  6. VS 2019 Re: Populating a Combobox display/value of states from text file

    There should only be "None" where there's only 1 item per line in the file. So In my test example above, there should be 4 "None"s...
  7. VS 2019 Re: Populating a Combobox display/value of states from text file

    Here is the exact code I'm using for testing:


    Dim myFile As String = "D:\Temp\ComboTest.txt"

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click

    ...
  8. VS 2019 Re: Populating a Combobox display/value of states from text file

    It looks like I spoke too soon. When sorted is True it only sorts the Display member. The Value member doesn't follow, so they become disassociated. It looks like I'm back to figuring out how to...
  9. VS 2019 Re: Populating a Combobox display/value of states from text file

    Thanks, that works. I would think that sorting the datasource first would also work, but I haven't tried that. Is there any way to do that with the code you posted in #2?
  10. VS 2019 Re: Populating a Combobox display/value of states from text file

    JMC, thank you. This method works fine except I found that if the Combobox.Sorted property is set to True, then it doesn't display the items properly. It displays both values enclosed in brackets. ...
  11. VS 2019 Populating a Combobox display/value of states from text file

    If I have a text file with all the state names & 2-letter abbreviations, how do I read that in to a Combobox & set the Display member & Value member? I want the Combo to show the full state name,...
  12. Replies
    4
    Views
    363

    Re: Website weirdness?

    Seeing the same thing. Also seeing weird chacters in one of my old posts...
  13. Replies
    4
    Views
    363

    Website weirdness?

    Has anyone else noticed any odd behavior with the VBForums website recently?
  14. Replies
    4
    Views
    326

    VS 2019 Re: Getting a string within a string

    Yes, should only ever be 1 pair of parentheses & the part between the parentheses may not always be the same length.
    After playing around a bit I came up with this as a working solution. I'm sure...
  15. Replies
    4
    Views
    326

    VS 2019 Getting a string within a string

    What's the easiest way to get the string between the parentheses in the following string:


    RPM|Cabinet - Tall - -Notch (18.000H x 1.500W) - Black - Edge: Black

    In this example the returned...
  16. VS 2019 Re: Converting non-US date string to date object

    Thanks PD...
  17. VS 2019 Re: Converting non-US date string to date object

    That's interesting. I didn't know you could do that. So when I don't convert to a string it gets saved as "2024-02-18T12:04:30.5186749-05:00". It looks like it's more of a universal date/time...
  18. VS 2019 [RESOLVED] Converting non-US date string to date object

    I'm saving a date to a JSON file as a string using Date.Now.ToString & then reading it back in & converting to a date at startup using CDate(myDateStr) which works fine, except when somebody from a...
  19. Replies
    7
    Views
    654

    VS 2019 Re: Drag/Drop Outlook message to form

    Thanks for the reply, but not really what I'm looking for. I know how to use the MailItem object. I just can't figure out how to cast the dropped object to a MailItem object.
  20. Replies
    7
    Views
    654

    VS 2019 Drag/Drop Outlook message to form

    I want to be able to drag & drop an email message from Outlook onto my form & then save the message to a specified location & also save any attachments to a specified location. I created a label...
  21. Replies
    7
    Views
    686

    VS 2019 Re: Visual Studio & 4K

    I have not tried that, so I'm not sure how it would work, but my plan is to have only 1 monitor for now...
  22. Replies
    7
    Views
    686

    VS 2019 Re: Visual Studio & 4K

    Ok, no problem. I guess I'll also wait for someone smarter than me to post a solution. For now, I guess I'll have to aclimate to fuzzy text...
  23. Replies
    7
    Views
    686

    VS 2019 Re: Visual Studio & 4K

    So have you done anything to resolve the issue?
  24. Replies
    7
    Views
    686

    VS 2019 Visual Studio & 4K

    This is not specifically a VB.Net question, more of a VS question. Does anyone here use a 4K monitor for programming? Yesterday I replaced my old monitor with a new 4K monitor. It looks & works...
  25. Replies
    5
    Views
    514

    VS 2019 Re: Newtonsoft json help - remove a value

    I can't use .RemoveAt() because I wont know the index. That's why I asked how to remove by specifying the actual value...
  26. Replies
    5
    Views
    514

    VS 2019 Re: Newtonsoft json help - remove a value

    Thanks for the reply. I tried your suggestion & came up with the following bit of code, but it's not working for me..


    Dim jsonObject As JObject = JObject.Parse(IO.File.ReadAllText(myFilename))...
  27. Replies
    5
    Views
    514

    VS 2019 Newtonsoft json help - remove a value

    Suppose I have the following json string:


    {
    "settings": {
    "setting1": "someString",
    "setting2": 10,
    "setting3": 20,
    },
    "favorites": [
  28. VS 2019 Re: Use X number of threads to perform Y number of tasks

    Shaggy ... in my case I am downloading files. I just assumed (maybe incorrectly) that using multiple threads would speed up the process. What would be an example of where using multiple threads...
  29. VS 2019 Re: Use X number of threads to perform Y number of tasks

    Thank you. I was not even aware of such a thing as ConcurrentQueue...
  30. VS 2019 Use X number of threads to perform Y number of tasks

    I want to be able to specify the number of threads to work on a common list of tasks. So for example, if I have a list of 87 files to download & I want to use 5 threads to download those files, how...
  31. Replies
    6
    Views
    552

    VS 2019 Re: Newtonsoft help - declaring a JObject

    Thanks for the help guys. I'm starting to figure this out, but I'm still stuck on one part. How do I add in a history item to an existing file?
    This is what I tried:



    Dim json As...
  32. Replies
    6
    Views
    552

    VS 2019 Re: Newtonsoft help - declaring a JObject

    Kebo ... thank you for the reply. The code you posted works great. The reason I want a top level node is because there is more to my settings than what I posted. Here is what I really want:

    ...
  33. Replies
    6
    Views
    552

    VS 2019 Newtonsoft help - declaring a JObject

    I want to use Newtonsoft JSON.Net to save & load program settings in a file.

    I want the structure of the file to be like:


    Settings
    Setting1:value
    Setting2:value
    Setting3:value
  34. Replies
    4
    Views
    581

    VS 2019 Re: VLC media player help

    Does this work in .Net? All the code samples are C++. I know I can embed a Windows Media Player control on a form, but I was looking for something with a few more features...
  35. Replies
    4
    Views
    581

    VS 2019 VLC media player help

    I'm trying to use the VLC media player on a winforms project to play video. I added the VLC NuGet package to my project, added the VLC control to my toolbox items & added the VLC control to my form....
  36. VS 2019 Re: Saving settings to database - insert vs update

    I actually did think about doing that way. Since I am creating the database & tables on first start of the program, it would pretty easy to just insert some default values for the settings. I just...
  37. VS 2019 Saving settings to database - insert vs update

    I want to use an Sqlite database to save certain program settings. I want the program to load the settings on startup & set the controls accordingly and then save the settings on program exit. This...
  38. Replies
    9
    Views
    815

    VS 2019 Re: Setting & getting Combobox value member

    I'm not sure what you mean by this. Please clarify. I'm adding items to a list called "items", not to the combobox .Items collection...
  39. Replies
    9
    Views
    815

    VS 2019 Re: Setting & getting Combobox value member

    Thanks for the comments. I was missing the data binding part. I actually ended up using Bing AI to get the following working code:


    Dim items As New List(Of KeyValuePair(Of String,...
  40. Replies
    9
    Views
    815

    VS 2019 Setting & getting Combobox value member

    I'm trying to populate a combobox in code with values as follows:


    Me.ComboBox1.Items.Add(New KeyValuePair(Of String, Integer)("Quick", 10000))
    Me.ComboBox1.Items.Add(New...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width