Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Bug Reports
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Bug Reports Post about errors or bugs encountered.


Msgbox issue?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-12-2008, 10:15 AM
Senior Member
 
Join Date: Mar 2008
Posts: 108
Default Msgbox issue?

Weird one here,

I did a msgbox with a message, but forgot to put in a title (not even "") but with a button and icon selection ... for example ...

msgbox("hello world",cMsgboxYesNo,cQuestion)

... this resulted in a msgbox with just an OK button and a title message of "4"

To replicate as an example, the code is shown below, first a good msgbox, second a badly formatted msgbox function

Quote:
Sub Globals
'Declare the global variables here.

End Sub

Sub App_Start

Msgbox ("This is the first yes/no test with title","Exit", cMsgBoxYesNo,cMsgBoxQuestion)
Msgbox ("This is the second yes/no test, but this time without title", cMsgboxYesNo,cMsgboxQuestion)

End Sub
But, both the compiler and the PDA when running the EXE , allow execution, albeit on the problematical msgbox, it shows "4" in the title and has OK instead of Yes / No as buttons. (I guess the "4" is the internal number for cMsgboxYesNo?)

Is this a bug in the checking of code at compile time which cannot detect my dumb programming / missing "" ?
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 10:29 AM
klaus's Avatar
Basic4ppc Veteran
 
Join Date: Oct 2007
Location: Switzerland
Posts: 434
Awards Showcase
Competition Winner 
Total Awards: 1
Default

You should add a comma like below, MsgBox needs 4 variables !

in you code
1. "hello world" is the text
2. cMsgboxYesNo is the title
3. cQuestion=0 is equivalent to cMsgBoxOK
4. missing

The constant for Question mark is cMsgBoxQuestion and not cQuestion !

msgbox("hello world",,cMsgboxYesNo,cMsgBoxQuestion)

Best regards
__________________
Klaus
Switzerland

Last edited by klaus : 04-12-2008 at 10:31 AM.
Reply With Quote
  #3 (permalink)  
Old 04-12-2008, 10:39 AM
Senior Member
 
Join Date: Mar 2008
Posts: 108
Default

Yes, thank you Klaus, I understand this, but what I am saying is perhaps at runtime, BASIC4PPC should perhaps be a bit more intelligent and pick this issue up and show a compile error
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Timer To Close MsgBox? cdeane Questions & Help Needed 5 05-09-2008 11:20 AM
Msgbox Question cdeane Questions & Help Needed 2 05-04-2008 09:23 PM
MsgBox does not work? skipper Bug Reports 2 01-05-2008 09:28 AM
Substitute of Msgbox (DialogForm) miklquick Questions & Help Needed 3 12-12-2007 05:29 AM
Msgbox Vito Questions & Help Needed 2 11-19-2007 08:05 AM


All times are GMT. The time now is 11:35 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0