Search:

Type: Posts; User: .paul.

Page 1 of 13 1 2 3 4

Search: Search took 0.63 seconds.

  1. VS 2019 Re: Calling a *.exe program from a different directory than the calling program

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnSortHandicaps.Click
    Process.Start(IO.Path.Combine(Application.ExecutablePath, SaveAsCommaDelimited.exe))
    End Sub
  2. Re: How to pass enum type to a function

    This works...



    Private Enum testEnum
    red = 0
    green = 1
    blue = 2
    End Enum
  3. Re: How to modify default control property values, or put custom controls in toolbox

    In my previous example, include this to change the text of all newButton controls added to your project…


    Public Sub New()
    MyBase.Text = “Whatever”
    End Sub
  4. Re: How to modify default control property values, or put custom controls in toolbox

    Public Class newButton
    Inherits Button

    Public Property yourCustomProperty As String

    End Class

    Add the class to your project, rebuild your project, then in your designer, you’ll find...
  5. Re: How to open PDF in Reader rather than download file

    You could continue with that code, then immediately after that…


    Process.Start(“c:/12345.pdf”)
  6. Re: datagrid, arraylist System.IndexOutOfRangeException error

    Indices are zero to count - 1. Any number outside that range gives an IndexOutOfRangeException
  7. Re: [RESOLVED] [vb.net 2021] [core 6.0] comparing images

    For each pb As PictureBox in FlowLayoutPanel1.Controls.OfType(Of PictureBox)???

    Or…

    For each b As Button in FlowLayoutPanel1.Controls.OfType(Of Button)???
  8. Re: [RESOLVED] [vb.net 2021] [core 6.0] comparing images

    FlowLayoutPanel1.Controls.OfType(Of Any_Control_You_Choose)???
  9. Re: [vb.net 2021] [core 6.0] comparing images

    It would work if you used OfType in your controls loop as i showed you. You really should turn Option Strict on. That would prevent fowl language :D
  10. Re: Use Class for remembering the length of data

    Public Class LayoutClass

    Public Property NameLength As Short = what???
    Public Property CountryLength As Short = what???

    Public Function PersonNameLength(PersonLength As Short) As...
  11. VS 2019 Re: How to handle multiple Rectangle Annotations in same Chart

    I had a quick search on Google. It appears to be possible to switch which annotation to handle
  12. VS 2019 Re: How to handle multiple Rectangle Annotations in same Chart

    I don’t think that’s going to work. One chart is one chart. ChartAreas within one chart can be multiple…
  13. VS 2019 Re: How to handle multiple Rectangle Annotations in same Chart

    Why this...


    CHART_Annotations(CHART_Annotations.Count - 1).Annotations.Add(VA)

    instead of...


    ctl.Annotations.Add(VA)
  14. VS 2019 Re: How to handle multiple Rectangle Annotations in same Chart

    Seems I was wrong with my previous suggestion. Here's an improvement for you, but not a solution...


    For Each ctl As Control In SplitContainer3.Panel2.Controls
    If TypeOf ctl Is Chart Then
    ...
  15. Re: [vb.net 2021] [core 6.0] comparing images

    There's not a VB.Net 2021 is there? I got 2022 Preview, but no 2021 :D

    Here's a couple of code improvements for you...


    For Each B As Button In FlowLayoutPanel1.Controls.OfType(Of Button)
    ...
  16. VS 2019 Re: How to handle multiple Rectangle Annotations in same Chart

    Because...


    CHART_Annotations(CHART_Annotations.Count - 1).Annotations.Add(RA)

    Try this...


    Dim ca As Integer = 0
    For Each charArea As ChartArea In zz.ChartAreas
  17. VS 2019 Re: MouseOver Event doesn't work when object hidden

    The color object takes an overload of Alpha, Red, Green, Blue. The overload you’re using is just Red, Green, Blue
  18. VS 2019 Re: MouseOver Event doesn't work when object hidden

    Instead of using pictureboxes, use a panel with graphics. GDI+ makes it easy to draw rectangles, filled rectangles, etc. use the panel’ mouse move, mousedown etc. Just takes some simple arithmetic…
  19. VS 2017 Re: How would I complete this recursion algorithm?

    I wrote a recursive maze solver...

    http://www.scproject.biz/puzzleGames.php?appId=22

    The algorithm takes the endPoint and works one cell at a time checking all four possible directions, so it...
  20. Replies
    5
    Views
    289

    VS 2019 Re: Number of lines in a sequential file

    To read line by line...


    Dim counter As Integer = 0
    Using reader As StreamReader = New StreamReader("path")
    While Not reader.EndOfStream
    reader.ReadLine ' this reads the line, but...
  21. Replies
    5
    Views
    289

    VS 2019 Re: Number of lines in a sequential file

    IO.File.ReadAllLines("path").Length will return the number of lines in the file
  22. VS 2019 Re: Replacing 1st field of each line in a csv file

    It reads the file into a string array, each element contains one line of your csv
    For each line in that string array, it splits that line into another string array containing your fields
    The first...
  23. VS 2019 Re: Replacing 1st field of each line in a csv file

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim lines() As String = IO.File.ReadAllLines("C:\Users\Paul\Desktop\csv.txt")
    For...
  24. VS 2019 Re: Append response data to an object

    Looking at the Assets class, it doesn’t make sense to append. Every one of those classes has a distinct ID and values. A List(of Assets) is the best option
  25. VS 2019 Re: Append response data to an object

    Something like this, but everything really depends on the structure of asset…


    while (responseData.asset_events.Count() > 0)
    {
    offset += responseData.asset_events.Count();
    ...
  26. VS 2015 Re: Checks The Informations In Text File. VB.NET

    Try it this way...


    Dim strEmail As String = txtEmail.Text
    Dim Reg As New Regex("^\w+([-_.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$")
    If txtUserName.Text.Trim() = "" Or txtEmail.Text.Trim() = "" Or...
  27. Replies
    15
    Views
    773

    Re: Loading a listbox

    Here's what i meant. Works with any font...


    Imports System.Runtime.InteropServices

    Public Class Form1

    <DllImport("user32.dll")> _
    Private Shared Function SendMessage( _
    ByVal...
  28. Replies
    4
    Views
    298

    VS 2008 Re: WIA Scanning in VB 2008

    What is the count on ScannedImages when you’ve scanned three pages?
  29. Replies
    15
    Views
    773

    Re: Loading a listbox

    @jm it is possible to set tabstops in a listbox (with an API method), to give it the appearance of multiple columns
  30. Replies
    4
    Views
    292

    Re: get days range add

    The Date Class has .AddDays(), and .AddMonths(), so there’s no need to calculate the number of days in 2 months
  31. Re: DataBinding An ObservableCollection(Of string) to a Label

    There's no need for binding. In your code, the property only changes when you set the whole collection. An ObservableCollection(Of String) has its own events you can use...


    Public Class Form1
    ...
  32. Re: vb.net align imported coordinates to an image

    The form paint code will draw your image at 100% no stretching, no compressing.
    If your stored image isn’t 715px*672px, then if that is the size at which all of your coordinates were calculated,...
  33. Re: "modern" Taskbar replacement, without replacing the entire shell.

    This shows how to create a docking taskbar, but not how to use it as a replacement…

    https://www.vbforums.com/showthread.php?540356-vb2005-Scrolling-XML-ticker-tape
  34. Re: vb.net align imported coordinates to an image

    That is the correct overload. A bitmap, and a point

    E.graphics.DrawImage(New BitMap(“path”), New Point(-1,-1))
  35. Re: vb.net align imported coordinates to an image

    That code will draw the unstretched image full size, at the point (top-left) specified
  36. Re: vb.net align imported coordinates to an image

    Compared to what you have now, it probably wouldn't do anything, as i posted, but try this...


    Private Sub Form1_Paint(sender as Object, e as PaintEventArgs) Handles Me.Paint
    ...
  37. Re: vb.net align imported coordinates to an image

    https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.control.backgroundimagelayout?view=windowsdesktop-6.0

    Set your Form BackgroundImageLayout property to None
  38. Re: vb.net align imported coordinates to an image

    Also, stretching or compressing the image will never have any good results with exact coordinates
  39. Re: vb.net align imported coordinates to an image

    BTW. I’d make the form fixedsingle or fixeddialog.
  40. Re: vb.net align imported coordinates to an image

    You realise that size, ie height and width are the external dimensions of the form?
    Use (in form_load) Me.SetClientSizeCore(exact width in pixels, exact height in pixels)
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width