Search Results - VBForums

Search:

Type: Posts; User: 4x2y

Page 1 of 13 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    4
    Views
    90

    Re: Rewriting Reporting module - need advice

    Professional or not, you must do it using IF or other check statement.
  2. Replies
    4
    Views
    90

    Re: Rewriting Reporting module - need advice

    Add some IF statements, like this

    If CheckBox1.Checked = True Then
    Report.WriteLine("Nicotine - " + rNicMl.Text + "mL / " + rNicG.Text + "g (" + rNicDrops.Text + " drops)")
    ...
  3. Re: How to create form with border like the tray menu or volume control

    Set the following form's properties
    ControlBox = False
    MaximizeBox = False
    MinimizeBox = False
    Text = ""
  4. Re: Scanning files - Special folder paths

    Yes, agree, because Instr is not guarantee to return correct result e.g. it will always return True if special folder is part of root, that is if special folder is "C:\Windows", all subfolders under...
  5. Re: Scanning files - Special folder paths

    It is better to cache all system folders in an array on project startup then to check if a path is system folder or not just loop that array


    Private mstrSpecialFolderList(27) As String

    Public...
  6. Re: How to create a ContextMenu when the mouse button is pressed

    Creating context menu with two items when right click the form

    private void Form1_MouseClick(object sender, MouseEventArgs e)
    {
    if (e.Button ==...
  7. Re: Scanning files - Special folder paths

    It could be a character case problem, try this

    If InStr(1, sRoot, SpecialFolderPath(CSIDL_COOKIES), vbTextCompare) > 0 Then IsSpecialFolder = True
  8. VS 2010 Re: prevent user from closing via taskbar icon

    You can create your form class with that code and use it instead of standard form


    Option Strict On
    Option Explicit On

    Public Class MyForm
    Inherits System.Windows.Forms.Form

    ...
  9. VS 2010 Re: prevent user from closing via taskbar icon

    This should work

    Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
    If MessageBox.Show("Are you sure?", "", MessageBoxButtons.YesNo,...
  10. Replies
    15
    Views
    326

    Re: Check Listbox - Move Cursor to Selected Item

    I didn't see your reply #13 before posting.

    Mark this thread Resolved
  11. Replies
    15
    Views
    326

    Re: Check Listbox - Move Cursor to Selected Item

    How the param of DBRecord_ShowSelected declared? ByRef or ByVal?
    Note if ByRef or ByVal is not exist, it is ByRef by default!
  12. Replies
    15
    Views
    326

    Re: Check Listbox - Move Cursor to Selected Item

    You didn't answer my question is objLB multiselect?
    When the ListBox is multiselect, setting the ListIndex property don't heaghlight the item, so you have to use objLB.Selected(idx) = True
  13. Replies
    15
    Views
    326

    Re: Check Listbox - Move Cursor to Selected Item

    Is objLB MultiSelect? If yes, use objLB.Selected(idx) = True
  14. VS 2010 Re: Keyboard listener when outside of application....

    I have created a simple SystemWideHotkey class for my own use

    It is attached with a sample code
  15. Replies
    3
    Views
    187

    VS 2013 Re: vb.net - double quote in string

    Try this


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

    Dim sSource1 As String = "<input type=""hidden"" name=""fb_dtsg"" value=""123456""...
  16. Replies
    5
    Views
    254

    VS 2013 Re: Scanning and Deleting a Created Log - FIle

    Try this

    Option Strict On
    Option Explicit On

    Public Class CriticalValues
    Public Fan As Integer
    Public CPU_Temperature As Integer
    Public Graphics_Temperature As Integer
    ...
  17. Replies
    5
    Views
    254

    VS 2013 Re: Scanning and Deleting a Created Log - FIle

    Extract the value from the line and compare with your value, I cannot give you a code because It is depending on the format of the line that contains the critical value.
  18. Replies
    5
    Views
    254

    VS 2013 Re: Scanning and Deleting a Created Log - FIle

    Try this code

    Private Sub DeleteLogs()
    Dim sFiles() As String = IO.Directory.GetFiles("path\of\log\files", "*.log", IO.SearchOption.TopDirectoryOnly)

    For Each sFile In...
  19. Thread: change characters

    by 4x2y
    Replies
    2
    Views
    192

    Re: change characters

    Use Replace function, e.g. raw = raw.Replace("<br>", vbNewLine)
  20. Re: Choosing a file and write the location of the file in a text file in VB6

    To work with ListView

    Private Sub cmdNext_Click()
    Dim i As Long
    Open App.Path & "\folders.txt" For Output As #1
    Open App.Path & "\files.txt" For Output As #2
    For i = 0 To...
  21. Re: Choosing a file and write the location of the file in a text file in VB6

    It is not working code, it is just illustrate what to do, try the following

    Private Sub cmdNext_Click()
    Dim i As Long

    Open App.Path & "\folders.txt" For Output As #1
    Open...
  22. Re: Loop all elementi in userform and enabled to false

    Oh... never do that, if you set the form.enabled=false, it will stuck on the screen and you cannot move or close by mouse
  23. Re: Loop all elementi in userform and enabled to false

    Private Sub Command1_Click()
    On Error Resume Next ' To skip error that may occur if a control hasn't Enabled property, e.g. Line
    For Each ctl In Me.Controls
    ctl.Enabled = False
    ...
  24. Re: Choosing a file and write the location of the file in a text file in VB6

    Yes i know, but it is ugly and needs to use DriveListBox with it to choose drive.
  25. Re: Choosing a file and write the location of the file in a text file in VB6

    Choosing folders is a bit different because there is no component for "Browse for Folder" dialog, see this...
  26. Replies
    2
    Views
    153

    Re: Visible command kills graphics?

    Add GroupBox1.Refresh() after GroupBox1.Visible = True

    Public Class Form2

    Dim g As Graphics

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
  27. VS 2013 Re: how can i make one string from different listview lines

    Dim s As String = String.Empty
    For j = 0 To ListView1.Items.Count - 1
    s &= ListView1.Items(j).Text & ListView2.Items(j).Text & ListView3.Items(j).Text
    Next...
  28. Replies
    21
    Views
    467

    Re: Error 5 on Something so Simple

    It works, but if that code is part of math program, it should popup error message, try to calculate using Windows calculator, it will say Invalid input
  29. Replies
    21
    Views
    467

    Re: Error 5 on Something so Simple

    According to ^ operator documentation A can be negative only if Abby is an integer value.
  30. VS 2013 Re: how can i make one string from different listview lines

    Dim s as String
    s = ListView1.Items(0).Text & ListView2.Items(0).Text & ListView3.Items(0).Text

    Replace 0 with item index you want to join
  31. Replies
    2
    Views
    156

    VS 2010 Re: Mouseposition of a program

    There are two functions can help you ScreenToClient and ClientToScreen
  32. VS 2013 Re: Is it possible to use IndexOf List(of Structure)?

    Use Is or IsNot keywords

    If item IsNot Nothing Then
    'Use item here.
    End If
  33. VS 2013 Re: Is it possible to use IndexOf List(of Structure)?

    Search Items like this

    myindex = -1
    For j = 0 To Items.Count - 1
    If Items(j).Name = "Target Name" Then
    myindex = j
    Exit For
    ...
  34. Replies
    9
    Views
    352

    Re: Browse through PDF pages

    For me, I'm using the free edition of Foxit, it is the best PDF reader IMHO
  35. Replies
    9
    Views
    352

    Re: Browse through PDF pages

    I don't think this is possible!
    If you want to know the total pages count see this
  36. Replies
    9
    Views
    352

    Re: Browse through PDF pages

    Private Sub Command1_Click()
    ' change Acrbat exe to meet your installation
    Shell """C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"" /A page=""188"" ""path\of\pdf\file""",...
  37. Replies
    16
    Views
    392

    Re: Generate numbers in a Textbox

    Don't use timer, just the following only


    Private Sub Command1_Click() List1.AddItem Val(Text1.Text) + List1.ListCount
    End Sub
  38. Replies
    16
    Views
    392

    Re: Generate numbers in a Textbox

    This is because the list of is empty and there is no item selected

    Why you need all these lists?


    Private Sub Command1_Click()
    Dim s As String
    For j = 156 To 256
    s =...
  39. Replies
    16
    Views
    392

    Re: Generate numbers in a Textbox

    Isn't the following is enough

    Private Sub Command1_Click()
    List1.List(List1.ListIndex) = List1.List(List1.ListIndex) + 1
    End Sub
  40. Replies
    24
    Views
    513

    Re: Removing text from several files

    This could happen if lines in "common lines.txt" are not identical like lines in "ASUS-LT-02_test.csv" e.g. different characters case

    replace RemoveLine with this new one

    Private Sub...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width