Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Color in WAIT command?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00096765
Message ID:
00100690
Vues:
45
Bob
Thanks for that detailed help. In the end, I decided the time savings wasn't happening using the WAIT or the MBOX and I just went ahead and created a re-useable, generic Form to acquire user input in multi text boxes.

It is nearsighted of Microsoft to not include a mesagebox that includes a feature to obtain 2-3 data inputs from the user since an application needs user input for searches and lookups all the time. I've worked with other development tools and commands to obtain simple user inputs are common.

Thanks anyway.

John Fish
JF Services


>John
>
>Can't say that I've added more than 1 text box, but I've added a custom list box to it with no problem. I would think you could add a container having several text boxes: here is a portion of the source for the list box. You may be able to understand some more of the syntax - took me a little bit to grasp:
>
>#include ..\include\foxpro.h
>private lnChoice
>local llMbox, llSecReports, lnSelect, lcMemName, lcNum, lcFixStr, m.glidnum
>if !('MBOX' $ set('PROCEDURE'))
> set proc to ..\libs\mbox additive
> llMBox = .T.
>ENDIF
>if !('SECREPORTS' $ set('LIBRARY'))
> set classlib to SECREPORTS additive
> llSecReports = .T.
>endif
>lnSelect = select()
>lnChoice = 0 && default is blank
>
>*-- get the Brother's Name
>if used('member')
> use data\llMason!member in 0 order lastFirst alias memZ again
>else
> use data\llMason!member in 0 order lastFirst alias memZ
>endif
>select memZ
>
>
>mbox("Select Member:", MB_OKCANCEL+MB_LISTBOX+MB_ICONQUESTION, "Arrow to Selection - Enter or DblClick to Select", "lnChoice",;
> "Rowsource='memZ.lastName,firstname,middlename,suffix'; RowsourceType=6; ColumnCount=4;;
> ColumnWidths='100,80,60,40'; FirstElement=1; Width=300; Height=200; value=0; ColumnLines = .T.",;
> "mboxListBox","\>
>lcMemName = iif(lnChoice > 0, thisform.oName.firstLast(), '')
>
>if lnChoice > 0
> this.cGlidnum = memZ.glidnum
> repl vSecReports.glidnum with this.cGlidnum
>
> thisform.oCState.getCurState(this.cGlidnum, FALSE, FALSE)
> this.lLTM = thisform.oCState.ltm
>*******************************
>
>NOTE: I've been able (sometimes) to wrap the code using double ; even though
>the code specifies the ';' symbol is to be used so separate properties. You can do this by putting double ';;' symbols. Works sometimes! You'll see a sample of this in the code above.
>
>Robert...
>
>
>
>>Bob ...
>>
>>(Disregard my last message)
>>This is a subsequent message after I wrote the one, asking how to use the MBOX pgm. It appears that, unfortunately, there are at least three files in the libraries that have MBOX in their names. I have finally found the MBOX you must be referring too ... the one by Brien Givens in the "Visual Foxpro in General" library. It has the features you describe and - is - easy to use. Nice program.
>>
>>I notice that it seems to allow just one textbox object at a time to be used in a messagebox. I was hoping to be able to have the ability to prompt the user for up to three textbox inputs in a single messagebox.
>>Have you ever been able to do that?
>>
>>John Fish
>>JF Services
>>
>>
>>>The mbox class in the files library works similar to a messagebox and can be used in a wait status. You can add custom objects, listboxes, text box, all sorts of options. Its a little bit of a challenge to get it working the way you want, but once you understand the concept, it is one of my most important tools. It comes with its own help file, instructions and several samples. I believe the author needs more samples, but it gets you going. Its well worth the 20 or so dollars spent for the source. Check it out. The zipped file comes working with everything but the source.
>>>
>>>By the way, you can change about anything on it - colors, etc or modify the source and make it work exactly the way you want. I personally didn't bother, I've got it working fine.
>>>
>>>
>>>
>>>
>>>
>>>>Thanks for bothof your replies. Too bad. It would have been a very useful, extremely quick way to compose a user input dialog. It - does - work. But without the colors it would be drab and colorless to use.
>>>>
>>>>John Fish
>>>>JF Services
>>>>
>>>>
>>>>>>Can any of the text you use in a WAIT command be colorized? It would even be great if the variables used in it could be colorized too.
>>>>>>This is part of the code that allows a fast and useful way to obtain
>>>>>>user input using a WAIT command. It works fine. It assumes the default
>>>>>>Foxpro 5.0a color, however, which is really drab.
>>>>>>
>>>>>>WAIT window at 20,70;
>>>>>> space(10)+"CHARGE SEARCH"+space(10)+chr(13+;
>>>>>> +chr(13)+;
>>>>>> "Enter Field 1: "+xtar1+chr(13)+;
>>>>>> " "+chr(13)+;
>>>>>> "Enter Field 2: "+xtar2+chr(13)+;
>>>>>> " "+chr(13)+;
>>>>>> "ENTERs = Accept END = Cancel";
>>>>>> to xinp
>>>>>>
>>>>>>Any help would be appreciated.
>>>>>>
>>>>>>John Fish
>>>>>>JF services
>>>>>
>>>>>
>>>>>If i'm not wrong this depends only on the windows color configuration. There's no other way to change wait window color.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform