Different msgbox?

  • Thread starter Thread starter mB
  • Start date Start date
M

mB

Thanks for the earlier help.

On our current PPC app we've gone through the effort to make the buttons
large enough to use with a finger, most times, a gloved finger.

Problem we have now is, the message box (msgbox) has small buttons. I
understand that the way around this is to build our own dialog box. But,
before going down that path, is a sample out there available?

Right now I'm having problems making a small window out of the form, it
seems to stay full screen.

Just curious if you have a ready made solution - or suggestion for making a
smaller window.

Thanks!
 
I would want a caption bar though - and window border would seem
appropriate.

Another thing I'd like to do is add the functionality that MsgBox has -
where you can tell it that you want an OkCancel, OkOnly, YesNo, etc buttons.

I have an idea on how to be able to pass those parameters, where the parms
have the appropriate types, such as:
Public Function Startup(ByVal Prompt As String, ByVal Buttons As
Microsoft.visualbasic.MsgBoxStyle, Optional ByVal Title As Object = Nothing)
As Microsoft.visualbasic.MsgBoxResult

But not sure how to handle this within the code body of the form.

Make sense?
 
mB said:
I have an idea on how to be able to pass those parameters, where the parms
have the appropriate types, such as:
Public Function Startup(ByVal Prompt As String, ByVal Buttons As
Microsoft.visualbasic.MsgBoxStyle, Optional ByVal Title As Object = Nothing)
As Microsoft.visualbasic.MsgBoxResult

I remember to you that you are writing .Net, not VB6.

Microsoft.VisualBasic namespace is no longer supported: see and
MessageBoxButtons, MessageBoxIcons and DialogResult instead.

Also the Optional keyword is deprecated and CLR un-compliant: consider to do
some function overload instead.

For your msgbox, a label can be your caption and a panel your border (if you
really want a floating window... but if you use the PPC in an industrial
environment I would use a BIG fullscreen window).

For buttons I would pass a string array with the captions *I* want to see
and as DialogResult would return -1 (cancel) or 0 to (buttons.Length - 1) to
know what button was pressed.

Fabio
 
Thanks Fabio.

So far, I seem to be on track then. I have jumped ahead and did use a
colored label as my caption, and have been trying to use a panel to
implement my border. But the panel as a border is not quite working. I'm
trying to place one white panel on top of another black panel - in code
making the white slightly smaller than the black, and centering it within.

for some reason, thats all I see, is the black panel - my buttons are buried
under it I suppose. ???

And thanks for the info on DialogResult - I'll try that.
 
Got it working, thanks.

mB said:
Thanks Fabio.

So far, I seem to be on track then. I have jumped ahead and did use a
colored label as my caption, and have been trying to use a panel to
implement my border. But the panel as a border is not quite working. I'm
trying to place one white panel on top of another black panel - in code
making the white slightly smaller than the black, and centering it within.

for some reason, thats all I see, is the black panel - my buttons are buried
under it I suppose. ???

And thanks for the info on DialogResult - I'll try that.


Zanna said:
I remember to you that you are writing .Net, not VB6.

Microsoft.VisualBasic namespace is no longer supported: see and
MessageBoxButtons, MessageBoxIcons and DialogResult instead.

Also the Optional keyword is deprecated and CLR un-compliant: consider
to
do
some function overload instead.

For your msgbox, a label can be your caption and a panel your border (if you
really want a floating window... but if you use the PPC in an industrial
environment I would use a BIG fullscreen window).

For buttons I would pass a string array with the captions *I* want to see
and as DialogResult would return -1 (cancel) or 0 to (buttons.Length -
1)
 
Back
Top