Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.basic.visual.misc > #1073
| From | Schmidt <sss@online.de> |
|---|---|
| Newsgroups | comp.lang.basic.visual.misc |
| Subject | Re: Displlay png in VB6 ? |
| Date | 2012-05-09 14:55 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <jodpga$h65$1@speranza.aioe.org> (permalink) |
| References | <g4bkq7l7pr4o8ultg59rnjk8cupsigpd0f@4ax.com> |
Am 09.05.2012 10:37, schrieb scbs29: > does anyone know of a free control or whatever to display > png images on a form in vb6 ? The vbRichClient4-Framework (consisting of 3 free Dlls) can do that for you, in a very reliable way (no memory-leakage, no GDI-resource-Handles are used, etc.). And since there's no UserControl necessity involved (the Png-Loading and rendering can finally be done directly against a Form.hDC - also for multiple Png-Images, overlayed with each other, including Alpha-transparencies and what not) - you can code all your stuff more or less completely "windowless" (no Extra-Hwnds or other GDI-Handles as e.g. DIB-Handles need to be used). www.datenhaus.de/Downloads/vbRC4BaseDlls.zip (about 2MB, please keep the 3 Dlls always together in a Folder - only vbRichClient4.dll needs to be registered) Here are some Demos for this cairo-based Mini-framework: An extensive cairo-Tutorial (organized in 24 SubFolders): www.datenhaus.de/Downloads/RC4cairoTutorial.zip Maybe take a look at Demo #8, as well as Demos #12 and #15, to see how to deal with different Image-Shapes. And a small Widget-Demo, incorporating not only a new Usercontrol-Engine for VB6 but also a new Unicode-FormEngine (no VB-*.frm or *.ctl are needed, only *.bas and *.cls) www.datenhaus.de/Downloads/RC4WidgetDemo.zip As for your "Out of Memory-Errors" - these can (as said) also happen, when the Application runs out of GDI-Handles. But at least *that* cause is completely "out of the game" when using the RichClient4-Dlls. But a loaded Png-Image-Resource will need "normal Memory" of course (Widht x Height x 4Byte per Image) ... so in case you want to keep "hundreds" of relatively large Png-Images "cached" in your Application - this could in sum amount to about 100MB or more - not sure if that is the case, or what the amount of RAM was on your "Notebook in question". Just ask here, if you find that approach basically interesting (but get stuck somewhere, whilst adapting some of the Demos VBCode to your needs) - I'm sure I can help in this case, especially when you already post some Code-Snippets which demonstrate or describe a possible problem. Olaf
Back to comp.lang.basic.visual.misc | Previous | Next — Previous in thread | Next in thread | Find similar
Displlay png in VB6 ? scbs29 <scbs29@fred.talktalk.net> - 2012-05-09 09:37 +0100 Re: Displlay png in VB6 ? Schmidt <sss@online.de> - 2012-05-09 14:55 +0200 Re: Displlay png in VB6 ? "Mayayana" <mayayana@invalid.nospam> - 2012-05-11 23:56 -0400
csiph-web