locked
QMessageBox - stupid question, but the hell for me ;-/ RRS feed

  • Question

  • Hi all!

    I have a problem with calling of QMessageBox in extended form.

    When I call

    DialogResult ret = QMessageBox.Show("", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

    I'm getting exception: Value of 'null' is not valid for 'stream'

     

    When I call simple form of QMessageBox (i.e. without MessageBoxButtons and MessageBoxIcon parameters), everything is ok.

     

    Any ideas?

     

    many thanks!

     

    Tuesday, September 25, 2007 4:48 PM

Answers

  • (By reflecting HomeServerControls.dll)

    Unfortunately, in WHS's resources,

    the "question" icon of QMessageBox is not exist.

    so you cann't use "MessageBoxIcon.Question" for argument.

    (while "Information", "Error" and "Warning" are exsit...)

    you can use

    public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, Image icon);

    public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon);

     

    for your own icon picture.

    Wednesday, September 26, 2007 2:09 AM

All replies

  • (By reflecting HomeServerControls.dll)

    Unfortunately, in WHS's resources,

    the "question" icon of QMessageBox is not exist.

    so you cann't use "MessageBoxIcon.Question" for argument.

    (while "Information", "Error" and "Warning" are exsit...)

    you can use

    public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, Image icon);

    public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon);

     

    for your own icon picture.

    Wednesday, September 26, 2007 2:09 AM
  • Yeee, it makes sense. Thank you very much!!!

    Wednesday, September 26, 2007 10:12 AM