MiniGui and show on screen

150 views
Skip to first unread message

Jürgen Gerdau

unread,
Nov 14, 2022, 4:49:12 AM11/14/22
to Harbour Users
Hello guys, i´m using now minigui. My Problem is (for you) very simple, i think. I am developing an Windows application and i want to do the following:
Program starts and i want to have a Screen with a counting Number (and other information). Inbetween the "Countdown" must i show the Number on the sceen.
I tried hb_idleSleep(1) to wait one second. After that i want to show the new value.

DEFINE Window           // (in prev. Proc)
ACTIVATE Window Form_1  // (in prev. Proc)
PUBLIC cString := ""

-----------------------------
FUNCTION ShowScreen(NIL)
    LOCAL nCountdown := 500
    Form_1.Show                                                               // not working
    FOR XX = nCountdown TO 1 STEP -1                                          // Ok, so far
      hb_idleSleep( 1 )                                                   // is waiting so far
      Form_1.Label_44.Value := Transform(XX,"999")                       // not working
      Form_1.Label_44.Redraw                                             // not working!
      cString := MakeNew(6,RIGHT(STRZERO(XX),3))                         // to make new looking to "cString"
          SENDEN(cString)
    NEXT
    Form_1.Hide
RETURN (NIL)
   
still not working. Program stalls here.
It seems, that everything is fault?

AL67

unread,
Nov 14, 2022, 5:05:44 AM11/14/22
to Harbour Users

Let the system do what you want to change. Call DoEvents()

poniedziałek, 14 listopada 2022 o 10:49:12 UTC+1 juergen...@gmail.com napisał(a):
Hello guys, i´m using now minigui. My Problem is (for you) very simple, i think. I am developing an Windows application and i want to do the following:
Program starts and i want to have a Screen with a counting Number (and other information). Inbetween the "Countdown" must i show the Number on the sceen.
I tried hb_idleSleep(1) to wait one second. After that i want to show the new value.

DEFINE Window           // (in prev. Proc)
ACTIVATE Window Form_1  // (in prev. Proc)
PUBLIC cString := ""
 
FUNCTION ShowScreen(NIL)
    LOCAL nCountdown := 500
    Form_1.Show                                                               // not working
    FOR XX = nCountdown TO 1 STEP -1                                          // Ok, so far
      hb_idleSleep( 1 )                                                   // is waiting so far
      Form_1.Label_44.Value := Transform(XX,"999")                       // not working
 //      Form_1.Label_44.Redraw                                             // not working!
         DoEvents()
      cString := MakeNew(6,RIGHT(STRZERO(XX),3))                         // to make new looking to "cString"
          SENDEN(cString)
    NEXT
    Form_1.Hide
RETURN (NIL)
   
Adam

Pete

unread,
Nov 14, 2022, 5:14:11 AM11/14/22
to Harbour Users
Hi,
Perhaps you aren't aware, but there is a dediacate MiniGUI users-group
I'm sure you'd get a good answer there.
Anyhow, take a look at \MiniGUI\SAMPLES\BASIC\SPLASHDEMO_3
It'll probably give you an idea how to resolve your problem.

regards,
Pete

Ivanil Marcelino

unread,
Nov 25, 2022, 9:52:41 PM11/25/22
to harbou...@googlegroups.com
   ---------------------------
    FOR XX = nCountdown TO 1 STEP -1                                          // Ok, so far
      hb_idleSleep( 1 )                                                   // is waiting so far
      Form_1.Label_44.Value := Transform(XX,"999")                       // not working
      ****Form_1.Label_44.Redraw                                             // not working!

      cString := MakeNew(6,RIGHT(STRZERO(XX),3))                         // to make new looking to "cString"
          SENDEN(cString)
         DoEvents()
    NEXT
   ---------------------------


--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/6da700d9-81ce-4d21-977f-b46275818d7bn%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages