Search Results - VBForums

Search:

Type: Posts; User: 4x2y

Page 1 of 13 1 2 3 4

Search: Search took 0.06 seconds.

  1. Re: Adding items to a ListView with LVM_INSERTITEM: not working

    Why using API not lvSearch.ListItems.Add method?
  2. VS 2008 Re: combobox1.text is not = "YES" or "NO" or "Maybe"

    If ComboBox1.Text <> "YES" AndAlso ComboBox1.Text <> "NO" AndAlso ComboBox1.Text <> "MAYBE" Then
    MessageBox.Show("Exit Sub")
    End If
  3. Re: Multiple projects in IDE - Possible to see each other?

    Add a new project of type Class Library put your common classes/controls to this library, then you can use from any other project.

    a sample is here
  4. Replies
    2
    Views
    137

    VS 2012 Re: Keypress event

    Try this


    Private Sub TextBox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TextBox1.KeyPress
    Select Case e.KeyChar
    Case "Y"c, "y"c
    ...
  5. Replies
    8
    Views
    241

    VS 2010 Re: Adding 1 day - is this code safe?

    You can show the date with any format you need



    Dim sDay As String
    Dim sMonth As String
    Dim sYear As String
    Dim dDate As Date

    sDay = "28"
  6. Replies
    4
    Views
    223

    Re: KeyDown event help

    txtPassword must be focused to work, if you want to work even when txtPassword not focused, set the form's KeyPreview to true and put the code under Form1_KeyDown event.



    private void...
  7. Replies
    3
    Views
    246

    Re: Calculating Word Value

    Replace


    numerology = numerology & indx


    with


    numerology = numerology + indx
  8. VS 2010 Re: Counting the # of a specific character in lines

    Use this function


    Private Function SlashCount(strURL As String) As Integer
    Dim c As Integer = 0

    For j As Integer = 0 To strURL.Length - 1
    If...
  9. Replies
    23
    Views
    909

    Re: VB Programming book

    Search Google books for free books like this one
  10. Re: Using an external file to open other files

    You already did most of these steps! opening, searching, founding, asking the user

    The simplest method is saving "gmes.chs" in INI file format, by this way you can delete any value using...
  11. Re: Using an external file to open other files

    Open the file for output and write only lines before and after the line you want to delete!
  12. Replies
    19
    Views
    620

    Re: Help with codes!

    @RhinoBull

    Sorry, didn't see your post before posting my answer!
  13. Replies
    19
    Views
    620

    Re: Help with codes!

    Two Notes:
    1- This line units = Label1.Caption.Value must stop the program with compile error.

    2- Rate will never be 1 because any value less than 150 is also less than 250, therefore Case Is <=...
  14. VS 2012 Re: [Help] Trying to make an 8 x 8 chessboard in a picture box

    Post #11
  15. VS 2012 Re: [Help] Trying to make an 8 x 8 chessboard in a picture box

    NO it will :)

    I wrote the code very quickly without deep tests, but as i said "make the picture height and width are multiple of 8, e.g. 640x640, 600x400, 120x120, etc..."

    Of course your code...
  16. VS 2012 Re: [Help] Trying to make an 8 x 8 chessboard in a picture box

    No, it is, but you need to make the picture height and width are multiple of 8, e.g. 640x640, 600x400, 120x120, etc...
  17. Re: Generating 10 unique random numbers from 1-50 in visual basic 2010

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

    Dim r As New List(Of Integer)
    Dim rg As New Random
    Dim rn As Integer

    Do
    ...
  18. VS 2012 Re: [Help] Trying to make an 8 x 8 chessboard in a picture box

    If the code added under ChessBox_Paint event, how to call it when pressing DrawChess button?
  19. VS 2012 Re: [Help] Trying to make an 8 x 8 chessboard in a picture box

    try this


    Private Sub DrawChess_Click(sender As System.Object, e As System.EventArgs) Handles DrawChess.Click
    Dim paper As Graphics
    paper = ChessBox.CreateGraphics()
    ...
  20. Replies
    7
    Views
    271

    Re: Exit a do loop

    Usually when i have loop that can iterate too much, i do DoEvents each 100 or 1000 according to how many iteration the loop will run.

    instead of


    Do
    DoEvents
    ' other code
    Loop Until...
  21. Replies
    7
    Views
    271

    Re: Exit a do loop

    You must ensure that DoEvents executed frequently
  22. Replies
    7
    Views
    271

    Re: Exit a do loop

    I think this part is buggy
    1-


    If mbSpeedTimer Then 'speed up win if user clicked form or images
    sndPlaySound ByVal 0, 0 'Stop the Sound
    Timer1.Enabled = False
    Exit Do...
  23. Replies
    10
    Views
    253

    Re: Lost Row And Col in IDE

    I think you have to reset VB6 IDE settings:

    1- Close VB6 if it is running.
    2- Run the Registry Editor.
    3- Go to HKEY_CURRENT_USER\Software\Microsoft\Visual Basic
    4- Backup that key from File>...
  24. Replies
    10
    Views
    253

    Re: Lost Row And Col in IDE

    You can access View> Toolbars by right click on the toolbar itself, so do and be sure Standard is checked
  25. Replies
    10
    Views
    253

    Re: Lost Row And Col in IDE

    AFAIK these info shown only in Standard toolbar not custom one, to check go to View menu> Toolbars, the Standard must be checked.
  26. Replies
    10
    Views
    253

    Re: Lost Row And Col in IDE

    Be sure you are opening code editor window not form designer because that space show coordinate info while form designer window is active.
  27. Replies
    10
    Views
    253

    Re: Lost Row And Col in IDE

    Don't reset the Toolbar but move some buttons to another custom toolbar until the Row and Col indicators appear.
  28. Re: auto tab and cmd click when pressing enter key

    Start with this code


    Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown
    If e.KeyCode < Keys.D0 OrElse e.KeyCode > Keys.D9 Then
    ...
  29. Thread: .length

    by 4x2y
    Replies
    1
    Views
    125

    Re: .length

    If Listbox1.Items.Count <= 5 Then
    ' Do something
    End If
  30. Thread: Help vb.net to c#

    by 4x2y
    Replies
    3
    Views
    402

    Re: Help vb.net to c#

    Try this VB to C# converter http://www.developerfusion.com/tools/convert/vb-to-csharp/
  31. Re: How to silence the ding noise when I hit "Enter" ?

    Private Sub ToolStripTextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles ToolStripTextBox1.KeyDown
    If e.KeyCode = Keys.Enter Then
    e.SuppressKeyPress = True
    ...
  32. VS 2010 Re: How to Allow a Certain MP3 File Counts in Listview + ListBox on Form Load?

    If this loop For Each Path As String In Files inside For Each mp3 As String In Files, it is normal to crash because you add 5000*5000=25,000,000 entries to the listbox!!!

    Try this simplifyed code...
  33. Replies
    10
    Views
    308

    VS 2008 Re: Inquiry: Code for Combinations

    12 ^ 4 = 20736 words
  34. Replies
    21
    Views
    563

    Re: How to toggle 1 and 2

    You can toggle values without IF or any calculations like this


    Dim Colors(1 To 2) As Integer
    Colors(1) = 2
    Colors(2) = 1

    CurrentColor = Colors(CurrentColor)
  35. Replies
    12
    Views
    338

    Re: What is the VB statement that does.......

    OMG, you mean the one that i never used On...GoTo, On...GoSub



    Private Sub Command1_Click()
    Dim i As Integer
    i = InputBox("", "", 1)
    On i GoSub Sub1, Sub2, Sub3, Sub4
    MsgBox...
  36. Replies
    12
    Views
    338

    Re: What is the VB statement that does.......

    You can also call sub/function in IIf


    Private Sub Command1_Click()
    Dim a As Integer
    Dim b As Integer
    Dim c As String

    a = 1
    b = 2
  37. Replies
    21
    Views
    563

    Re: How to toggle 1 and 2

    v = IIf(v = 1, 2, 1)
  38. VS 2012 Re: Does VS Express work like regular VS in regard to web development

    read this http://msdn.microsoft.com/en-us/library/ms349441(v=vs.110).aspx and this http://jk-point.blogspot.com/2012/04/visual-studio-express-edition-vs-visual.html
  39. Replies
    21
    Views
    563

    Re: How to toggle 1 and 2

    Private v As Integer

    Private Sub Command1_Click()
    v = (v + 1) Mod 2
    Me.Caption = v + 1
    End Sub
  40. Re: [RESOLVED] ZOrder 0 not doing what I think it should

    ZOrder 0 doesn't show the picture, it just bring to front

    the following code put the clicked picture above others (if they are overlapped).


    Private Sub picColor_Click(Index As Integer)
    ...
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.