|
-
Mar 23rd, 2002, 07:21 PM
#1
Thread Starter
Hyperactive Member
Some Help Please
OK Im a Sorta new VB programmer just got VS.net{academic}
:-)
What is the "#Region " Windows Form Designer generated code "" Code for ??
and how can i do the cancel and defalt property???
-
Mar 24th, 2002, 11:00 AM
#2
Addicted Member
its for the + - Code thing
#Region DirectiveSee Also
#If...Then...#Else Directives (Language Reference)
Collapses and hides sections of code in Visual Basic .NET files.
#Region "identifier_string"
#End Region
Parts
identifier_string
Required. String that acts as the title of a region when it is collapsed. Regions are collapsed by default.
#End Region
Terminates the #Region block.
Remarks
The #Region directive lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio Code Editor. #Region statements support block semantics (such as #If...#End If), meaning that the start and end must be in the same code block.
Example
This example uses the #Region directive.
#Region "MathFunctions"
' Insert code for the Math functions here.
#End Region
Magiaus
Visual Basic 6.0 SP5
Visual C++ 6.0 SP5
The only sovereign you can allow to rule you is reason.
-
Mar 26th, 2002, 12:33 AM
#3
Thread Starter
Hyperactive Member
no clue what you just said lol
-
Mar 26th, 2002, 06:37 AM
#4
Addicted Member
jesus christ, ZanM! 
basically, any code you put in a #region...#end region can be expandable/collapsable (like in a treeview), just like with subs and functions, except it allows you to do it with large blocks of code.
-
Mar 26th, 2002, 07:47 AM
#5
As explained above, regions define collapsable pieces of code.
But I guess your main question was about the Windows Form Designer generated code region.
This region contains the code that is generated by your actions on the form designer. If you drop a button on the form, the code for creating that button is placed in this region. It is not recommended to change it, because the form designer could crash. That is why it is hidden in a region.
The Cancel and Default properties of the button are now properties of the form. This makes more sense, because only one button can be the cancel button, and it is awkward if properties are changed because you change the properties of another control. The form now has AcceptButton and CancelButton properties, which correspond to the old Default, and Cancel properties of the commandbutton.
-
Mar 26th, 2002, 12:38 PM
#6
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|