Author Topic: Removing the focus of the button  (Read 861 times)

siocnarf

  • Newbie
  • *
  • Posts: 24
Removing the focus of the button
« on: November 25, 2016, 08:11:00 pm »
Hi,

I have a Window with a single button. By default, it does seems the button has the focus. Is it a way to not have the focus on the button. I don't want someone pressing enter by mistake then closing inadvertendly the window...

Code: [Select]
MyDialogFormat=`WWWDLGED,6.2`
;To keep the window at top
IntControl(54,"",1,0,0)

;Where is running the script? Param1 is a text file containing various informations to run properly that script
Str_wbtdir = DirScript():param1
;Str_MessageFile="C:\Program Files\Organisation\InstTrousses\Trousses\Test1.0_Frv1\msg.txt"
handle=fileopen(Str_wbtdir,"READ")
Count=0

While @True
Line=FileRead(handle)
if Line =="*EOF*"
Break
Else
Count=count+1
Endif
If Count== 1
Str_MessageP=Line
Endif
If Count== 2
Str_MessageSec=Line
Endif
If Count== 3
Str_MessageEntete=Line
Endif
EndWhile
FileClose(Handle)

MyDialogCaption=Str_MessageEntete
MyDialogX=002
MyDialogY=060
MyDialogWidth=438
MyDialogHeight=136
MyDialogNumControls=004
MyDialogProcedure=`DEFAULT`
MyDialogFont=`Microsoft Sans Serif|9728|70|34`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,255|255|255`
MyDialogConfig=0

MyDialog001=`193,117,036,012,PUSHBUTTON,"PushButton_OK",DEFAULT,"OK",1,10,@csDefButton,DEFAULT,DEFAULT,DEFAULT`
MyDialog002=`003,009,414,060,STATICTEXT,"StaticText_2",DEFAULT,%Str_MessageP%,DEFAULT,30,DEFAULT,"Microsoft Sans Serif|8192|70|34",DEFAULT,"255|255|255"`
MyDialog003=`005,101,410,012,STATICTEXT,"StaticText_4",DEFAULT,"________________________________________________________________________________________",DEFAULT,40,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog004=`077,077,278,024,STATICTEXT,"StaticText_5",DEFAULT,"%Str_MessageSec%",DEFAULT,50,@csCenter,"Microsoft Sans Serif|8192|70|34","255|0|0","255|255|255"`

ButtonPushed=Dialog("MyDialog")