Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '------------------------------------------------------------------------------------------
- ' Notice of My Copyright and Intellectual Property Rights
- '
- ' Any intellectual property contained within the program by Joseph L. Bolen remains the
- ' intellectual property of the Joseph L. Bolen. This means that no person may distribute,
- ' publish or provide such intellectual property to any other person or entity for any
- ' reason, commercial or otherwise, without the express written permission of Joseph L. Bolen.
- '
- ' Copyright © 2016. All rights reserved.
- ' All trademarks remain the property of their respective owners.
- '-------------------------------------------------------------------------------------------
- ' Program Name: Scope Test
- '
- ' Author: Joseph L. Bolen
- ' Date Created: 20 JUN 2016
- '
- ' Description: Demo of Scope of a project/class/module. Note: Default scope is Friend.
- '
- ' Documentation is at:
- ' App's Visual Basic .NET code is at http://pastebin.com/Yce66YSD
- '-------------------------------------------------------------------------------------------
- ' Add reference to UtilitiesLibrary to project.
- Public Class MainForm
- Private Sub SubmitButton_Click(sender As Object, e As EventArgs) _
- Handles SubmitButton.Click
- MessageBox.Show("Form's Text Property is: " & Me.Text)
- LocalUtilities.ShowCaption(Me)
- UtilitiesLibrary.Utilities.ShowCaption(Me)
- End Sub
- End Class
- '-------------------------------------------------------------------------------------------
- ' Module Name: LocalUtilities
- '
- ' Author: Joseph L. Bolen
- ' Date Created: 20 JUN 2016
- '
- ' Description: Note: Default scope is Friend. I have explicitly declared it as Friend for
- ' this demo.
- '-------------------------------------------------------------------------------------------
- Friend Module LocalUtilities
- Friend Sub ShowCaption(ByVal form As Form)
- MessageBox.Show("LocalUtilities Module - Form's Text Property is: " & form.Text)
- End Sub
- End Module
- '-------------------------------------------------------------------------------------------
- ' Module Name: Utilities
- '
- ' Author: Joseph L. Bolen
- ' Date Created: 20 JUN 2016
- '
- ' Description: Note: Default scope is Friend. I have explicitly declared it as Pubic for
- ' this demo. This module is in its own project assembly UtititiesLibrary.
- '-------------------------------------------------------------------------------------------
- ' Add Reference to System.Windows.Forms to project.
- Imports System.Windows.Forms
- Public Module Utilities
- Public Sub ShowCaption(ByVal form As Form)
- MessageBox.Show("UtilitiesLibrary.Utilities Module - Form's Text Property is: " & form.Text)
- End Sub
- End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement