My First Program [SOURCE]

Discussion in 'Archives' started by LaRoCkO, Aug 8, 2008.

My First Program [SOURCE]
  1. Unread #1 - Aug 8, 2008 at 12:13 AM
  2. LaRoCkO
    Joined:
    Jul 2, 2008
    Posts:
    155
    Referrals:
    0
    Sythe Gold:
    0

    LaRoCkO Active Member
    Banned

    My First Program [SOURCE]

    Just a basic picture viewer I made in Visual Basic 2008
    Just started learning and it is amazing :)

    Here is source ( Uploaded source so you guys can see how it is done and learn)
    There is comments before each command.

    Code:
    Public Class ViewerForm
    
        Private Sub btnSelectPicture_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelectPicture.Click
            ' This command shows the open file dialog box.
            If ofdSelectPicture.ShowDialog = DialogResult.OK Then
                ' This command loads the picture into the picture box.
                picShowPicture.Image = Image.FromFile(ofdSelectPicture.FileName)
                ' Show the name of the file in the form's caption.
                Me.Text = "Picture Viewer(" & ofdSelectPicture.FileName & ")"
            End If
    
        End Sub
    
        Private Sub btnQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQuit.Click
            ' This will close the picture viewer
    
            Me.Close()
        End Sub
    End Class
    
     
  3. Unread #2 - Aug 8, 2008 at 4:29 AM
  4. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    My First Program [SOURCE]

    This should really be in the .Net section. Post there and I'm sure you'll get people who'll understand it a little better. :p
     
  5. Unread #3 - Aug 8, 2008 at 5:33 AM
  6. Swan
    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner

    Swan When They Cry...
    Retired Global Moderator

    My First Program [SOURCE]

    Indeed.

    It isn't terribly hard to understand though, regardless of what framework you use. The classes are named as such that it is obvious what is happening from just glancing.

    .Net is excellent, yes. I would recommend trying to move to C#, though. While the VB syntax is easy for starters, once you get to know the C syntax you generally won't want to go back.
     
  7. Unread #4 - Aug 8, 2008 at 5:33 AM
  8. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    My First Program [SOURCE]

    Just by looking at that code it seems they could also open any other type of file. You need some sort of filter.
     
  9. Unread #5 - Aug 8, 2008 at 12:13 PM
  10. LaRoCkO
    Joined:
    Jul 2, 2008
    Posts:
    155
    Referrals:
    0
    Sythe Gold:
    0

    LaRoCkO Active Member
    Banned

    My First Program [SOURCE]

    No, It is filtered to JPEG, JPG, GIF, (Picture files..)
     
  11. Unread #6 - Aug 8, 2008 at 5:00 PM
  12. Flipmc
    Joined:
    Aug 8, 2008
    Posts:
    60
    Referrals:
    0
    Sythe Gold:
    1

    Flipmc Member

    My First Program [SOURCE]

    Thanks mate, where should this go in Visual Basic 6?
    Sorry for the noob question.
     
  13. Unread #7 - Aug 8, 2008 at 8:15 PM
  14. Swan
    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner

    Swan When They Cry...
    Retired Global Moderator

    My First Program [SOURCE]

    It is not written in Visual Basic 6.

    It is written in Visual Basic 9 (2008).
     
  15. Unread #8 - Aug 9, 2008 at 3:05 PM
  16. LaRoCkO
    Joined:
    Jul 2, 2008
    Posts:
    155
    Referrals:
    0
    Sythe Gold:
    0

    LaRoCkO Active Member
    Banned

    My First Program [SOURCE]

    yea what swan said
     
  17. Unread #9 - Aug 9, 2008 at 3:49 PM
  18. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    My First Program [SOURCE]

    Moved this thread to the wrong section, now I can't move it back... >__<
     
< Selling lvl 33 mystic pure (with 76 wc) | Ohai der! >

Users viewing this thread
1 guest


 
 
Adblock breaks this site