How can I disable a Save button or Print Buttton after saving a form in Visualbasic 6.0
-
Please how can I disable a Save button after a user submits a form, the aim is to prevent user from modifying any changes after saving on the form in visual basic 6.0. Same with Print button, after a user prints a form, how can i disable the form so the user cannot print that particular form on the same visual basic 6.0. I will be so grateful for you response. Damian
-
Please how can I disable a Save button after a user submits a form, the aim is to prevent user from modifying any changes after saving on the form in visual basic 6.0. Same with Print button, after a user prints a form, how can i disable the form so the user cannot print that particular form on the same visual basic 6.0. I will be so grateful for you response. Damian
1. Stop using VB6 - it has not been supported for over 10 years 2. If you have to use VB6 you can disable a button by setting its enabled property to false
========================================================= I'm an optoholic - my glass is always half full of vodka. =========================================================
-
1. Stop using VB6 - it has not been supported for over 10 years 2. If you have to use VB6 you can disable a button by setting its enabled property to false
========================================================= I'm an optoholic - my glass is always half full of vodka. =========================================================
Thanks for the response. Meanwhile I am trying to upgrade to VB.net Pending when I wish to still ask based on your response. How do I write the VB code to set its enabled property to false only after saving/printing a form. The aim is to prevent user from modifying or printing same form. Thanks in advance
-
Thanks for the response. Meanwhile I am trying to upgrade to VB.net Pending when I wish to still ask based on your response. How do I write the VB code to set its enabled property to false only after saving/printing a form. The aim is to prevent user from modifying or printing same form. Thanks in advance
No, you disable the button BEFORE your code to save it or print it.
mySaveButton.Enabled = False
But, keep in mind that your code will not be able to stop a user from hitting the PrtScn button, pasting the screen shot into paint and printing it from there.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
Thanks for the response. Meanwhile I am trying to upgrade to VB.net Pending when I wish to still ask based on your response. How do I write the VB code to set its enabled property to false only after saving/printing a form. The aim is to prevent user from modifying or printing same form. Thanks in advance
Assuming your buttons are called btnPrint and btnSave, in their click events add the line
btnPrint.enabled = False
or
btnSave.enabled = False
========================================================= I'm an optoholic - my glass is always half full of vodka. =========================================================