Search:

Type: Posts; User: jmcilhinney

Page 1 of 13 1 2 3 4

Search: Search took 0.50 seconds.

  1. Re: How to get a Control cell row and column in TableLayoutPanel?

    It would probably be a less tricky control if you bothered to read the documentation. If you'd done that then you have already seen that it has a GetCellPosition method.

    Just like every control, a...
  2. Re: Why can't I add to a list of string ?

    This line:
    Dim Lyst(5) As List(Of String)
    creates an array with six elements and, as with ALL arrays, each of those elements is Nothing until you actually assign something to it. Are you doing that...
  3. Replies
    10
    Views
    271

    Re: What is happening here ?

    The code you posted will not compile with Option Strict On, so you must either have it Off at the project level or the file level. Your 'sender' parameter is type Object, as is the case for all event...
  4. Replies
    10
    Views
    271

    Re: What is happening here ?

    You need to turn Option Strict On. You're trying to fix issues that shouldn't even exist in the first place. Just do the right thing from the start and there will be fewer issues to fix.
  5. Re: "Cannot access a disposed object" When Closing Form

    Read this.

    Both Invoke and BeginInvoke will execute a method on the thread that owns the control it is called on. Invoke is synchronous, which means that it will not return until the invoked...
  6. Re: "Cannot access a disposed object" When Closing Form

    Big opportunity missed to say "here's one I prepared earlier". ;)
  7. Re: "Cannot access a disposed object" When Closing Form

    So your SerialPort is still receiving data, even after the form is closed, and it tries do something with a disposed control. You should handle the FormClosing event and close the SerialPort there,...
  8. Replies
    12
    Views
    417

    Re: Partial function in VB6?

    I'm no expert so I might be missing something but I suspect that that's because it's an attempt to implement a functional programming concept in other than a functional programming language, so it...
  9. Replies
    6
    Views
    239

    Re: Charts from Datagridview

    I was going to post a LINQ solution but I actually don't think that's a good idea. You should use a solution that you understand and you should actually apply some logic yourself to come up with a...
  10. Replies
    6
    Views
    239

    Re: Charts from Datagridview

    Is you grid bound to anything, e.g. a DataTable?
  11. Replies
    6
    Views
    239

    Re: Charts from Datagridview

    Converting the data from what you have to what you want and then displaying it in a chart are two completely separate issues.

    If you're targeting .NET Framework then the Chart control is in the...
  12. Re: "Cannot access a disposed object" When Closing Form

    Why are you calling Close in the Closed event handler? That event is raised when the form has been closed, so you can do something specific at that point. Why would you think that closing a form that...
  13. Re: how to place MessageBox when proper condition is met

    I think that it's safe to say that you don't know how to debug or even what it is. You seem to think that debugging is running the project in the debugger and then interacting with it like any other...
  14. Re: how to place MessageBox when proper condition is met

    The answer here should be obvious anyway. If you want to do something under some circumstances and not others then you use an If statement. Is your call to MessageBox.Show inside an If block? No it...
  15. Re: how to place MessageBox when proper condition is met

    Then you must know exactly what the code does and how that differs from what you expect, so why do you still refuse to describe that to us? I'm not sure I believe that you have debugged it. Running...
  16. Re: how to place MessageBox when proper condition is met

    Use the debugger. You will see exactly what the code does and where it doesn't do what you expect. I think I may have already recommended that and you have clearly ignored that advice if that is the...
  17. Replies
    10
    Views
    469

    Re: [RESOLVED] Where are my dots ?

    You can do that with String.Format too:
    Opener.Label2.Text = String.Format("{0:###,###}: Words checked in.", i)
    I tend to use string interpolation as a first choice these days but there are times...
  18. Replies
    3
    Views
    237

    Re: Stuck in a loop.

    There's a Break button in VS that allows you to break any time in the same way a break point would so just wait for the hang and click that button.
  19. Replies
    12
    Views
    417

    Re: Partial function in VB6?

    I think that you made the same misinterpretation that I did initially. This is nothing to do with partial classes and partial methods. This is a functional programming concept.
  20. Replies
    12
    Views
    417

    Re: Partial function in VB6?

    You had me very confused at first as I was thinking "partial methods" and thought that this had nothing to do with that. It does indeed have nothing to do with that, because you're talking about...
  21. VS 2015 Re: My record is not saving on ms sql table

    There's no "refreshing" required. You already have the data - you just added it - so why would you need to get it from the database again?

    If you have a typed DataSet then use it. No...
  22. VS 2019 Re: TabControl add controls from text file

    Let's think about the logic first and then write code to implement that logic, rather than writing code with no real idea what it's supposed to do.

    You have a file that contains multiple lines and...
  23. Replies
    1
    Views
    154

    VS 2019 Re: Simplify or filter data

    You would use multiple DataViews for this. Every DataTable has a DefaultView and that is where the data comes from when you bind the DataTable itself. If you want multiple views of the same data...
  24. VS 2019 Re: TabControl add controls from text file

    What have you done and where are you stuck? Surely you can get a list of files from a folder, but I don't see any evidence of that. Can you read the contents of a file? You've asked multiple...
  25. Replies
    10
    Views
    469

    Re: Where are my dots ?

    If you were going to do that then it would make more sense to take out everything that wasn't specifically for the number. In fact, I wouldn't call ToString on the number there in the first place. If...
  26. VS 2010 Re: X close button not closing the Form (hangs)

    For the record, you can import a class but, as for a namespace, the point is to use its members unqualified. If you import the System.Threading.Tasks.Task class then you would use its Run method...
  27. VS 2010 Re: X close button not closing the Form (hangs)

    Do you understand what an Imports statement actually does? It appears not and you're just throwing stuff at the wall. The point of an Imports statement is to allow you to use the members of what you...
  28. VS 2010 Re: X close button not closing the Form (hangs)

    Why are you importing a class and not the namespace the class is a member of? Also, are you targeting .NET Framework or .NET Core? If the former, are you targeting at least version 4.0, because...
  29. VS 2019 Re: Datagridview values create folder names

    Put some thought into it. This is your application, not ours. If you are going to use a loop to get the data from the grid into a list and then use another loop to get the data from the list to...
  30. VS 2019 Re: Datagridview values create folder names

    So are you able to populate the list with the data you want or not?
  31. VS 2019 Re: Datagridview values create folder names

    What's wrong with using a loop? Don't try to copy LINq code that you don't understand. Presumably you know the baqsics of writing a loop. Put some thought into the logic instead of expecting to find...
  32. VS 2019 Re: Datagridview values create folder names

    You're asking multiple unrelated questions here. Stick to one thing at a time. Getting data from a DataGridView is the same no matter what you want to do with it, so creating folders is irrelevant to...
  33. Replies
    5
    Views
    282

    VS 2022 Re: Searching Form for label text

    Your explanation is too vague. If you're looking for text then you're goinmg to be comparing Strings. Comparing a String is the same no matter where it comes from, so you can find out how to do that...
  34. Replies
    10
    Views
    401

    VS 2017 Re: Unable to run exe program

    What do those applications do at startup? What framework are they targeting?
  35. Replies
    10
    Views
    469

    Re: Where are my dots ?

    I just opened the documentation for the Int32.ToString method that you're using. A couple of links later, I was reading the information specifically relevant to this question.
    ...
  36. VS 2019 Re: Problem Writing to Multi-Line Textbox and Streamwriter at Same Time

    OptionBase1 is correct. You could call AppendText on the TextBox but there would be little point because you wouldn't see the result until the end anyway, and it would slow things down. Using the...
  37. VS 2019 Re: Problem Writing to Multi-Line Textbox and Streamwriter at Same Time

    That's because you keep setting the Text property over and over, thus replacing the existing value. You should be calling the AppendText method.
  38. Replies
    6
    Views
    280

    Re: there is no row at position error

    Also, I'm not sure if maybe you have changed the code to simplify things for this thread but, if it's what you're actually using, this part is ridiculous:

    Select Case True
    Case LoadForm =...
  39. Replies
    6
    Views
    280

    Re: there is no row at position error

    I repeat:

    At a quick glance, I don't see anywhere in the code you actually posted that that exception could be thrown. We shouldn't have to spend our time trying to work out stuff that you already...
  40. Replies
    6
    Views
    280

    Re: there is no row at position error

    Perhaps you could actually tell us where in this extensive code the exception is thrown. Regardless, if you want to perform an action only if a condition is true then you use an If statement for that.
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width