NetTalk Central

Author Topic: Hide Webcam after photo is taken  (Read 1880 times)

rjolda

  • Sr. Member
  • ****
  • Posts: 368
    • View Profile
    • Email
Hide Webcam after photo is taken
« on: May 21, 2025, 12:46:25 PM »
Hi all,
Using NT14.21 , Clarion11.
I have a form with a Display Field - DisplayPhoto which displays the photo when the picture is taken. 
On the same screen I have a TakePhoto button and a Webcam field which uses the environment Camera to take a photo (AON:ThisPicture)  and display it in the DisplayPhoto field.
My TakePhoto Button has the embed:
  p_web.SSV('PhotoDone', 'YES') ! we use this to display buttons - 1= we have taken picture -display ?Crop Photo button
 this button is set to Reset the valued of AON:ThisPicture ( which is the field equate that stores the picture)

My Webcam field (equate AON:ThisPicture) has the following hide statement:   p_web.GSV('PhotoDone') ='YES'

What I am finding is that the photo is taken and displays, the webcam display is gone and then the screen flickers and the webcam is back on display as if the webcam is set to ALWAYS display no matter what the programmer (like me) is trying to do.

Anyone with insights on this?
THanks,
Ron

Alberto

  • Hero Member
  • *****
  • Posts: 1887
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Hide Webcam after photo is taken
« Reply #1 on: May 21, 2025, 12:50:33 PM »
Hi, are you refreshing the AON:ThisPicture control when pressing the TakePhoto Button?
-----------
Regards
Alberto

rjolda

  • Sr. Member
  • ****
  • Posts: 368
    • View Profile
    • Email
Re: Hide Webcam after photo is taken
« Reply #2 on: May 21, 2025, 03:08:06 PM »
Yes, I am refreshing it.
Ron

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11310
    • View Profile
Re: Hide Webcam after photo is taken
« Reply #3 on: May 21, 2025, 05:52:31 PM »
>>  as if the webcam is set to ALWAYS display no matter what the programmer (like me) is trying to do.

*how* are you trying to make it "not display" ?


rjolda

  • Sr. Member
  • ****
  • Posts: 368
    • View Profile
    • Email
Re: Hide Webcam after photo is taken
« Reply #4 on: May 22, 2025, 02:06:17 AM »
Hi Bruce,
My Webcam field (equate AON:ThisPicture) has the following hide statement:
Hide if Clarion:  p_web.GSV('PhotoDone') ='YES'

I have the AON:ThisPicture value in the Reset box for TakePhoto button.  The Take Photo button also sets: p_web.SSV('PhotoDone') ='YES')

Ron

rjolda

  • Sr. Member
  • ****
  • Posts: 368
    • View Profile
    • Email
Re: Hide Webcam after photo is taken - SOLVED
« Reply #5 on: May 22, 2025, 07:45:05 AM »
HI
With Bruce's help I found out that the TakePicture button is dedicated to javascript which runs and WILL NOT SEND a value to the server. 
By putting the hide condition and then the refresh fields in the WEBCAM field!  That was the trick.
Ron