Search results for query: *

  1. jmcilhinney

    Question Is this code thread-safe?

    As you say, you only need to use InvokeRequired if you need to determine whether it is required to use Invoke. The way I usually teach people to write code to modify a control from a UI thread is like so: 1. Start with the code you would usually use to update the control directly, e.g. Private...
  2. jmcilhinney

    Question Is this code thread-safe?

    I didn't really think about it before but now I think that this is sounding rather like an interview/test question that you're trying to get us to do for you. How about you explain what you think and then we can confirm it if you're correct or help you look elsewhere if you're wrong?
  3. jmcilhinney

    Question Is this code thread-safe?

    I think that you should be assigning Me.TextBox6_DisplayPath.Text to a local variable and using that in your lambda rather than using the control property directly.
  4. jmcilhinney

    Question I am using VB2019 I want to create a database, I got problems

    Firstly, please don't post unformatted code snippets. They are too hard to read. I have fixed the formatting for you this time. Please format your code yourself in future. Secondly, why do you have code you've written yourself in the designer code file? That file exists specifically so that the...
  5. jmcilhinney

    Question diagnostic sessie

    Everything that you can change about the IDE is done in the Options dialogue, so you really should have already looked there to see if there's anything that applies to this. It is in the obvious place: Any time you start using any new software, you should ALWAYS go to the...
  6. jmcilhinney

    Advice needed

    Do be aware that nothing older than .NET Framework 4.6.2 is officially supported anymore. That shouldn't necessarily be a problem, although I'm not sure whether VS will install such old SDKs anymore, if you don't already have them installed. I just checked the VS 2022 installer and it does...
  7. jmcilhinney

    Advice needed

    I haven't used Windows 7 for a long time so I can't recall whether it's guaranteed to have .NET Framework 3.5 installed or not. You could try and see and, if it doesn't work out, you could recompile for .NET Framework 2.0, as the same code would probably still work. As long as the Framework is...
  8. jmcilhinney

    Question How to call API? Where can i find sample codes?

    Please provide a FULL and CLEAR explanation of the problem. Are you talking about calling Windows API functions or invoking a Web API or something else? If the former, is it a specific function you want to call or are you just looking for general information on the principles involved? If you...
  9. jmcilhinney

    Question imports dll

    You should read this. It's a blog post of mine that explains referencing assemblies and importing namespaces.
  10. jmcilhinney

    Question imports dll

    I have no idea what that means. Please explain EXACTLY what you did and EXACTLY what happened when you did it. Also, where exactly did this library come from and how was it created? .NET applications can reference .NET assemblies and COM libraries only. If this library exports functions...
  11. jmcilhinney

    Question Parameter in RDLC report

    I have fixed your code formatting. The INLINE CODE tag is for inline code. Use the CODE tag for blocks of code.
  12. jmcilhinney

    Resolved problem

    You said in post #1 that nm was "5.2356" and that w was 5000 but the screenshot you provided shows that nm is "5.000" and doesn't show any value for w. It doesn't show a value for i either, so we can only guess which item/element of rijrecords is being set on the current iteration, but it looks...
  13. jmcilhinney

    Resolved problem

    As for the issue, your current culture could change how the comma is interpreted but I don't see how that code could produce 5000 either way. Can you please provide a screenshot showing that code with a breakpoint immediately after and the contents of the Autos or Locals window?
  14. jmcilhinney

    Resolved problem

    Firstly, please provide a descriptive title for all threads. Your title is as good as no title at all. Secondly, please don't post unformatted code snippets, as they are unnecessarily hard to read. This one's not a big deal but others may be worse, so just always format them to help us help you.
  15. jmcilhinney

    Question ExcuteReader Error

    I specifically asked you to format your code snippets and you have failed to do so again. If you're not going to help us help you, you make it less likely that we will help you. Also, you just posted all the same code as before but with a few comments. Some more detail is good but you still...
  16. jmcilhinney

    Question ExcuteReader Error

    I don't know. I need more information in order to be able to help you. That's why I asked you a question. Are you going to answer it? Have you actually debugged your code? If not, do so now, and do so before posting in future. Step through the code and find out exactly where the exception is...
  17. jmcilhinney

    Question ExcuteReader Error

    By the way, your Finally block is pointless because you are creating the connection with a Using statement, so it will be implicitly closed at the end of the block. Also, you don't have to nest multiple Using blocks like that. A single Using statement can create multiple objects. You just need...
  18. jmcilhinney

    Question ExcuteReader Error

    Are you sure that it's that code that throws the exception? You're not calling ExecuteReader there and I don't see any code that would display a message box, so I suspect it's actually happening elsewhere.
  19. jmcilhinney

    Question ExcuteReader Error

    Please be sure to format code snippets. Unformatted code is too hard to read.
  20. jmcilhinney

    Question monitor text as it is input in textbox

    Mistakes are fine - we all make them - as long as we learn from them. As someone who has undoubtedly been stupid in the past, I say "all's well that ends well".
Back
Top