Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Code Samples & Tips
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Code Samples & Tips Share your recent discoveries and ideas with other users.


Code folding - #Region


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-14-2007, 09:26 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,141
Default Code folding - #Region

One new feature of version 5.50 is code outlining (code folding).
You can use it to organize your code into blocks.
Each sub can be folded.
Using #Region ... #End Region you can manually declare blocks of code that will be foldable and also will be folded by default when you load the file.
That way you can easily navigate large code.
Note that you can add a description next to #Region.
Example:
Code:
#Region Form1 Block
Sub Form1_Show
...
End Sub
Sub SomeSub
...
End Sub
...
#End Region
Reply With Quote
  #2 (permalink)  
Old 08-14-2007, 09:42 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,697
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Very nice! Very useful.
Reply With Quote
  #3 (permalink)  
Old 08-16-2007, 03:10 PM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 424
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi Erel
Formidable!!!
This reminds me, (perhaps I just missed it), is it possible to fold and unfold all subs in a single action?
Cheers
Robert
Reply With Quote
  #4 (permalink)  
Old 08-16-2007, 03:19 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,141
Default

You can't fold / unfold all subs in a single action.
I think it will be available in the next update.
Reply With Quote
  #5 (permalink)  
Old 08-16-2007, 03:47 PM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 424
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Absolutely no problem Erel,
By the speed of your updates I'm sure this will be intregrated sooner than I estimate
Reply With Quote
  #6 (permalink)  
Old 08-20-2007, 03:09 AM
Senior Member
 
Join Date: May 2007
Posts: 130
Awards Showcase
Beta Tester 
Total Awards: 1
Default

The folding feature is very useful. I could organise the coding very effectively.
The folded regions are stored once the file saved, but subs are not.
Is the folded subs will be stored too on your next update?
__________________
Rioven

Sony Ericsson XPERIA X1i WM6.1
480x800 Display Resolution
with QWERTY keyboard
Reply With Quote
  #7 (permalink)  
Old 08-20-2007, 12:48 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,141
Default

I think it is better to leave all the subs open when loading a file.
Next update will allow you to fold / unfold all subs.
You could of course use #region to wrap large subs that should be folded.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting #Region Form the IDE menu Cableguy Basic4ppc Wishlist 5 09-27-2008 11:18 PM
Add Code giannimaione Questions & Help Needed 5 06-01-2008 07:03 PM
Region Form ridzas Code Samples & Tips 6 09-22-2007 06:38 PM
Help with code cdeane Questions & Help Needed 9 09-22-2007 05:30 PM
Code files jerryjukem Questions & Help Needed 1 07-28-2007 07:57 PM


All times are GMT. The time now is 10:26 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0