en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en nl en en en en nl en en en en en en en en en de en en en en nl en en en en en cs en en en nl en en en en nl en en en en en en en en en en en en en en nl en en en en cs en en en nl en en en en nl en en en en en en en en en en en de en en en fr en en en en en en en en en pt en en en en en en
By logging into your account, you agree to our Privacy Policy, personal data processing and storage practices as described therein.
Forgot password or user name?
Search in titles only Search in PowerBASIC for Windows only
You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Load and display bmp at run time
All Time Today Last Week Last Month
All Discussions only Photos only Videos only Links only Polls only Events only
Load and display bmp at run time
1 Aug 2009, 10:12 AM
I'm very new to PBWin 9 (just purchased it little over a week ago) and I have a question (so I will probably have a lot others in the next weeks ).
I know how to display and use images (bmp) when I load them in a resource file. This wouldn't be a problem.
However, what I want to do is be able to load and display a bitmap (bmp and/or jpg) at run time. I'm creating a small learning environment for my baby daughter and need to be able to add stuff (text and images) to it as she grows. The way I want to do this is by creating datafiles that will reference image files stored in the harddisk.
So I need to be able to, after reading the datafile, also load the corresponding image files and display on the screen.
In VB (6 and 2008 .Net) where I come from, this is no problem for me, in PBWin9 I can't find the appropriate code/commands for it.
Could someone point me in the right direction (I own PBWin9, PBForms 1.5 and GraphicTools 2.
Join Date: Apr 2007
1 Aug 2009, 10:28 AM
GRAPHIC BITMAP LOAD BmpName$, nWidth&, nHeight& [,stretch&] TO hBmp???
And welcome to PB.
In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.
Join Date: Jul 2009
4 Aug 2009, 03:08 AM
I've tried this code
I'm displaying text on a form (from an array) based following a click event on a 'forward or reverse' button.
LOCAL hImage AS DWORD IF intcurnum > intcounter THEN intcurnum = 1 ELSEIF intcurnum < 1 THEN intcurnum = intcounter END IF intpointer = intcurnum CONTROL SET TEXT hDLG, %lblCharacter, strCharacter(intCurNum) 'Display text CONTROL SET TEXT hDLG, %lblPinyin, strMeaning(intCurNum) 'Display text CONTROL SET TEXT hDLG, %lblWord, strMeaning(intCurNum) 'Display text GRAPHIC BITMAP LOAD "data\images\aap.bmp" ,0,0,0 TO hImage 'For test purposes one fixed file name. Folder is offset from current application folder. Image exists GRAPHIC ATTACH hDLG, %imgImage, REDRAW DIALOG DOEVENTS
But this doesn't give me a result . I don't get error messages and the code is executed when I step through it, but no image is displayed.
The image control has the 'vissible' property set to true
Join Date: Apr 2007
4 Aug 2009, 04:51 AM
Try the GRAPHIC RENDER statement.
If you post that compiles and runs and shows the problem it's easier to give help on the problem.
In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.
Join Date: Jul 2009
4 Aug 2009, 04:55 AM
Originally posted by Rodney Hicks View Post
Try the GRAPHIC RENDER statement.
If you post that compiles and runs and shows the problem it's easier to give help on the problem.
Just found another (better??) solution : I also have graphic Tools Pro and the gfx window there does exactly what I want.
Copyright © 1998-2022 PowerBASIC Tools, LLC - All Rights Reserved.
Powered by vBulletin® Version 5.7.0
Copyright © 2022 vBulletin Solutions, Inc. All rights reserved.
All times are GMT-5. This page was generated at 04:13 AM.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.