You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

elsardo

Beginner

  • "elsardo" started this thread

Posts: 10

Date of registration: Jun 10th 2011

  • Send private message

1

Friday, December 2nd 2011, 3:03am

MSGBOX

hello I have this error code that is suggested 'by jabaco:
I want the message ok and a cancel 1boton and know that option is chosen

aviso=MsgBox ("high failure period", Buttons As VBMsgBoxStyle) As VBMsgBoxResult



I've tried the four options given jabaco and does not work.

regards

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

2

Friday, December 2nd 2011, 8:18am

RE: MSGBOX

For example create in the designer a Button and write then in the Form of it:

Jabaco Source

1
2
3
4
5
6
Public Sub Command1_Click()
  Dim aviso As VBMsgBoxResult
  aviso=MsgBox ("high failure period", VBMsgBoxStyle.vbOKCancel) 
  MsgBox(aviso)
  MsgBox(aviso.getName)   'works only with Jabaco Framework versions newer then that, which comes with Jabaco 1.5.2
End Sub

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

3

Friday, December 2nd 2011, 10:01am

MsgBox with options

Hey there,
here is how to use some options:

Jabaco Source

1
Debug.Print MsgBox("Question?", vbQuestion Or vbOKCancel Or vbDefaultButton2, "Titel")


The 3rd option 'vbDefaultButton2' does not work!
Does anyone know how to change the vbDefaultButton of the Msg or Input Box?


Dani

elsardo

Beginner

  • "elsardo" started this thread

Posts: 10

Date of registration: Jun 10th 2011

  • Send private message

4

Saturday, December 3rd 2011, 2:24am

thanks theuserbl
works perfect as I wanted
regards



elsardo

elsardo

Beginner

  • "elsardo" started this thread

Posts: 10

Date of registration: Jun 10th 2011

  • Send private message

5

Saturday, December 3rd 2011, 2:26am

thanks theuserbl
works perfect as I wanted
regards

Posts: 5

Date of registration: Nov 21st 2012

  • Send private message

6

Friday, December 14th 2012, 10:30am

Inputbox ok & cancel buttons

Hi,

Please assist, howcan I program the ok and cancel buttons on a inputbox...

Thanks
ElSEBI

spysonic

Trainee

  • "spysonic" is male

Posts: 88

Date of registration: Jul 11th 2014

About me: A beginner programmer.

Location: ...Jabaco Academy

Occupation: i have some but still not enough...

Hobbies: Jabaco

  • Send private message

7

Wednesday, July 23rd 2014, 6:07am

Hello..

Is there a way to change the default title of the Msgbox?

currently, when showing a msgbox the default title is "Jabaco". unlik ein vb6 msgbox title is dependent on the name of the proj. or exe.
spysonic has attached the following image:
  • msgbox.jpg
.
.
Spare me, im new to Programming

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

8

Wednesday, July 23rd 2014, 9:25am

Is there a way to change the default title of the Msgbox?
Yes:

Jabaco Source

1
MsgBox("Yes, you can.", vbOkOnly, "other title")
But you have to set the MsgBoxStyle (in this case: "vbOkOnly") in the middle.
Btw. is vbOkOnly the default Style, which is used, if you write only

Jabaco Source

1
MsgBox "a text"

Greatings
theuserbl

spysonic

Trainee

  • "spysonic" is male

Posts: 88

Date of registration: Jul 11th 2014

About me: A beginner programmer.

Location: ...Jabaco Academy

Occupation: i have some but still not enough...

Hobbies: Jabaco

  • Send private message

9

Thursday, July 24th 2014, 3:01am

Hello..

having the: msgbox "text" will not set the defaultstyle of the message box to vbOnly. I had to include it when having a msgbox to be able to have my preferred title.

thanks for this help "theuserbl" :thumbsup:
.
.
Spare me, im new to Programming

spysonic

Trainee

  • "spysonic" is male

Posts: 88

Date of registration: Jul 11th 2014

About me: A beginner programmer.

Location: ...Jabaco Academy

Occupation: i have some but still not enough...

Hobbies: Jabaco

  • Send private message

10

Friday, August 8th 2014, 2:57am

Is it possible to have a message box in unload event? like if you wanted to close the form it will ask you if you wanted to log_out then gives you a choice yes or no? if yes it will surely log out, if no it will cancel the event?
.
.
Spare me, im new to Programming

This post has been edited 3 times, last edit by "spysonic" (Aug 8th 2014, 3:13am)


theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

11

Friday, August 8th 2014, 10:29am

Is it possible to have a message box in unload event? like if you wanted to close the form it will ask you if you wanted to log_out then gives you a choice yes or no? if yes it will surely log out, if no it will cancel the event?
If you want, I can add this feature tomorrow or so.
Because I have had a problem with my computer, I have it set up new and there is currently no VB6 installed.
Can you please list all integer possibilities and what it do, of Form_Unload(cancel as Integer) ?

cancel = -1
cancel = 0
cancel = 1
cancel = 2
cancel = 3
cancel = 4

Or existing only two values for true and false?
And what Integer value represents in VB6 true and what represet false?
And is cancel = 20 a "true" or "false" ?

Greatings
theuserbl

spysonic

Trainee

  • "spysonic" is male

Posts: 88

Date of registration: Jul 11th 2014

About me: A beginner programmer.

Location: ...Jabaco Academy

Occupation: i have some but still not enough...

Hobbies: Jabaco

  • Send private message

12

Monday, August 11th 2014, 2:33am

Hello,

in Vb6 we are allowed to set a cancel argument in the Unload event, and setting the cancel to Zero means false, and setting the cancel to any non-zero number will be true, meaning you can set the cancel to positive or negative numbers you like and it will still cancel the unload event but if you set it to zero then surely it will unload the form.

TIA
.
.
Spare me, im new to Programming

Rate this thread
WoltLab Burning Board