VantageBasic Form

Hey thanks alot. This helped a bunch I had to make one small change
for Vantage 5.1 so I thought I would post it for everybody in case
anybody else needed this sometime. Mine looked like this:


/* dateuser.p */
/* To DATE/USER STAMP a VB Form editor control */
/* using a VB Form button control. */

{vbp/vb.i}

DEFINE Variable strEditorContents AS CHARACTER NO-UNDO.
DEFINE variable strUserID AS CHARACTER NO-UNDO.
strUserID = getStringValue("_USERNAME").
strEditorContents = getStringValue("EDITOR_1").
strEditorContents = strEditorContents + STRING(TODAY) + " " +
strUserID + ": ".
setStringValue("EDITOR_1.scrvalue":U,strEditorContents).
RETURN.

/* end of program */


--- In vantage@y..., "rleury" <beury@h...> wrote:
> On Fri, 22 Feb 2002 18:38:16
> Eric Buss Wrote:
>
> I am looking to make a VB Form that has a editor box and I would
> like to be able to make a button that creates a time / User stamp
> that would add to the bottom of the editor box.
>
> Eric, Try this.....
>
> This was written for Vantage 4.0, you might need to change the
USERID
> ("vantage") to the name of your DB.
>
> For This Example:
> 1. Add the following program to your Vantage\VBP directory
> as dateuser.p
> 2. Create any new VB Form available
> 3. Add an Editor Control from the Palette
> (this should default to "EDITOR_1")
> 4. Add a Push Button Control from the Palette
> (this should default to "BUTTON_1")
> 5. Double click BUTTON-1 and add the command
> "runprog dateuser.p" in the command box and save the VBForm.
> 6. Go to the actual VB Form and press BUTTON-1
>
>
> /* dateuser.p */
> /* To DATE/USER STAMP a VB Form editor control */
> /* using a VB Form button control. */
>
> {vbp/vb.i}
>
> DEFINE Variable strEditorContents AS CHARACTER NO-UNDO.
>
> strEditorContents = getStringValue("EDITOR_1").
>
> strEditorContents = strEditorContents + STRING(TODAY) + " "+
> CAPS(USERID("vantage")) + ": ".
>
> setStringValue("EDITOR_1.scrvalue":U,strEditorContents).
>
> RETURN.
>
> /* end of program */
Using version 5.0, I have only been working w/Vantage for about 3 months
now so i am still learning the ins and outs of the app. Someone here
just handed me a screen print of the VantageBasic Form and asked if I
would be able to add "no X Outs allowed" to this form? How would I go
about doing this?

Thanks

Steven Beals
Steven:

This was one of those times where the help menus actually helped me. Under
the System Management Folder (in 4.0-not on 5.0 yet), there's a Vantage
Basic folder. Chose Forms Design. The VB window will pop in. Click File,
Open, select the form you want to modify. The form will pop into the
window-and a palette will also pop in...If you click the big T, you'll be
able to add a text box...I would advise printing out the help menus from VB
forms and reading over them before you try anything complicated, but it is a
very slick little addition to your regular Vantage screens, cause YOU GET TO
PICK!!! Later on, when you're braver, you can even add a command button to
run things from a VB screen.

Good Luck.

Lydia

just handed me a screen print of the VantageBasic Form and asked if I
would be able to add "no X Outs allowed" to this form? How would I go
about doing this?

Thanks

Steven Beals
I am looking to make a VB Form that has a editor box and I would
like to be able to make a button that creates a time / User stamp
that would add to the bottom of the editor box. Has anybody did
this or knows how to do this I would apreciate the help. Thanks

Eric Buss
Othy Inc.
On Fri, 22 Feb 2002 18:38:16
Eric Buss Wrote:

I am looking to make a VB Form that has a editor box and I would
like to be able to make a button that creates a time / User stamp
that would add to the bottom of the editor box.

Eric, Try this.....

This was written for Vantage 4.0, you might need to change the USERID
("vantage") to the name of your DB.

For This Example:
1. Add the following program to your Vantage\VBP directory
as dateuser.p
2. Create any new VB Form available
3. Add an Editor Control from the Palette
(this should default to "EDITOR_1")
4. Add a Push Button Control from the Palette
(this should default to "BUTTON_1")
5. Double click BUTTON-1 and add the command
"runprog dateuser.p" in the command box and save the VBForm.
6. Go to the actual VB Form and press BUTTON-1


/* dateuser.p */
/* To DATE/USER STAMP a VB Form editor control */
/* using a VB Form button control. */

{vbp/vb.i}

DEFINE Variable strEditorContents AS CHARACTER NO-UNDO.

strEditorContents = getStringValue("EDITOR_1").

strEditorContents = strEditorContents + STRING(TODAY) + " "+
CAPS(USERID("vantage")) + ": ".

setStringValue("EDITOR_1.scrvalue":U,strEditorContents).

RETURN.

/* end of program */
I tested a button in the Vendor VB form with command line..
RUNPROG C:\TimeStmp.w

Where TimeStmp.w is..

{vbp/vb.i}
FIND vendor WHERE ROWID(vendor) = GetCurrentRowID().
if available(vendor) then do:
vendor.character01 = trim(vendor.character01) + " Date " +
string(today,"99/99/9999") + " Time " + string(time,"HH:MM am").
setStringValue
("Vendor.Editor_1.SCRVALUE":U,vendor.character01).
end.

It worked. If you have questions email ldrew@... and
I'll try to help.

Lonnie

--- In vantage@y..., "othyghost" <Eric@o...> wrote:
> I am looking to make a VB Form that has a editor box and I would
> like to be able to make a button that creates a time / User stamp
> that would add to the bottom of the editor box. Has anybody did
> this or knows how to do this I would apreciate the help. Thanks
>
> Eric Buss
> Othy Inc.