Shadow Blade
Morrowland Presents Apron Tutorials
game - design - multimedia - web - programming - tutorials - There are currently viewers visiting Apron Tutorials.
   
 
TECHNICAL
GRAPHICAL
SOUND
GAME
WEB
ARTICLE
TOOL
PROJECT
 
 NEWS

  news

  history


 TECHNICAL TUTORIALS

  opengl

  direct3d

  c/c++

  visual basic

  java

  c#


 WEB TUTORIALS

  html

  dhtml

  asp

  php


 IMAGE EDITING

  photoshop

  draw sketch


 3D MODELING

  3d studio


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 DEMOS

  win32 api


 ARTICLES

  general

  opengl


 COMMUNITY

  about us

  credit

  contact







VISUAL BASIC .NET APRON TUTORIALS





Public Class Form1
    Inherits System.Windows.Forms.Form

    'Create an object of class CText
    Dim objCText As New Class1()

    '************************************
    'Handle Our Private Class Variable
    '************************************
    Private Sub Button1_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button1.Click
        TextBox1.Text = objCText.Get_String
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button2.Click
        objCText.Set_String(TextBox2.Text)
    End Sub

    '************************************
    'Handle Our Public Class Variable
    '************************************
    Private Sub Button3_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button3.Click
        TextBox3.Text = objCText.mText2
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button4.Click
        objCText.mText2 = TextBox4.Text
    End Sub

End Class

Public Class Class1

    'Private Variables
    'can not be accessed outside the class
    'It is private for the class
    'We have to make Get and Set functions to edit them
    Private mText As String 'Private Variable
    '''''''''''''''''''''''''''''''''''''''''''''''''''
    'Public Variables can be accessed through
    'a class object
    Public mText2 As String 'Public  Variable

    Private Sub Class_Initialize() 'Class Constructor
        mText = "Jimi Hendrix 1968"  'Private value
        mText2 = "Leo Fender 1957"   'Public  value
    End Sub

    Public Sub Set_String(ByVal str As String)
        mText = str 'set new value
    End Sub

    Public Function Get_String() As String
        Get_String = mText 'get and return value
    End Function

End Class


Download The Source Code! Visual Basic .Net Source Code


I hope you found this VB .Net tutorial useful!

Don't forget to mention Apron Tutorials in your References!

Best Regards
Ronny André Reierstad

 LINKS

  morrowland home



 GAME DEVELOPEMENT

  nvidia

  gamedev

  polycount


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 MATH AND PHYSICS

  mathworld

  physicsworld







PLEASE LINK TO


  All rights reserved Morrowland © 2011  
Ronny André Reierstad