I understand what you're saying, but maybe I'm just going about things the 
wrong way?

When your main program opens a "dialog" one of the ways these dialogs commonly 
get closed is by clicking the [OK] button.

You can see a simple example of this by starting Windows Media player, then 
clicking Menu|Library... to bring up the Library management dialog.  This 
dialog changes the Close button to [OK] mode, and clicking on it takes you back 
to the main Media Player window.

I could easily use another button labeled something like "Back" but the UI 
Guidelines suggest Back and Next are meant for things like Wizard or Tree 
navigation, not for exiting dialogs.  I'd rather avoid making my UI 
non-standard where I can avoid it.

I'm probably running up against the different way NSB/CE is handling the "Form" 
metaphor behind the scenes.

Perhaps I could try calling SHDoneButton() directly:

http://msdn.microsoft.com/en-us/library/aa930127.aspx

... however this may be almost exactly what ShowOKButton is doing anyway.  By 
rights this ought to be a property of a Form according to the MSDN docs:

"Whenever the foreground window changes, the shell checks the style bits of the 
window to determine if the OK button should appear in the navigation bar."

I'll consider alternatives though.

Thanks!

Bob

--- In [email protected], "George Henne" <g...@...> wrote:
>
> The OK button is "owned" by the operating system. Asking it to change
> its behaviour in the middle of running the app could lead to undefined
> conditions. 
> 
> I usually set it the way I need when the program starts, then don't mess
> with it. I'll use a button like "Back" to go to the previous form.
> 
> >Well close but no cigar.
> >
> >This works, but it is erratic.  Clicking on [OK] while Form2 is showing
> >always takes me back to showing Form1.  However sometimes the [OK]
> >changes back to [X] just fine, and other times I have to click somewhere
> >on Form1 to make it change back!
> >
> >No Pattern that I can see to it.  Test logic:
> >
> >Dim Form2Showing
> >
> >Sub mnuForm1Next_Click 'Show Form2 with OK
> >    Form2_Show
> >    Form1_Hide
> >    ShowOKButton True 'Set Close button to OK
> >    Form2Showing = True
> >End Sub
> >
> >Sub Output_Close 'If showing Form2 go back to Form1
> >    If Form2Showing Then
> >        Form1_Show
> >        Form2_Hide
> >        ShowOKButton False 'Set Close button to [X]
> >        Form2Showing = False
> >    End If
> >End Sub
> >
> >--- In [email protected], "michiman56" <rriemersma@> wrote:
> >>
> >> Thanks Chris,
> >> 
> >> This looks good.  I'll check the documentation changes notes and try
> >working with the examples you've outlined.
> >> 
> >> Bob
> >
> >
> >
> >------------------------------------
> >
> >Yahoo! Groups Links
> >
> >
> >
>


-- 
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.

Reply via email to