[AccessD] Rocky--re OnPaint

Stuart McLachlan stuart at lexacorp.com.pg
Wed Jan 17 17:34:13 CST 2024


I've never thought of doing that, but I can think of a few situations where a transparent 
button in the tab order of a section of a form would have been useful.

Thanks, I'm going to add that to my "bag of tricks".


On 18 Jan 2024 at 10:15, Darren - Active Billing wrote:

> with regards a button's transparent property, I use it on nearly every
> form
> 
> Although with regards the Continuous forms I only learned it at the
> end of last year
> 
> With Transparent - On every form I produce I set up a button that does
> nothing. 
> 
> Set its visible property to true
> Set its transparent property to true
> Put it in the top most left corner and call it "TabBlank".
> And Set it´s Tab number property to Zero
> So as soon as a page opens it has the focus.
> and I drop this on each form that has this "TabBlank" button
> 
> Private Sub TB()
> Me.TabBlank.SetFocus
> End Sub
> 
> 
> Back in the day people would often push the space bar a few times to
> bring PCs out of Screen saver (Well some regular users I had, used to
> do that at least :-) ) If on the odd chance a field was ´selected´
> then the data would be removed accidentally. Often unknowingly
> 
> So that´s was the genesis of that.
> But it also serves me well when the time comes to finish a procedure
> or a routine I set the cursor (SetFocus) often back to this hidden
> button by just typing "TB" Or for a variety of reasons moving the
> cursor 'out of the way' or to a safe 'parking' place I often have
> fields that I don´t want the focus on so for those I add "TB" to the
> GotFocus other things too Maybe a bit un-necessary...but useful (IF
> that´s such a thing)
> 
> And I agree - Always learning
> 
> ----------------------------------------
> 
> > On 18 Jan 2024, at 1:55am, Rocky Smolin <rockysmolin2 at gmail.com>
> > wrote:
> > 
> > Well, I got a kludge that works for the client - trying to update
> > the option frame when the header is true results in no change to the
> > option group. To the user it appears that the group is disabled.
> > Except not faded.
> > 
> > Since the header record background is already a lovely purple pastel
> > there´s not reason why they should try to edit the option group on
> > a header record. It would only be if they did it by error.
> > 
> > But thanks all for your help. After 25+ years programming Access, I
> > learned a new property - transparent.
> > 
> > R
> > 
> > On Tue, Jan 16, 2024 at 9:43PM Stuart McLachlan
> > <stuart at lexacorp.com.pg> wrote:
> > 
> >> For other types of controls, BackStyle is as close as you will get,
> >> but it's not exactly the same
> >> 
> >> On 17 Jan 2024 at 15:34, Stuart McLachlan wrote:
> >> 
> >>> Yep, only buttons:
> >>> 
> >>> https://learn.microsoft.com/en-us/office/vba/api/access.navigation
> >>> butt on.transparent
> >>> 
> >>> 
> >>> On 17 Jan 2024 at 15:29, Stuart McLachlan wrote:
> >>> 
> >>>> AFAIK, buttons are the only controls with a transparent property.
> >>>> 
> >>>> It is commonly used for placing the button over an image or
> >>>> formatted label, effectively making the button "look good".
> >>>> (Alternatively, you can think of it as making the label or image
> >>>> clickable)
> >>>> 
> >>>> Not much use for anything else :(
> >>>> 
> >>>> 
> >>>> On 16 Jan 2024 at 19:47, Rocky Smolin wrote:
> >>>> 
> >>>>> Thanks for that Jack. I did not know about the transparent
> >>>>> property, even after 25 years of access programming. I am on the
> >>>>> road for a few days, but when I get back I´m going to see if
> >>>>> that is a little more elegant approach. I could put a text box
> >>>>> over the Option frame with the back color of the text box, the
> >>>>> same as the detail section. Then make it visible or not
> >>>>> depending On the value of the header checkbox.
> >>>>> 
> >>>>> Will let you know what I find.
> >>>>> 
> >>>>> Best,
> >>>>> 
> >>>>> r
> >>>>> 
> >>>>> On Tue, Jan 16, 2024 at 4:14PM jack drawbridge
> >>>>> <jackandpat.d at gmail.com> wrote:
> >>>>> 
> >>>>>> Rocky,
> >>>>>> I just saw this post today and did see you had a recent post in
> >>>>>> AccessD. I am sending this link in case it may be helpful in
> >>>>>> resolving your recent issue.
> >>>>>> 
> >>>>>> https://www.access-programmers.co.uk/forums/threads/button-visi
> >>>>>> b le -i nvisible-in-a-continuous-form.281824/post-1682970
> >>>>>> 
> >>>>>> Jack
> >>>>>> --
> >>>>>> AccessD mailing list
> >>>>>> AccessD at databaseadvisors.com
> >>>>>> https://databaseadvisors.com/mailman/listinfo/accessd
> >>>>>> Website: http://www.databaseadvisors.com
> >>>>>> 
> >>>>> --
> >>>>> AccessD mailing list
> >>>>> AccessD at databaseadvisors.com
> >>>>> https://databaseadvisors.com/mailman/listinfo/accessd
> >>>>> Website: http://www.databaseadvisors.com
> >>>> 
> >>>> 
> >>>> --
> >>>> AccessD mailing list
> >>>> AccessD at databaseadvisors.com
> >>>> https://databaseadvisors.com/mailman/listinfo/accessd
> >>>> Website: http://www.databaseadvisors.com
> >>>> 
> >>> 
> >>> 
> >>> --
> >>> AccessD mailing list
> >>> AccessD at databaseadvisors.com
> >>> https://databaseadvisors.com/mailman/listinfo/accessd
> >>> Website: http://www.databaseadvisors.com
> >>> 
> >> 
> >> 
> >> --
> >> AccessD mailing list
> >> AccessD at databaseadvisors.com
> >> https://databaseadvisors.com/mailman/listinfo/accessd
> >> Website: http://www.databaseadvisors.com
> >> 
> > -- 
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com




More information about the AccessD mailing list