Hi Martin ...
<g>
The FW_* constants are for working with logical fonts, so don't apply to
BitBlt in the context of a printscreen.(FW = Font Weight, and in working
with logical fonts you tell the system, on creating the font, how precise it
must match your input parameters, ie match weight as thin, ultrathin, bold,
extrabold, or 'don't care' .. just give me the closest matching font). IOW,
forget them.
Ditto SetBkMode (Set Back Mode - background mix mode of the specified device
context. The background mix mode is used with text, hatched brushes, and pen
styles that are not solid lines), and MulDiv (Multiple Divide - multiplies
two 32-bit values and then divides the 64-bit result by a third 32-bit
value. The return value is rounded up or down to the nearest integer.)
Again, those are used in indicating how the output will render (the stroke)
and in calculating point sizes for logical fonts.
--
Randy Birch
MVP Visual Basic
http://www.mvps.org/vbnet/
Please respond only to the newsgroups so all can benefit.
*** If you call the Sleep API in Bill's latest, will it have .NET dreams?
***
Quote:
> smill.freeserve.co.uk> writes
> >By the way, this stuff dumps the screen to the Windows clipboard, just
like
> >the PrtScreen key does (as you obviously already know). Sometimes, this
can
> >be a problem. If you would rather leave the Clipboard alone (which I
would
> >advise) and instead dump the screen directly to a hidden Autoredraw
Picture
> >Box then you can get a handle to the Screen and use BitBlt to do it.
> Mike, many thanks. Randy too, your posting has just appeared here.
> That's given me a start and I'll investigate. I've made some progress
> using a manual Print Screen.
> I looked up BitBlt in the Api Guide and in Examples found all sorts of
> funny things I just don't understand such as:-
> Const FW_DONTCARE = 0
> Const FW_THIN = 100
> Const FW_EXTRALIGHT = 200
> Const FW_LIGHT = 300
> Const FW_NORMAL = 400
> ...
> and
> Private Declare Function MulDiv Lib "kernel32" (ByVal nNumber As Long,
> ByVal nNumerator As Long, ByVal nDenominator As Long) As Long
> Private Declare Function SetBkMode Lib "gdi32" (ByVal hdc As Long, ByVal
> nBkMode As Long) As Long
> Private Declare Function GetSysColorBrush Lib "user32" (ByVal nI
> ...
> At that stage my legs went wobbly and I broke into a cold sweat :-)
> Regards.
> --
> Martin Trump