Search results

  1. jmcilhinney

    Resolved How to Print array into list box?

    On an unrelated note, if you have the choice, I would suggest that you stick to targeting .NET Framework 4.8 for now. There are advantages to targeting .NET 5.0 but they really don't apply to beginners creating WinForms apps. .NET 5.0 is based on .NET Core and there are still a few things that...
  2. jmcilhinney

    Resolved How to Print array into list box?

    There's a lot to address here. First and foremost, DO NOT post code just as a picture. There may be cases where a screenshot can add value but, even then, you should ALWAYS post the code as text and formatted as code. We can't copy and paste code to quote it or test it for ourselves from a...
  3. jmcilhinney

    InvalidCastException - image from database

    Obviously the fourth column in your DataTable contains Strings rather than Byte arrays. You can prove it to yourself by doing this: Dim column = table.Columns(3) Debug.WriteLine($"Name: {column.ColumnName}; Type: {column.DataType}") You need to determine whether you are accessing the wrong...
  4. jmcilhinney

    Question play video on webbrowser

    A browser does not understand MP4 files the way it does a JPG or the like. You would need to load some HTML code that could play the file. MP4 is also not a format that HTML 4.x understands natively, so your HTML would have to use some media player to actually play the file. Here are some...
  5. jmcilhinney

    Vb.net stops responding

    By the way, your title appears to be inaccurate. To say that an application stops responding is to say that it freezes. It doesn't sound like that is what's happening at all. That it fails to build successfully is very different.
  6. jmcilhinney

    Vb.net stops responding

    Deleting the project and starting again was very much the wrong thing to do. What you describe is almost certainly not an issue with Visual Studio but with your own code. You most likely have build errors so when you attempt to run your project, it fails to build and then an old version of the...
  7. jmcilhinney

    Resolved [VSTO] Can I control the event on save?

    From what I can see, something like this should work: Private Sub ThisAddIn_Startup(sender As Object, e As EventArgs) Dim app As Excel.Application = Me.Application AddHandler app.WorkbookBeforeSave, New Excel.AppEvents_WorkbookBeforeSaveEventHandler(AddressOf app_WorkbookBeforeSave)...
  8. jmcilhinney

    Question find data in tabel.a not in tabel.b

    Also, please post your questions in the most appropriate forum. This question has got absolutely nothing to do with VS so it doesn't belong in a forum about VS. It's debateable whether it belongs on this site at all, because it is purely a SQL question. Presumably it is SQL being executed in a...
  9. jmcilhinney

    Question find data in tabel.a not in tabel.b

    Please provide a FULL and CLEAR explanation of the problem, which would include the schema of each table, how they are related and some example data and the expected output.
  10. jmcilhinney

    Help me out to clear error

    And here we go with questions about information not provided. This is why you need to provide a FULL and CLEAR explanation. Please do that now. Stop to think what information you would need if you had no prior exposure to this project. Don't just assume that we know what you're thinking.
  11. jmcilhinney

    Help me out to clear error

    In post #2, I specifically said that you should post your code FORMATTED APPROPRIATELY. In post #5 you posted unformatted code. I have now taken the time to format it for you, so that it is appropriately readable. Please format ALL code snippets for readability.
  12. jmcilhinney

    Help me out to clear error

    Basically, you're doing your data access wrong. Let's improve it in steps. Firstly, it's best not use AddWithValue at all. It will work as expected most of the time but some of the time it won't. Do you know when those times are? Just don't use it at all and you don't have to. Always use Add...
  13. jmcilhinney

    Help me out to clear error

    As for the issue, the error message is telling you exactly what the issue is. The first thing you should have done was research what a NullReferenceException is and what causes it to be thrown. If you'd done that then you'd know that it is trying to access a method of an object that doesn't...
  14. jmcilhinney

    Help me out to clear error

    As for the issue, the error message is telling you exactly what the issue is. If you had done your own research first, which you should have done, then you'd know what the general circumstances are that cause a NullReferenceException to be thrown, i.e. accessing a member via That's fine, as...
  15. jmcilhinney

    Help me out to clear error

    Please don't post just a picture of code or of error messages. Both are text so please post them as text, formatted appropriately. If you feel that a screenshot adds some value then, by all means, provide that as well but it should NEVER be all you post. If we want to test your code for...
  16. jmcilhinney

    Resolved Console vs Debug

    Why would you be trying to read input from the Console in the first place? It's a WinForms app. You can use Console.WriteLine to provide information to you - the developer - while debugging. It's not for providing information to the user and it's certainly not for getting input. That's what the...
  17. jmcilhinney

    Resolved Console vs Debug

    One point to note with Debug.WriteLine is that you can leave it in your code and, when you create a Release build, it will simply be ignored. That means that you can leave your debug logging code in and it will have no effect on your final build. That said, the output from Debug.WriteLine...
  18. jmcilhinney

    Threading Error

    That's why I didn't actually bring that up directly, and just left it in the code. I seem to recall having read something about that being the preferred option some time back but I can't recall where and it would make little real difference anyway. What other forums want is irrelevant. Each one...
  19. jmcilhinney

    Vb.net and SQL query

    As for the question, yes, you can do it all with a single query. Just put all three conditions in the WHERE clause and populate a single DataTable. You can then create three DataViews from that one table and bind them to the controls: Dim sql As String = "SELECT param1, param2...
  20. jmcilhinney

    Vb.net and SQL query

    First things first, don't use a DataSet unless you actually need a DataSet. If all you need is a DataTable then just use a DataTable.
Top Bottom