.NET

Reply
Distinguished Contributor
fxcastil
Posts: 404
Registered: ‎11-11-2002
Message 1 of 3 (396 Views)
Accepted Solution

Windows Form Application vs Class Library Application and Userform Scope

396 Views, 2 Replies
08-13-2012 12:57 PM

I created a Windows Form application and Class Library application with one UserForm and One module.

Both type of applications should be the same.


I found this example about userforms in VB.net and VB.
It talks about userforms in Vb.net not having a global scope
But again (being redundant) the WindowsFormApplication.NET does have global scope of Userforms, but the ClassLibraryApplication.Net does not have global scope of Userforms.

http://msdn.microsoft.com/en-us/library/aa289529(v=VS.71).aspx

'''''''''''''''''  a module in the sample programs attached  '''''''''''''''''''

 

Option Explicit On
Option Strict On

Module Mod_Test

    Sub test()
' I can type/use this in the WindowsFormApplication but not the

' I can NOT type/use this in the ClassLibraryApplication

        formTest.TextBox1.Text = "hello"

    End Sub

End Module

 

 

 

Never new that but the typing the name of a Form class in WindowForms apps creates a shortcut to MyProject.Forms.formName

 

and the difference is a class library does not have Forms property exposed in MY object explained in link

 

http://www.theswamp.org/index.php?topic=42464.msg476788#msg476788

Valued Mentor
jeff
Posts: 335
Registered: ‎05-12-2009
Message 2 of 3 (389 Views)

Re: Windows Form Application vs Class Library Application and Userform Scope

08-13-2012 01:42 PM in reply to: fxcastil

Never new that but the typing the name of a Form class in WindowForms apps creates a shortcut to MyProject.Forms.formName

 

and the difference is a class library does not have Forms property exposed in MY object explained in link

 

http://www.theswamp.org/index.php?topic=42464.msg476788#msg476788

You can also find your answers @ TheSwamp
Distinguished Contributor
fxcastil
Posts: 404
Registered: ‎11-11-2002
Message 3 of 3 (382 Views)

Re: Windows Form Application vs Class Library Application and Userform Scope

08-13-2012 01:47 PM in reply to: jeff

Jeff,

 

Thanks ........I Learned something new today.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!