It was just an observation :~)
I got an unexpected coding failure on
iflag = iflag or v
- as you might in the general case if API SetWindowPos was expecting a
'long' flag value and you unexpectedly tried to pass it a null.
The only flags I regularly use in VB are the recordset open flags
dao.dbSeeChanges or dao.dbFailOnError.
When I have done bit operations in vb, I haven't wanted null propagation,
so the null propagation rules are important, and the exception for iflag=0
is an important case.
But I use '+' for bit operations in SQL, so I wouldn't object to somebody
using '+' for consistency
The msgbox flags are a special case :~) since most of the examples over
many years have used '+'
(david)
"Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:(E-Mail Removed)...
> True, but isn't that irrelevant when dealing with flag values?
>
> Msgbox "This is my message", vbOkOnly + vbInformation
>
> vs.
>
>
> Msgbox "This is my message", vbOkOnly Or vbInformation
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "david epsom dot com dot au" <david@epsomdotcomdotau> wrote in message
> news:(E-Mail Removed)...
> > If you use '+', you get null propagation
> >
> > ?2 + Null
> > Null
> >
> > If you use 'or', you don't get null propagation
> > except when you hit the special cases:
> >
> >
> > ?2 or Null
> > 2
> >
> > ?0 or Null
> > Null
> >
> > ?&HFFFF or Null
> > Null
> >
> > (david)
> >
> >
> > "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
> > news:(E-Mail Removed)...
> > > Or you can use Or, like in C:
> > >
> > > lngFlags= 1 Or 4 Or 32
> > >
> > >
> > > --
> > > Doug Steele, Microsoft Access MVP
> > > http://I.Am/DougSteele
> > > (no private e-mails, please)
> > >
> > >
> > > "Alex Dybenko" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > >> Hi,
> > >> you can just add necessary flags, like:
> > >>
> > >> lngFlags= 1+4+32
> > >>
> > >> --
> > >> Best regards,
> > >> ___________
> > >> Alex Dybenko (MVP)
> > >> http://alexdyb.blogspot.com
> > >> http://www.PointLtd.com
> > >>
> > >>
> > >> "Jezzepi" <(E-Mail Removed)> wrote in message
> > >> news:8ED97335-9395-452B-B972-(E-Mail Removed)...
> > >>> I'm attempting to use the API SetWindowPos. The last argument is
> Word:
> > >>> wFlags define as a long. It takes multiple flags separated in C by
> the
> > >>> or
> > >>> symbol | .
> > >>>
> > >>> How can I simulate this in VB?
> > >>>
> > >>> Any help is appreciated.
> > >>>
> > >>> J.
> > >>
> > >
> > >
> >
> >
>
>