It depends a little on what you want to accomplish.
If you don't want the use to use certain buttons/fields under certain conditions, a WHEN clause will do fine since then they wont respond to clicks (though from a user's point of view this can be confusing -- in that case you might want to DISABLE those controls).
If you really want them to be invisible, it depends on whether or not this should be dynamical; in most cases you know what to show before you enter the screen.
In that case it could be interesting to create an empty field that is in object order before the controls you want to hide, and one after those fields.
Then use the 'Comment' button for these two input fields and use the #USERPRECMD preprocessor directive to make GENSCRN put lines of code before and after.
So input field 1 would have a comment like
#USERPRECMD IF hasThisModule
And input field 2 would have a comment like
#USERPRECMD ENDIF
The resulting .SPR code should look something like
@...SAY...
...
IF hasThisModule
@...SAY...
...
@...GET...
...
ENDIF
@...GET...
...
----
However, if after all this, you still need it done dynamically, consider making sub-windows and showing/hiding those conditionally.
Jan Schenkel
"As we grow older, we grow both wiser and more foolish at the same time." (De Rochefoucauld)