cadencii.windows.forms.RebarBand.UpdatePicture C# (CSharp) Method

UpdatePicture() protected method

protected UpdatePicture ( ) : void
return void
        protected void UpdatePicture() {
            if ( Created ) {
                REBARBANDINFO rbBand = new REBARBANDINFO();
                rbBand.cbSize = (uint)Marshal.SizeOf( rbBand );
                rbBand.fMask = (uint)win32.RBBIM_BACKGROUND;
                rbBand.hbmBack = _pictureHandle;

                if ( win32.SendMessage( _bands.Rebar.RebarHwnd, (int)win32.RB_SETBANDINFOA, BandIndex, ref rbBand ) == 0 ) {
                    int LastErr = Marshal.GetHRForLastWin32Error();
                    try {
                        Marshal.ThrowExceptionForHR( LastErr );
                    } catch ( Exception ex ) {
                        Console.WriteLine( LastErr + " " + ex.Message );
                        if ( _throwExceptions ) throw (new Exception( "Error Updating Background.", ex ));
                    }

                }
            }

        }