Search:

Type: Posts; User: .paul.

Page 1 of 13 1 2 3 4

Search: Search took 0.15 seconds.

  1. Replies
    5
    Views
    178

    Re: Getting a list of random numbers.

    place() is an Array. You’re trying to assign a List

    place = Enumerable.Range(1, siz(i)).OrderBy(Function(n) rng.NextDouble()).ToArray()
  2. Replies
    10
    Views
    557

    VS 2019 Re: Listview slowness

    This is a VB forum. That’s not helpful…
  3. VS 2005 Re: [RESOLVED] Passing Either A ComboBox Or A ListBox As A Parameter

    Why revive a 13 year old RESOLVED thread? Try answering the new questions in the forum
  4. Re: Object reference not set to an instance of an object.

    You’re ignoring an important point…



    You chose to ignore that and continue with your unhelpful code formatting. Just because you can write your code like that, you’re not helping yourself there
  5. Re: "Cannot access a disposed object" When Closing Form

    They’re in the wrong order…


    SerialPort2.Dispose ‘ SerialPort2 no longer exists
    SerialPort2.Close ‘ Cannot access a disposed object

    Try…


    SerialPort2.Close
  6. Re: "Cannot access a disposed object" When Closing Form

    You don’t need to handle MainForm_Closed if that is all of the code you have there…


    Private Sub MainForm_Closed(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles...
  7. VS 2019 Re: Export to Excel from TabControl Tabs

    You’ll have problems accessing controls on inactive tab pages. They need to be selected.
    To refer to a TextBox (at index 0) in your SelectedTabPage, cast Controls(0) as a TextBox
  8. VS 2019 Re: TabControl add controls from text file

    Select Case aString
    Case “DataGridView”
    Dim dgv As New DataGridView
    ‘ set properties
    tab.Controls.Add(dgv)
    Case “TextBox”
    Dim tb As New TextBox
    ...
  9. VS 2019 Re: TabControl add controls from text file

    You first… Example of your text file.
  10. VS 2019 Re: TabControl add controls from text file

    You just need to loop through your strings, then use a select case statement to identify the type of Control to add. I see now what you did with the tabpage, but that won’t work with the controls...
  11. VS 2019 Re: TabControl add controls from text file

    You can’t reference a Control by a String. At least, not that way.
    If you’re interested, Google - Reflection
  12. VS 2019 Re: TabControl add controls from text file

    The Form has a Controls collection, as does a TabPage, a Panel, and a GroupBox. The method for adding dynamic Controls to these containers is the same…


    [container].Controls.Add([dynamic Control])
  13. Replies
    5
    Views
    308

    VS 2022 Re: Searching Form for label text

    Private Sub this_can_have_any_name(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LabelNameChanged.TextChanged

    The part in red is what hooks up the handler. The name of the...
  14. Replies
    5
    Views
    308

    VS 2022 Re: Searching Form for label text

    If you have just one form you want to search, which contains no panels or group boxes…


    For Each lbl As Label in Me.Controls.OfType(Of Label)
    If lbl.Text = “what you’re searching for” Then
    ...
  15. Replies
    6
    Views
    348

    Re: there is no row at position error

    When you click your Add Record, where does it Add? A new row in a dgv? Or something else?
    The easiest way I can see is to set your LoadForm variable (which JM told you to rename) to true until...
  16. Replies
    10
    Views
    557

    VS 2019 Re: Listview slowness

    If that’s not useful, you haven’t posted your relevant code. There may be some way to refresh after a set time…
  17. Replies
    10
    Views
    557

    VS 2019 Re: Listview slowness

    Why leave it open for a couple of hours? You could use a timer and the idle time to shut it down
  18. Re: How to invoke the MouseMove event after clicking on a button

    CheckBoxes with Button Appearance do have on/off visual style. When checked, the Button appears pressed, and when unchecked it has a default appearance. Try it and see…
  19. Re: How to invoke the MouseMove event after clicking on a button

    The CheckBox (with a Button Appearance) is better suited than a regular Button in this situation…
  20. Replies
    7
    Views
    453

    VS 2008 Re: Problem in number

    The whole point of the question, as far as I could see, was that Double wasn’t providing the accuracy and precision that Decimal offers…
  21. Replies
    7
    Views
    453

    VS 2008 Re: Problem in number

    Use Decimal instead of Double…
  22. Replies
    5
    Views
    315

    VS 2022 Re: Using Navigation Buttons for PictureBox

    You can get Resources by a variable String name, but not the way you were trying...


    Private Sub PictureButtonPrevious_Click(sender As Object, e As EventArgs) Handles PictureButtonPrevious.Click...
  23. Replies
    5
    Views
    257

    Re: Trouble adding Icon to DataGridView Column

    You weren’t trying to just add an icon, it was an instance of a structure
  24. Replies
    5
    Views
    257

    Re: Trouble adding Icon to DataGridView Column

    Instead of…


    DataGridView1.Rows.Add(fd)

    Try…


    DataGridView1.Rows.Add(img, info.Name, info.LastWriteTime, “”, info.DirectoryName)
  25. Replies
    9
    Views
    591

    Re: Select DataGridView row after update

    In what way is it not working?


    If MsgBox("Records Saved " & myselect, MsgBoxStyle.OkOnly, "Something") = MsgBoxResult.Ok Then
    For Each r As DataGridViewRow In DGV_demo.Rows
    If...
  26. Replies
    2
    Views
    374

    VS 2022 Re: Create complex form

    Asp.Net Form creation is similar to HTML/CSS. You can use 2 forms...
  27. Re: How to compare datagridview cell to a string

    Try this...


    If DataGridView1(3, 0).Value Is Not Nothing Then
    If DataGridView1(3, 0).Value.ToString.Equals("Amanda Belinda") Then
    MessageBox.Show("here")
    End If
    End If
  28. Re: Help making this listview sort demo work

    I ran the code. It checks every other item. The j loop is the sub items loop… Execution only reaches my highlighted comment if j = 1
  29. Re: Help making this listview sort demo work

    Good example, but...
  30. Re: [RESOLVED] Help making this listview sort demo work

    It’s worth learning why it didn’t work, even if the OP chooses to use a DGV in the end.
  31. Re: [RESOLVED] Help making this listview sort demo work

    That's the instructions...
  32. Re: Help making this listview sort demo work

    Looking at the code, a few things I noticed and the IIF that jmcilhinney pointed out, it appears to be a very old example. But most .Net code will run in later versions which is why there were only a...
  33. Re: Help making this listview sort demo work

    Bear in mind, a DGV is editable by the user, columns can be reordered, text changed etc. There are a lot of properties you can set to change the appearance and behaviour of the control
  34. Re: Help making this listview sort demo work

    It has to be set to details,AND add four columns
  35. Re: Help making this listview sort demo work

    Do you have your ListView View property set to Details? Did you add 4 Columns in the designer?
  36. Re: Help making this listview sort demo work

    I noticed that after posting my amended version of PickyBiker's code. That wasn't the point i was trying to make...


    lvw.Sort
    lvw.ListViewItemSorter = Nothing
  37. Re: Help making this listview sort demo work

    Select Case e.Column
    Case 0 : lvw.ListViewItemSorter = New NumericSorter
    Case 1 : lvw.ListViewItemSorter = New SumSorter
    Case 2 : lvw.ListViewItemSorter = New NameSorter(2, 3)
    ...
  38. Re: help in converting an example from c# to vb

    Change...


    Host.ControlLoaded += OnControlLoaded

    To...


    AddHandler Host.ControlLoaded, AddressOf OnControlLoaded
  39. Replies
    9
    Views
    591

    Re: Select DataGridView row after update

    Private Sub resetButtons(ByVal enabled() as Boolean, ByVal visible() As Boolean)
    btnAdd.Enabled = enabled(0)
    btnAdd.Visible = visible(0)
    btnSave.Enabled = enabled(1)
    ...
  40. Replies
    9
    Views
    591

    Re: Select DataGridView row after update

    You're right and it is very extreme. This is a little dodgy too...

    Form_sample_Load(e, e)

    I think ivansmo should rethink the execution there...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width