Search:

Type: Posts; User: .paul.

Page 1 of 13 1 2 3 4

Search: Search took 0.09 seconds.

  1. VS 2022 Re: How do I add hyphens at different positions in textbox on input?

    That’s a MaskedTextBox BTW :thumb:
  2. VS 2022 Re: How do I add hyphens at different positions in textbox on input?

    Something like this should work...



    Private ignoreEdit As Boolean = False

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
  3. Replies
    17
    Views
    625

    Re: VB.NET 140 Textboxes Numbers Only

    Just because pasting is more controlled in my custom textbox...
  4. Replies
    17
    Views
    625

    Re: VB.NET 140 Textboxes Numbers Only

    @vbdotnut
    “4” is a String 😎
    What about control keys? The extended TextBox I posted allows only numeric input AND control keys AND restricts non-numeric pasting…
    @OP Easy to add to your project and...
  5. Re: BC30456 'Computer' is not a member of [Solution / Project name].My

    https://learn.microsoft.com/en-us/dotnet/visual-basic/developing-apps/programming/computer-resources/playing-sounds
  6. Replies
    17
    Views
    625

    Re: VB.NET 140 Textboxes Numbers Only

    Try this...

    https://www.vbforums.com/showthread.php?506748-numericTextbox
  7. Re: How to select the page number to print in print preview dialog box?

    You might see some formatting removed as i was restricted in the amount of characters i could post...
  8. Re: How to select the page number to print in print preview dialog box?

    I checked my link. Seems broken. This is the Form I changed...


    Imports System.Data.SqlClient
    Imports System.Drawing.Printing
    Imports Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6...
  9. Re: How to select the page number to print in print preview dialog box?

    On which line is the error? You need to learn how to debug your code. The error is saying that the page number is not a valid key in the dictionary(of integer, pagedetails). If the pagenumber is less...
  10. VS 2019 Re: Reading a Text File into Multiple RichTextBoxes

    As i said, they were immediate fixes, and i can't guarantee my snippet because your actual program is much more complicated than 5 RTB's and a 10 line array.
    Something along those lines but scaled...
  11. VS 2019 Re: Reading a Text File into Multiple RichTextBoxes

    Dim controlForLines = DirectCast(Controls.Find($"RichTextBox{x}", True)(0), RichTextBox)
  12. VS 2019 Re: Reading a Text File into Multiple RichTextBoxes

    I’m not guaranteeing it’ll work, but this’ll fix that error…


    Dim linesForControl = lines.Skip(x).Take(1).Concat(lines.Skip(x + lines.Length \ 2).Take(1)).ToArray

    Also…

    ...
  13. Re: How to select the page number to print in print preview dialog box?

    Try moving this part of the code (below) to the end of the sub…



    Dim ps As New PrintDialog
    ps.AllowSomePages = True
    If ps.ShowDialog = DialogResult.OK Then
    If...
  14. VS 2019 Re: Reading a Text File into Multiple RichTextBoxes

    My snippet needs modifying slightly, but the great thing about Skip and Take is that they don’t cause IndexOutOfRange exceptions

    Try this…


    Dim integers() As Integer = {1, 2, 3, 4, 5, 6, 7, 8,...
  15. VS 2019 Re: Reading a Text File into Multiple RichTextBoxes

    This is something similar to what i understood of your requirements...



    Dim integers() As Integer = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
    Dim arraysOfIntegers As New List(Of Integer())
    For x As...
  16. VS 2019 Re: Reading a Text File into Multiple RichTextBoxes

    In the Find, after the String, put either True or False if your RichTextBoxes are not in container controls

    For example of Skip and Take…

    One
    Two
    Three
    Four
    Five
  17. VS 2019 Re: Reading a Text File into Multiple RichTextBoxes

    That takes the lines sequentially, as they appear in the txt file, instead of the pattern the OP suggested...
  18. Re: How to select the page number to print in print preview dialog box?

    Can you post your _BeginPrint code? (The entire sub)
  19. Re: How to get a TimeZone, its UTC offset in TimeSpan format?

    You loaded TimeZoneInfos into your ComboBox, but the Items are always retrieved as Type Object. You need to cast as TimeZoneInfo so you can access the utc offset property… That’s why it worked…
  20. Thread: Saving of data

    by .paul.
    Replies
    7
    Views
    441

    VS 2022 Re: Saving of data

    Calling update for each table IS easy :D
  21. Replies
    1
    Views
    209

    Re: Help me to use WindowFromPoint properly.

    <DllImport("user32.dll", EntryPoint:="WindowFromPoint")>
    Friend Shared Function WindowFromPoint(ByVal cx As Integer, ByVal cy As Integer) As IntPtr
    End Function

    <DllImport("user32.dll",...
  22. Re: How to get a TimeZone, its UTC offset in TimeSpan format?

    Clock1.UtcOffset = DirectCast(ComboBox1.SelectedItem, TimeZoneInfo).BaseUtcOffset
  23. Thread: Saving of data

    by .paul.
    Replies
    7
    Views
    441

    VS 2022 Re: Saving of data

    If you’re only creating one DataTable, don’t use a DataSet. A DataSet is just a collection of DataTables. Just use a single DataTable.

    Here’s an update example…
    ...
  24. Re: How to select the page number to print in print preview dialog box?

    In _BeginPrint, the pages are calculated. If you omitted that part, there’s your problem
  25. Re: How to select the page number to print in print preview dialog box?

    Why are you using a Timer???
    The last lot of code I gave you should work for you with a few simple modifications.

    This is how the PrintDocument works…

    You call PrintDocument.Print
    The...
  26. Re: How to select the page number to print in print preview dialog box?

    Private Sub PrintDocument1_BeginPrint(ByVal sender As Object, ByVal e As PrintEventArgs) Handles PrintDocument1.BeginPrint
    Dim ps As New PrintDialog

    If ps.ShowDialog = DialogResult.OK...
  27. Replies
    8
    Views
    416

    VS 2022 Re: Clicking on a listbox item many times.

    It’s been so long since I installed VS2008 that I don’t remember if I did a complete installation or not.
    You’re probably right about it being long out of date, and it (F1 help) might work better...
  28. Replies
    8
    Views
    416

    VS 2022 Re: Clicking on a listbox item many times.

    VB used to have context sensitive help (via F1) when i first programmed in VB3. That was all on my HDD. I've never been impressed with the new F1 functionality, and never had as much need to use it...
  29. Re: How to select the page number to print in print preview dialog box?

    Try this... You need to be sure FromPage and ToPage are always set correctly starting at page 1 (or 2 or 3, not zero based)... etc...



    Private printedPageCount As Integer
    Private startPage...
  30. Replies
    8
    Views
    416

    VS 2022 Re: Clicking on a listbox item many times.

    As jmcilhinney suggested, i searched for the documentation, but found this tutorial...

    https://wpf-tutorial.com/list-controls/listbox-control/


    <ListBox Name="listitems" Width="300"...
  31. Re: How to select the page number to print in print preview dialog box?

    Now I know what you’re doing. That looks like my multi page dgv printer code that you’re trying to modify…


    startPage = e.PageSettings.PrinterSettings.FromPage
    endPage =...
  32. Re: How to select the page number to print in print preview dialog box?

    What are you trying to print? What controls?
  33. Replies
    12
    Views
    552

    VS 2019 Re: Remove certain string from textbox

    As far as I am aware, from memory, TextChanged is as it says… Raised whenever the text changes for any reason.


    This event is raised if the Text property is changed by either a programmatic...
  34. Replies
    12
    Views
    552

    VS 2019 Re: Remove certain string from textbox

    Replacing while typing will cause another textchange to be fired. It’s better to isolate it to avoid multiple fruitless calls to replace…
  35. Replies
    12
    Views
    552

    VS 2019 Re: Remove certain string from textbox

    If txtURL.Text.Contains("https://") Then
    txtURL.Text = txtURL.Text.Replace(“https://“, “”)
    End If

    If txtURL.Text.Contains(“http://") Then
    txtURL.Text = txtURL.Text.Replace(“http://“,...
  36. Re: Programming with Word object, Word losing focus

    Use AppActivate at the point Word loses focus
    There are 2 overloads… 1 takes the process id as the only argument, the other takes the title bar text as the only argument.
  37. Replies
    12
    Views
    552

    VS 2019 Re: Remove certain string from textbox

    Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox1.TextChanged
    ‘ put your replace code in this event handler
    End Sub
  38. Re: How to change properties of added control in table layout panel

    To set more than one property using jmcilhinney’s suggestion, separate each property and value with a comma…


    TableLayoutPanel1.Controls.Add(New Label With {.Text = i.ToString, .Tag =...
  39. Re: Private WithEvents declaration in a subroutine

    You declare the withevents variable at form level…


    Private WithEvents TCPclient As MessageClient

    Then in your subroutine…


    TCPclient = New MessageClient(host, port)
  40. Re: Unhide selected datagridrows based upon condition

    Si_the_geek’s ElseIf suggestion from post #7 was a better solution, but this is what I was suggesting…



    If DGV_Docs.CurrentCell.Value.ToString = "+" Then
    Dim parentID =...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width