Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Folding/Collapsing functions and subroutines in Visual Basic 6

Tags:

ide

vb6

Do you know if there's a way to fold/collapse functions and subroutines (and better yet: ifs and whiles) in the Visual Basic 6 IDE? At least with a plugin or something similar?

I have to deal with files of thousands of lines sometimes and with no cropping it's just impossible (It's a very old app off course).

Please note that it's not Vb.Net, it's VB6.0

Thanks!

like image 641
steven2308 Avatar asked Apr 09 '15 22:04

steven2308


People also ask

What are subroutines in Visual Basic?

A Sub procedure is a series of Visual Basic statements enclosed by the Sub and End Sub statements. The Sub procedure performs a task and then returns control to the calling code, but it does not return a value to the calling code.

How do you use subroutines in Visual Basic?

Creating a subroutine involves two lines of code. Luckily though, the Visual Basic code editor is smart, and will insert the second line for you! A subroutine begins with the word "Sub", followed by a space, then a name identifying the subroutine. Two parentheses follow, which are used for a parameter list.

How to collapse sections of code in Visual Studio?

(Ctrl+M, Ctrl+H) - Collapses a selected block of code that would not normally be available for outlining, for example an if block. To remove the custom region, use Stop Hiding Current (or Ctrl+M, Ctrl+U). Not available in Visual Basic.

How do you call a function in vb6?

You call a Function procedure by using the procedure name, followed by the argument list in parentheses, in an expression. You can omit the parentheses only if you aren't supplying any arguments. However, your code is more readable if you always include the parentheses.


1 Answers

No, in Visual Basic 6 IDE is no fold/collapse functions. What to do instead?

  • Use Ctrl + Arrow Up or Ctrl + Arrow Dn for skipping between functions
  • Use the list of functions in the upper right corner instead of scrolling
  • Toggle Procedure View / Full Module View by two buttons in the bottom left corner
  • Must-to-have: install Scroll Wheel Fix for VB6 and scroll source with mouse wheel (nirvana!)
like image 140
Roman Plischke Avatar answered Oct 10 '22 13:10

Roman Plischke