Professional problem???? 
Author Message
 Professional problem????

Hello all,

Can anybody tell me what a professional programmer would do?
I'm building this small application but i want to do it correctly.

Here it is...........

I want to organize my child-windows with the command:

        frmMNotepad.Arrange vbTileVertical

I've got a button and a menu option to do this.

So do i put it in both or do i let one refer to the other.
Since it's just one line it doesn't really mather, but what if it's more.
Do you just always make a separate module with subs ore functions.
And let the button and the menu option call these.

Let's hear all you pro's out there.

thanx in advanx.

--
Regards,

        Gerard -wanna be a pro- Petersen.
--

--



Sun, 16 Aug 1998 03:00:00 GMT  
 Professional problem????
It will consume less space in the exe and run faster to put this
line of code in each procedure that needs it; a win-win choice.  
It almost never makes sense to put just one line of code in a
subroutine due to the overhead required to call a subroutine.

I generally don't create a separate sub procedure until the
complexity of the code warrants the use of a sub procedure for the
purposes of 1) reducing EXE size or 2) enhancing maintainability
by virtue of the fact that given block of code is neatly packaged
under a sub procedure with a descriptive name such as "Parse
Command Line" or the like.



Sun, 16 Aug 1998 03:00:00 GMT  
 Professional problem????
Looks like lots of overhead, how does this perform for you?
seems to me you found a way to program "top-down" in an event based
world.
Quote:
>via the app's menu.  Rather than repeating the code in two places or even
>calling the actual routine in two places, all of my menus and toolbar
>buttons call the dispatch routine.  For example:
>    Sub Menu_Click (Index As Integer)
>            Call Dispatch(Menu(Index).HelpContextID, other parms)
>    End Sub
>    Sub Tool_Click (Index As Integer)
>            Call Dispatch(Tool(Index).HelpContextID, other parms)
>    End Sub
>    Sub Dispatch(FCode As Integer, other parms)
>            Select Case FCode
>                    Case FILE_OPEN
>                            ' do file open calls here
>                    Case FILE_PRINT
>                            etc.
>    End Sub
>This, of course, just scratches the surface.  By abstracting my app this
>way, I have created a consistent method by which functions in my app are
>exposed both to itself and to other apps.  Of course there are other
>functions and subroutines which are not exposed in this way and are
>called directly.
>-chris



Wed, 19 Aug 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Permission problem in accessing MSMQ on Win2K Professional

2. VB6 Problem Under Windows 2000 Professional

3. VB6.0 professional edition ocx component problems HELP!!!!!!!!

4. VB5 Professional Edition Controls Problem

5. VB5 Professional Edition Problem (Active X)

6. VB5 Professional Edition controls problem

7. Installation Problems -- VB5 Professional

8. Problems with installing VB 4 32 bit Professional

9. Database Creation Problem in VB 3.0 Professional

10. Problem with ADSI and Windows 2000 Professional

11. Image Professional imgedit.ocx problem with dblclick event

12. problems with VB4.0 professional

 

 
Powered by phpBB® Forum Software