Search Results - VBForums

Search:

Type: Posts; User: 4x2y

Page 1 of 13 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    2
    Views
    126

    VS 2013 Re: Changing string value with checkbox ?

    Private Function Encrypt(cipherText As String) As String
    Dim EncryptionKey As String
    If Textbox2.Enabled Then
    EncryptionKey = Textbox2.Text
    Else
    EncryptionKey =...
  2. Replies
    5
    Views
    153

    Re: Msgbox icon in the right?

    vbMsgBoxRtlReading is meant to use with RTL languages
  3. Replies
    5
    Views
    153

    Re: Msgbox icon in the right?

    It is possible like this

    dd = MsgBox("laplapla", vbYesNo + vbQuestion + vbMsgBoxRtlReading + vbMsgBoxRight)


    But this may not help you because the whole msgbox is mirrored not only the icon.
  4. Replies
    6
    Views
    244

    VS 2013 Re: something wrong with play song

    Pass song path to URL property

    Private Sub ListBox1_SelectedIndexChanged(ByVal Sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged

    Dim...
  5. Replies
    3
    Views
    163

    VS 2008 Re: Search array for value?

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim yo(10) As Whatever

    Dim i As Integer = -1

    For j = 0 To 10...
  6. VS 2010 Re: Messagebox when certain number is entered in number sequence in a textbox

    The simplest method

    If TextBox1.Text.Contains("10") Then
    MessageBox.Show("Found it")
    End If
  7. Replies
    9
    Views
    488

    Re: Find Data in Listview VB 6.0

    Try this

    Private Sub Text1_Change()
    Dim lvi As ListItem
    Set lvi = ListView1.FindItem(Text1.Text)

    If Not lvi Is Nothing Then
    lvi.Selected = True
    ...
  8. Re: resize window depending on display resolution

    You don't need to change font size when resizing, this can be done only once because Screen.PrimaryScreen.Bounds.Width doesn't changed frequently, therefore i suggest to move your code to the event...
  9. Re: resize window depending on display resolution

    Yes, I'm sure, just comment those lines to confirm.
  10. Re: resize window depending on display resolution

    Because of these lines

    If WindowState = FormWindowState.Maximized Then
    Me.MaximumSize = New Size(640, 400)
    Me.MinimumSize = New Size(640, 400)
    Lfont...
  11. Replies
    16
    Views
    394

    VS 2008 Re: Shorten Code

    They are optional but it is highly recommended to always turn them on, because they will save a lot of debugging time, specially "Explicit On"
  12. Replies
    16
    Views
    394

    VS 2008 Re: Shorten Code

    You can by creating a wrapper class, e.g.

    Option Strict On
    Option Explicit On

    Public Class cnsl

    Public Shared Sub wl(l As String)
    Console.WriteLine(l)
    End Sub
  13. VS 2013 Re: Toggling boolean value with keystroke

    ...

    Edit:
    F10 is used by Windows to activate the form's main menu, you cannot see the effect of first F10 hit because your form doesn't have menu.
  14. Thread: Format Expression

    by 4x2y
    Replies
    4
    Views
    769

    Re: Format Expression

    My implementation


    Private Function FormatExpression(ByVal expression As String) As String
    Dim r As String = ""
    Dim currentChar As String
    Dim op() As String = {"+",...
  15. Thread: Format Expression

    by 4x2y
    Replies
    4
    Views
    769

    Re: Format Expression

    Can you post some input/output examples to help understand how it's exactly work?

    BTW: this line cause syntax error: missing ')' and Then

    If Not {"+", "-"}.Contains(tempSource(index -...
  16. Replies
    15
    Views
    324

    VS 2010 Re: Removing an ASCII from an array

    Copy to another array


    Private Function GetNewArray(a() As Integer) As Integer()
    If a(0) = 6 Then
    Dim r(a.Length - 2) As Integer
    Array.ConstrainedCopy(a,...
  17. VS 2013 Re: Determine whether Hibernate is enabled or not

    No, it is not always there because Windows delete "hiberfil.sys" when hibernate disabled to free disk space.

    Anyway getting hibernate status from the registry is better.
  18. VS 2013 Re: Determine whether Hibernate is enabled or not

    Dirty code :)

    If File.Exists("hiberfil.sys") Then
    ' hibernate enabled
    Else
    ' hibernate disabled
    End If

    hiberfile.sys always on boot drive and cannot move elsewhere...
  19. Replies
    3
    Views
    228

    Re: Cancel System Mouse Click

    Run your Exe as admin
  20. Replies
    2
    Views
    237

    VS 2013 Re: Listview + IO.StreamReader

    First column is Subitem(0), so to skip it use For...Next instead of For Each



    For Each item As ListViewItem In Me.ListView1.Items
    line = ""
    For j = 1 To...
  21. Re: How to set a double value in the NumericUpDown

    Set NumericUpDown's property DecimalPlaces to value greater than 0
  22. Replies
    2
    Views
    244

    Re: Edit Automatic Date picker

    You cannot disable them, but you can prevent choosing Sun and Sat days

    The following code jump to Mon when choosing Sun or Sat

    Private Sub DTPicker1_Change()
    If Weekday(DTPicker1.Value,...
  23. Replies
    12
    Views
    394

    Re: Alternative to .wav files?

    I always run VB6.exe elevated, but i have to run it as admin when it requires to access the registry to register a component. (easier than using regsvr32.exe :))
  24. Replies
    12
    Views
    394

    Re: Alternative to .wav files?

    I frequently receive this error, to solve i run VB6.exe as admin so that it can access the registry.
  25. Replies
    12
    Views
    394

    Re: Alternative to .wav files?

    Use MMControl to play mp3
  26. Replies
    12
    Views
    394

    Re: Alternative to .wav files?

    As far as file size is matter, mp3 will be better.

    when converting .wav to .mp3 choose Bitrate 320 kbps for best acceptable result.

    See wav vs mp3
  27. Replies
    5
    Views
    282

    Re: I have a problem when re-sizing a form.

    Can you post your form or screen shoot of it?

    I have tested TPL (9 columns 50% each x 6 rows 50% each) when resize, all cells remains equal size.
  28. Replies
    43
    Views
    1,377

    Re: What are you listening right now?

    I'm listening to the song of comet 67p
  29. Re: Why does my app close after I click this button?

    Pyth007 post time 10:28 PM
    4x2y post time 10:28 PM

    :D
  30. Re: Why does my app close after I click this button?

    just a note, your code starts with Me.Visible = False but there is no Me.Visible = True at the end.
  31. Replies
    1
    Views
    265

    VS 2013 Re: Filter and Removing strings from list box

    Replace For Each with reverse loop, because removing item inside For Each loop cause it fail.

    For Each item In ListBox2.Items
    If item.ToString.Contains("@") Or...
  32. Re: Creating rounded corners for a label control?

    Use the code in this article

    to adapt it for Label, add Inherits Windows.Forms.Label just below Public Class UserControl1
  33. VS 2010 Re: Text in two colors in the same item of one ListView

    You cannot if COMMAND & HIC are in the same column, but if they are in different column then try


    Dim lvi As ListViewItem

    lvi = ListView1.Items.Add(New ListViewItem({"COMMAND",...
  34. VS 2008 Re: new to visual basic problem with if condition

    Another implementation


    Option Strict On
    Option Explicit On

    Public Class Form1

    Private AR As New List(Of String)
    Private EN As New List(Of String)
  35. Re: Back to Basics-Resizing Shapes and Images

    Set Stretch property to True
  36. Re: Back to Basics-Resizing Shapes and Images

    I don't understand why you are concern about TabIndex when resizing?

    Try this simple code, it works with all controls except Line because it doesn't have Width, Height, Left and Top properties.
    ...
  37. Re: Form Caption is Centered on 8.1, yet left aligned on 7

    Windows 8 shows all app's titles centered, maybe changing theme can make a difference, i'm using Win 7 so i cannot test.
  38. Re: How do I highlight the next item in a ListView after removing the preceeding one?

    My code handle this situation and will never cause any error, try it without modification and see.
  39. Re: How do I highlight the next item in a ListView after removing the preceeding one?

    Try this



    Private Sub cmdDelete_Click()
    If lstBatch.ListItems.Count > 0 Then
    If vbYes = MsgBox("Are you sure you want to delete the selected item?", vbQuestion + vbYesNo, "") Then
    Dim...
  40. VS 2012 Re: Treeview Nodes' images not changing

    TreeNode class has two properties regarding image, ImageIndex and SelectedImageIndex, for each node you have to set them to image indexes you want to show when the node selected or not, the TreeView...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.