Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bitmap Resolution
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Bitmap Resolution
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01392582
Message ID:
01392582
Vues:
86
Hi All, I have an old "PrintScreen" utility which creates an in memory bitmap of the current VFP screen,copies it to the clipboard , creates an instance of Excel - which pastes the clipboard content into a new worksheet - and prints it ( all works perfectly ). I have been asked to sever the link with Excel and find another method.

This is what I've come up with
public bool PrintFromClipBoard(bool Landscape)
        {

            IDataObject d = Clipboard.GetDataObject();

            if (d.GetDataPresent(DataFormats.Bitmap))
            {
                m_PrintBitmap = (Bitmap)d.GetData(DataFormats.Bitmap);
                Print(Landscape);
                Clipboard.Clear();
            }

            return (true);
        }

static void Print(bool LandScape)
        {
            m_PrintDocument = new PrintDocument();
            m_PrintDocument.DefaultPageSettings.Landscape = LandScape;
            m_PrintDocument.PrintPage += new PrintPageEventHandler(PrintDocument_PrintPage);
            m_PrintDocument.Print();
        }
I can call this from VFP using COM - the problem I have is the resolution of the bitmap - if I use Excel I get a nice high res printout - using the method above the res is very low and the fonts look huge and ugly - any ideas as to why this is happening ?
Regards,
Peter J. Kane



Pete
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform