Search:

Type: Posts; User: .paul.

Page 1 of 13 1 2 3 4

Search: Search took 0.11 seconds.

  1. Replies
    4
    Views
    181

    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
  2. Replies
    13
    Views
    227

    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
    ...
  3. Replies
    13
    Views
    227

    VS 2019 Re: TabControl add controls from text file

    You first… Example of your text file.
  4. Replies
    13
    Views
    227

    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...
  5. Replies
    13
    Views
    227

    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
  6. Replies
    13
    Views
    227

    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])
  7. Replies
    5
    Views
    210

    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...
  8. Replies
    5
    Views
    210

    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
    ...
  9. Replies
    5
    Views
    180

    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...
  10. Replies
    6
    Views
    229

    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…
  11. Replies
    6
    Views
    229

    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
  12. 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…
  13. 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…
  14. Replies
    7
    Views
    377

    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…
  15. Replies
    7
    Views
    377

    VS 2008 Re: Problem in number

    Use Decimal instead of Double…
  16. Replies
    5
    Views
    258

    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...
  17. Replies
    5
    Views
    212

    Re: Trouble adding Icon to DataGridView Column

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

    Re: Trouble adding Icon to DataGridView Column

    Instead of…


    DataGridView1.Rows.Add(fd)

    Try…


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

    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...
  20. Replies
    2
    Views
    333

    VS 2022 Re: Create complex form

    Asp.Net Form creation is similar to HTML/CSS. You can use 2 forms...
  21. 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
  22. 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
  23. Re: Help making this listview sort demo work

    Good example, but...
  24. 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.
  25. Re: [RESOLVED] Help making this listview sort demo work

    That's the instructions...
  26. 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...
  27. 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
  28. Re: Help making this listview sort demo work

    It has to be set to details,AND add four columns
  29. 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?
  30. 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
  31. 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)
    ...
  32. Re: help in converting an example from c# to vb

    Change...


    Host.ControlLoaded += OnControlLoaded

    To...


    AddHandler Host.ControlLoaded, AddressOf OnControlLoaded
  33. Replies
    9
    Views
    543

    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)
    ...
  34. Replies
    9
    Views
    543

    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...
  35. Replies
    9
    Views
    543

    Re: Select DataGridView row after update

    Which column should you compare to TXT_ID.Text?


    For Each r As DataGridViewRow In DGV_sample.Rows
    If r.Cells("ID").Value = TXT_ID.Text Then
    DGV_sample.CurrentRow = r
    Exit...
  36. Replies
    3
    Views
    305

    Re: Download File From URL

    Have a look at this...

    https://docs.microsoft.com/en-us/dotnet/api/system.net.webclient?view=net-6.0
  37. Replies
    3
    Views
    305

    Re: Download File From URL

    So you just want to download it as a file?
  38. Thread: Printing

    by .paul.
    Replies
    1
    Views
    285

    Re: Printing

    Have a look at my dgv printing articles in my signature
  39. VS 2010 Re: Resource not released until program closed

    This works, with the amendments jm suggested...
    Thanks for sharing your code :D


    Public Sub ConvertToIcon(ByVal iconImage As Bitmap, ByVal iconFileName As String, ByVal iconSize As Integer)
    ...
  40. Replies
    6
    Views
    409

    Re: VB .NET Datatable simple query

    If parmZipCode is numeric and strCounties is a String, try…

    expression2 = "Counties = ‘" & strCounties & “‘“

    Don’t forget character casing must match field names and search terms
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width