Results 1 to 9 of 9

Thread: How to show code.

  1. #1

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Cool How to show code.

    The first puppy fails.
    [vbcode]
    Private Sub Command1_Click()
    For index = 0 To Option1.Count - 1
    If Option1(index).Value = True Then
    Form2.Show
    End If
    Next
    End Sub
    [/vbcode]


    vbcode Code:
    1. Private Sub Command1_Click()
    2.     For index = 0 To Option1.Count - 1
    3.         If Option1(index).Value = True Then
    4.             Form2.Show
    5.         End If
    6.     Next
    7. End Sub


    Code:
    Private Sub Command1_Click()
        For index = 0 To Option1.Count - 1
            If Option1(index).Value = True Then
                Form2.Show
            End If
        Next
    End Sub

    PHP Code:
    Private Sub Command1_Click()
        For 
    index 0 To Option1.Count 1
            
    If Option1(index).Value True Then
                Form2
    .Show
            End 
    If
        
    Next
    End Sub 
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: How to show code.

    The correct tag is [highlight=vb]your code goes in here[/highlight]
    vb Code:
    1. Private Sub Command1_Click()
    2. For index = 0 To Option1.Count - 1
    3. If Option1(index).Value = True Then
    4. Form2.Show
    5. End If
    6. Next
    7. End Sub

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: How to show code.

    It changed from vbcode a long time ago.. it now supports multiple languages, eg:

    [HIGHLIGHT=vb] [/HIGHLIGHT]

    [HIGHLIGHT=vb.net] [/HIGHLIGHT]

    [HIGHLIGHT=sql] [/HIGHLIGHT]

    ...

  4. #4

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Re: How to show code.

    Quote Originally Posted by Hack View Post
    The correct tag is [highlight=vb]your code goes in here[/highlight]
    vb Code:
    1. Private Sub Command1_Click()
    2. For index = 0 To Option1.Count - 1
    3. If Option1(index).Value = True Then
    4. Form2.Show
    5. End If
    6. Next
    7. End Sub
    Gotcha!
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  5. #5

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Thumbs up Re: How to show code.

    Quote Originally Posted by si_the_geek View Post
    It changed from vbcode a long time ago.. it now supports multiple languages, eg:

    [HIGHLIGHT=vb] [/HIGHLIGHT]

    [HIGHLIGHT=vb.net] [/HIGHLIGHT]

    [HIGHLIGHT=sql] [/HIGHLIGHT]

    ...
    Cheers!
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  6. #6
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: How to show code.

    csharp Code:
    1. this is my code
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  7. #7

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Re: How to show code.

    Quote Originally Posted by dee-u View Post
    csharp Code:
    1. this is my code
    csharp Code:
    1. how to write code without opening a book?

    java Code:
    1. google.com
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  8. #8
    Member
    Join Date
    Nov 2009
    Posts
    55

    Re: How to show code.

    Me.Left=100

    Code:
    Me.Left=100
    Me.Left=100

    vb.net Code:
    1. Me.Left=100

  9. #9
    New Member
    Join Date
    Dec 2009
    Posts
    7

    Re: How to show code.

    Vb Code:
    1. Private Sub Done(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserDocumentCompletedEventArgs)
    2.         TabControl1.SelectedTab.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).DocumentTitle
    3.         ComboBox1.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Url.ToString
    4.     End Sub

    vb.net Code:
    1. Private Sub Done(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserDocumentCompletedEventArgs)
    2.         TabControl1.SelectedTab.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).DocumentTitle
    3.         ComboBox1.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Url.ToString
    4.     End Sub

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width