Home > Archive > dBASE Questions and Answers > February 2006 > I need to port the "?" to a basic scrolling window.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author I need to port the "?" to a basic scrolling window.
mike

2006-02-25, 9:47 am

I've got a utility I've written in db2k. I've never coded in Visual db so its all written in the old xbase dos language. I need to be able to send the "?" results to a scrolling window in order to provide the utility's status, to let the user know it ha
sn't locked up.

Is there something simple I can do to provide some basic messages to a window?
btw, the utility is deployable.

Thanks
Michael Nuwer [dBVIPS]

2006-02-25, 9:47 am

mike wrote:
> I've got a utility I've written in db2k. I've never coded in Visual db so its all written in the old xbase dos language. I need to be able to send the "?" results to a scrolling window in order to provide the utility's status, to let the user know it

hasn't locked up.
>
> Is there something simple I can do to provide some basic messages to a window?
> btw, the utility is deployable.
>
> Thanks


You could put a text object on your form and send to output to that object:

form.text1.text = "Xx..."


You could alternatively use a progress form. Something like this:

fProgress = new form()
fProgress.mdi = false
fProgress.height = 3
fProgress.width = 54.5
fProgress.autoCenter = true
fProgress.sysMenu = false
fProgress.smallTitle = false
fProgress.sizeable = false
fProgress.moveable = false
fProgress.text = "Working ..."
fProgress.Progress1 = new text(fProgress)
fProgress.Progress1.top = 1
fProgress.Progress1.height = 1
fProgress.Progress1.left = 2
fProgress.Progress1.width = 50.5
fProgress.open()

for i = 1 to 50
? i
fProgress.Progress1.text = i
sleep .1
next

fProgress.close()
fProgress.release()
Mike

2006-02-25, 9:47 am

Bingo! Thats pretty much what I was looking for.
Thanks a bunch.

Now, LOL. Is there a way to make it appear as a listing? Like the old "Define Window" command in db4?
I'd like to be able to emulate the result panel in the dbase command window and maintain about 25-40 lines of history.
The utility is used to convert an undetermined number of files, any where from 0 to several thousand.
After each file is processed I display certain stats about the file that I'd like to linger in the "Progress" form/window. Some files may process in less than a second, where as others may take 10-15secs to process.

Hope this doesn't complicate things to much.
I was thinking I might have to use an array with the insert() function.
But I thought there might be an easier method.

Thanks again for the help




Michael Nuwer [dBVIPS] Wrote:

> mike wrote:
t hasn't locked up.[color=darkred]
>
> You could put a text object on your form and send to output to that object:
>
> form.text1.text = "Xx..."
>
>
> You could alternatively use a progress form. Something like this:
>
> fProgress = new form()
> fProgress.mdi = false
> fProgress.height = 3
> fProgress.width = 54.5
> fProgress.autoCenter = true
> fProgress.sysMenu = false
> fProgress.smallTitle = false
> fProgress.sizeable = false
> fProgress.moveable = false
> fProgress.text = "Working ..."
> fProgress.Progress1 = new text(fProgress)
> fProgress.Progress1.top = 1
> fProgress.Progress1.height = 1
> fProgress.Progress1.left = 2
> fProgress.Progress1.width = 50.5
> fProgress.open()
>
> for i = 1 to 50
> ? i
> fProgress.Progress1.text = i
> sleep .1
> next
>
> fProgress.close()
> fProgress.release()


Michael Nuwer [dBVIPS]

2006-02-25, 9:47 am

Mike wrote:
> Bingo! Thats pretty much what I was looking for.
> Thanks a bunch.
>
> Now, LOL. Is there a way to make it appear as a listing? Like the old "Define Window" command in db4?


I've never used a DOS version of dBASE so I don't know this feature.


> I'd like to be able to emulate the result panel in the dbase command window and maintain about 25-40 lines of history.
> The utility is used to convert an undetermined number of files, any where from 0 to several thousand.
> After each file is processed I display certain stats about the file that I'd like to linger in the "Progress" form/window. Some files may process in less than a second, where as others may take 10-15secs to process.


Would an editor object work?

fProgress = new form()
fProgress.mdi = false
fProgress.height = 13
fProgress.width = 54.5
fProgress.autoCenter = true
fProgress.sysMenu = false
fProgress.smallTitle = false
fProgress.sizeable = false
fProgress.moveable = false
fProgress.text = "Working ..."
fProgress.Progress1 = new editor(fProgress)
fProgress.Progress1.top = 1
fProgress.Progress1.height = 10
fProgress.Progress1.left = 2
fProgress.Progress1.width = 50.5
fProgress.open()
fProgress.Progress1.text = replicate(chr(10),10
)
fProgress.Progress1.lineNo = 10
for i = 1 to 50
? i
fProgress.Progress1.lineNo ++
fProgress.Progress1.text += " "+i+chr(10)
sleep .1
next

fProgress.close()
fProgress.release()


Jan Hoelterling

2006-02-25, 9:47 am

Hi Mike,

I have a small form with an editor control on it, which is defined to be
Courier Font.

Every time I need to update, I call a single method:

function updateEditor
parameter Addtext
form.notebook1.qpeditor1.value =
form.notebook1.qpeditor1. value+chr(13)+addtex
t
form.notebook1.qpeditor1.keyboard("{CTRL-END}")
return

which adds the text at the bottom of the value, then pretends to press
CTRL-END, which puts the editor at the bottom...

HTH,

Jan


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com