Search:

Type: Posts; User: .paul.

Page 1 of 13 1 2 3 4

Search: Search took 0.38 seconds.

  1. Replies
    3
    Views
    112

    Re: adding odd numbers

    Dim sum as Integer = Enumerable.Range(10, 20 - 10).Sum(Function(x) If(x Mod 2 = 1, x, 0))
  2. Replies
    3
    Views
    112

    Re: adding odd numbers

    Dim sum as Integer = 0
    For x as Integer = 10 to 20
    If x mod 2 = 1 then
    Sum += x
    End If
    Next
  3. Replies
    7
    Views
    248

    Re: combobox value instead of text.

    Only way to use private variables for that is by putting the code in the form containing the comboboxes
  4. VS 2019 Re: [RESOLVED] SQLite query with combobox selected item

    :thumb:
  5. VS 2019 Re: [RESOLVED] SQLite query with combobox selected item

    TG’s avatar looks like a German Shepherd, or a Huskie
  6. VS 2019 Re: SQLite query with combobox selected item

    Try this...


    opdragKopersWatBotteleer.CommandText = " Update Verkope " &
    "set Gebottel = ( '" & BottelComboBox.Text & "' " &
    ...
  7. VS 2017 Re: Change a sql query to a datagridview filter to search between dates

    Can you show us the xml (or a good example of the structure)? It's possible to read and write data between xml and a datatable. Also, which version of VB are you using? jmcilhinney's example won't...
  8. VS 2013 Re: Modification de compression d'un JPEG affiché en PictureBox

    You could just get the image, then save it as .png. Best all round solution. Smaller file size and good quality...
  9. VS 2013 Re: Modification de compression d'un JPEG affiché en PictureBox

    Parlez vous Anglais?
    This is an English speaking forum. It’ll impede your progress if you can’t ask in English...
  10. Replies
    13
    Views
    495

    Re: Need a little help with vb2017...

    You’re ignoring argument 0.
    Math.Floor(elapsed.TotalHours), Is unused. You’re just using arguments 1 and 2
  11. Re: .NET Find Most Recently Modified File incl. Recursively/Subfolder Support

    Ok i rewrote it. Code takes about 8 minutes to search my 2TB C:\ drive...



    Public Class Form1

    Dim newestDate As Date = CDate("January 1, 0001")
    Dim newest As String
    Dim t As...
  12. Re: .NET Find Most Recently Modified File incl. Recursively/Subfolder Support

    I’ve been re writing my example. In my case, with a 2TB C:\ drive, searching takes a long time. I can look at writing the rows to a 2D array to later load into the dgv. That would make the searching...
  13. Re: .NET Find Most Recently Modified File incl. Recursively/Subfolder Support

    Ok. You need manual recursion through the folders in that case...



    Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
  14. Re: .NET Find Most Recently Modified File incl. Recursively/Subfolder Support

    Catch ex As UnauthorizedAccessException

    Have a look at the Properties for the UnauthorizedAccessException Class
  15. Re: .NET Find Most Recently Modified File incl. Recursively/Subfolder Support

    use this...


    Dim files() as String = IO.Directory.GetFiles("C:\", "MyFileTest.txt", SearchOption.AllDirectories)
  16. Re: .NET Find Most Recently Modified File incl. Recursively/Subfolder Support

    To find the files, and the newest last write time...


    Dim files() as String = IO.Directory.EnumerateFiles("C:\", "MyFileTest.txt", SearchOption.AllDirectories)
    files = files.OrderBy(function(f)...
  17. VS 2019 Re: Return statement not returning correct value

    Try this...


    If Num1 Mod Num2 = 0 Then
    Debug.Print(Num2)
    Return Num2
    Else
    Return GCD(Num2, Num1 Mod Num2)
    End If
  18. VS 2019 Re: Return statement not returning correct value

    Integers are whole numbers. Are you sure it's not a rounding issue?
  19. Re: Check if a file exist in directory/subfolders and show its Explorer windows folde

    I should’ve spotted it sooner. I was distracted by all of the API functions you’re using :D
  20. Re: Check if a file exist in directory/subfolders and show its Explorer windows folde

    I’m not suggesting you don’t use a LinkLabel :D
  21. Re: Check if a file exist in directory/subfolders and show its Explorer windows folde

    Looking at it again, it seems you need to declare filePath at form scope, and change this...


    NativeMethods.OpenFolderAndSelectFile((IO.Path.Combine(My.Settings.Cartellasalvataggio, titolo &...
  22. Re: Check if a file exist in directory/subfolders and show its Explorer windows folde

    I haven’t used a LinkLabel for years, so I can’t advise on that, but my code found a file several directories deeper and opened explorer with the correct file selected on the first click...
  23. Re: Check if a file exist in directory/subfolders and show its Explorer windows folde

    I tried this... It works



    Imports System.IO

    Public Class Form1

    Dim titolo As String = "3D pie test"
    Dim ext As String = ".suo"
  24. VS 2017 Re: [HELP CODING] screenshot from a specific program

    Try this for the startup watcher...


    Dim watcher As ManagementEventWatcher

    Public Sub Main()
    Dim monitoredProcess = "Notepad.exe"
    Dim query As WqlEventQuery = New...
  25. Replies
    1
    Views
    183

    VS 2017 Re: Make The Web Browser Editable

    Read this... Post #15 onwards are useful

    https://www.vbforums.com/showthread.php?353415-RESOLVED-Webbrowser-Control-Make-it-Editable
  26. VS 2017 Re: [HELP CODING] screenshot from a specific program

    To bring your app to the front...


    AppActivate("Your TitleBar text")

    To get the bounds, read this...
    ...
  27. VS 2017 Re: [HELP CODING] screenshot from a specific program

    To detect app startup, use System.Management
  28. VS 2017 Re: [HELP CODING] screenshot from a specific program

    There’s several things you forgot there... your app. Must bring the exe to the top of the zorder
    You need to get the exe bounds rectangle...
    You’ll need a method for monitoring exe startup (I’ll...
  29. Re: Tooltip show on the drop down menu in the combobox

    https://www.vbforums.com/showthread.php?754693-How-do-I-show-a-tip-for-each-Combobox-list-items&p=4618343&viewfull=1#post4618343ll

    There’s a better version here...
    ...
  30. Re: Tooltip show on the drop down menu in the combobox

    The way to do it, is to create a class that inherits from NativeWindow... I’ll find the example...
  31. Thread: VB Help Needed

    by .paul.
    Replies
    3
    Views
    199

    VS 2017 Re: VB Help Needed

    To remove Pasting...


    Public Class numericTextbox

    Inherits TextBox

    Const WM_PASTE As Integer = &H302

    Protected Overrides Sub OnKeyPress(ByVal e As...
  32. Re: Grouping / add empy row following end of a "group" on data grid

    Change the ‘for i’ block for a do while block, as inserting rows in the loop will ruin the loop counting...


    Dim j As Object = -1
    Dim i as Integer = 1
    ...
  33. Re: Grouping / add empy row following end of a "group" on data grid

    Dim j As Object = -1

    DataGridView1.Rows(0).DefaultCellStyle.BackColor = Color.WhiteSmoke

    For i = 1 To DataGridView1.RowCount - 1
    If DataGridView1.Rows(i).Cells(1).Value <> j Then
    ...
  34. Re: Grouping / add empy row following end of a "group" on data grid

    Dim j As Object = -1

    For i = 1 To DataGridView1.RowCount - 1
    If DataGridView1.Rows(i).Cells(1).Value <> j Then
    j = DataGridView1.Rows(i).Cells(1).Value
    ...
  35. Re: Grouping / add empy row following end of a "group" on data grid

    DataGridView1.Rows(i).DefaultCellStyle.BackColor = Color.WhiteSmoke
    DataGridView1.Rows(i+1).DefaultCellStyle.BackColor = Color.Black
  36. Re: "Panel" object stops scrolling too soon at low-rez.

    In your panel, put an empty label positioned lower in your panel. The label won’t be visible, but it’ll increase your scroll range...
  37. Re: Find location of points after ResetTransform

    I put the dots there in paint, but the points they represent are all in relation to the variable lines...
  38. VS 2017 Re: Add Video, Textboxes and Button To Web Browser?

    It doesn’t have to navigate to an online webpage. You can create your own local page with html and css on your pc...
  39. Re: Find location of points after ResetTransform

    Thanks Boops. That seems to work better than any of my previous attempts...
  40. Re: Find location of points after ResetTransform

    I’m fairly sure you’re right about that part of it, but I still need those points, and I’m not experienced with matrix’s and I’ve been unable to rotate those points to the correct location after...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width