I am new to PB.
My primary language is not US/UK. I am using Google Translate.
What solutions when using DisableGadget/DisableWindow without causing the window are not respoding ?
Why is the window frozen "Not Responding"
-
- User
- Posts: 97
- Joined: Wed Nov 16, 2022 1:51 pm
Why is the window frozen "Not Responding"
Last edited by hoangdiemtinh on Fri May 24, 2024 12:42 pm, edited 1 time in total.
PC: Windows 10 x64, 8GB RAM. PB ver: 6.x
--
I love PB5 vs PB6
--
I love PB5 vs PB6

Re: Why do I use DisableGadget/DisableWindow, immediately encounter "Not Responding" problem.
I use double check (screenshot)hoangdiemtinh wrote: Wed May 22, 2024 4:14 am I am new to PB.
My primary language is not US/UK. I am using Google Translate.
QTranslate, Crow Translate (Linux), s3_translator (Alt+V)
show your examplehoangdiemtinh wrote: Wed May 22, 2024 4:14 am Why do I use DisableGadget/DisableWindow, immediately encounter "Not Responding" problem.
are you using the call on another thread?
-
- User
- Posts: 97
- Joined: Wed Nov 16, 2022 1:51 pm
Re: Why is the window frozen "Not Responding"
Before that command, there are the following commands:
mainWin then show "Not Responding" , freeze...
Code: Select all
#SHA1_ISO = "9989F522934D032C01BS4B1EAB2459CDB93C05TF"
Procedure.s get_SHA1(fn.s)
UseSHA1Fingerprint()
Protected.s sha1
sha1 = FileFingerprint(GetCurrentDirectory() + fn, #PB_Cipher_SHA1)
ProcedureReturn sha1
EndProcedure
Procedure.I check_SHA1()
Protected.s ss, yy
ss = get_SHA1(GetCurrentDirectory() + "my-iso.iso") ; this file is 5GB size
yy = #SHA1_ISO
If CompareMemoryString(@ss, @yy, #PB_String_NoCaseAscii) ! #PB_String_Equal
ProcedureReturn #False
EndIf
ProcedureReturn #True
EndIf
EndProcedure
...................
.....................
Repeat
ev_WINDOW = WaitWindowEvent()
Select EventWindow()
;
Case #mainWin
Select ev_WINDOW
Case #PB_Event_Gadget
Select EventGadget()
Case #Button_CHECK_SHA1
If check_SHA1() = $False
MessageRequester(":(", "SHA1 does not match.")
EndIf
..........................
............
PC: Windows 10 x64, 8GB RAM. PB ver: 6.x
--
I love PB5 vs PB6
--
I love PB5 vs PB6

Re: Why is the window frozen "Not Responding"
If no events come to the window within a couple of minutes, the window becomes frozen. Try running the task in a thread.
You can read the file in chunks - StartFingerprint(). And between reading, poll window events.
You can read the file in chunks - StartFingerprint(). And between reading, poll window events.
-
- User
- Posts: 97
- Joined: Wed Nov 16, 2022 1:51 pm
Re: Why is the window frozen "Not Responding"
PC: Windows 10 x64, 8GB RAM. PB ver: 6.x
--
I love PB5 vs PB6
--
I love PB5 vs PB6
