Hello Guest it is January 28, 2020, 09:28:24 AM

Author Topic: Why Dialogbox is flashing  (Read 1219 times)

0 Members and 1 Guest are viewing this topic.

Why Dialogbox is flashing
« on: March 27, 2010, 02:06:24 PM »
Hi,

i wrote a small code for some kind of touch-screen-functionality.
Works really well, but everytime a button is pressed the Dialogbox-Window is "flashing".

Is there any way to stop this flashing of the box?

Thank You!

Code:

Dim Eingabe As String

Begin Dialog Maintdlg1 10,10, 350,200, "Zahlenwert Eingeben X="
     
      TEXT 10,24, 50,12, "Wert X:"
      TEXTBOX 60, 22, 280, 12,.nameStr
      'OKBUTTON 80, 54, 40, 12,.okbtn
      'OPTIONBUTTON 130, 80, 40, 12,"0"
     
      PUSHBUTTON 20, 160, 40, 18,"0"
         
      PUSHBUTTON 20, 130, 40, 18,"1"
      PUSHBUTTON 80, 130, 40, 18,"2"
      PUSHBUTTON 140, 130, 40, 18,"3"
     
     
      PUSHBUTTON 20, 100, 40, 18,"4"
      PUSHBUTTON 80, 100, 40, 18,"5"
      PUSHBUTTON 140, 100, 40, 18,"6"
     
      PUSHBUTTON 20, 70, 40, 18,"7"
      PUSHBUTTON 80, 70, 40, 18,"8"
      PUSHBUTTON 140, 70, 40, 18,"9"
     
      PUSHBUTTON 80, 160, 40, 18,"."
     
      PUSHBUTTON 140, 160, 40, 18,"ENT"
     
     
      PUSHBUTTON 200, 160, 40, 18,"+"
     
      PUSHBUTTON 260, 160, 40, 18,"-"
     
     
     
      End Dialog
 
  Dim Maintbox As Maintdlg1                 
      Do
       
 
       'Dialog Maintbox
       
       button = Dialog (Maintbox)
       
       If button < 11 Then
       
       Maintbox.nameStr = Maintbox.nameStr & button -1
       
       Else
       
       If button = 11 Then
       
       Maintbox.nameStr = Maintbox.nameStr & "."
       
       End If
       
       If button = 13 Then ' "+"
       
       
       If Left(Maintbox.nameStr,1)="+" Or Left(Maintbox.nameStr,1)="-" Then
     
      Maintbox.nameStr = Right(Maintbox.nameStr, Len(Maintbox.nameStr)-1) '### Vorzeichen löschen
       
       End If
       
                 
       Maintbox.nameStr = "+" & Maintbox.nameStr
       
       End If
       
       
        If button = 14 Then ' "-"
       
        If Left(Maintbox.nameStr,1)="+" Or Left(Maintbox.nameStr,1)="-" Then
     
      Maintbox.nameStr = Right(Maintbox.nameStr, Len(Maintbox.nameStr)-1) '### Vorzeichen löschen
       
       End If

                 
       Maintbox.nameStr = "-" & Maintbox.nameStr
       
       End If

       
             
       
       
       End If
       
           
      Loop Until button=12
     
      Eingabe = Maintbox.nameStr
     
       
      SetDro(0,Val(Maintbox.nameStr))