Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Other Programming   »   liberty basic "drawbmp" command is acting up

Answer this Question
Ask about Other Programming
 
Question Tools Search this Question Display Modes
Question
 
 
#1  
Old Jan 3, 2007, 04:48 AM
rrr
Junior Member
rrr is offline
 
Join Date: Jan 2007
Posts: 94
rrr See this member's comment history on his/her Profile page.
liberty basic "drawbmp" command is acting up

i use xp home edition and have liberty basic v.4.03
the code goes like folowing:

loadbmp "bmpname", "bmppath"
graphicbox #window.graphicbox, 5, 5, 447, 511
open "window" for dialog_popup as #window
print #window.graphicbox "drawbmp bmpname 0 0" <-- error in this line
wait

i have dimesioned the window and trapped the close event but the liberty basic says "no bitmap named bmpname. i have checked the path, and it is correct. what the !!!! is going on?


Reply With Quote
 
     

Answers
 
 
Old Jan 3, 2007, 05:32 AM   #2  
LTheobald
Ultra Member
LTheobald is offline
 
LTheobald's Avatar
 
Join Date: Feb 2004
Location: Cambridge, UK
Posts: 1,090
LTheobald See this member's comment history on his/her Profile page.LTheobald See this member's comment history on his/her Profile page.
Call LTheobald via Skype™ Send a message via MSN to LTheobald
Hey RRR,

I've not touched Basic before but I'll give this shot. What kind of path are you putting in the loadbmp line? It should be fully qualified, e.g:

Code:
loadbmp "copyimage", "bmp\copy.bmp"
or
Code:
loadbmp "copyimage", "C:\bmp\copy.bmp"

The code you supplied says "bmpath" which won't be valid.
  Reply With Quote
 
     
 
 
Old Jan 3, 2007, 05:36 AM   #3  
rrr
Junior Member
rrr is offline
 
Join Date: Jan 2007
Posts: 94
rrr See this member's comment history on his/her Profile page.
sorry for that syntax error i mean to type
loadbmp "bmpname", path$
(the $ sign makes it a string variable if you didn't know)
where path$ is "C:\Documents and Settings\username\my documents\bmps\abmpfile.bmp"
  Reply With Quote
 
     
 
 
Old Jan 3, 2007, 05:42 AM   #4  
rrr
Junior Member
rrr is offline
 
Join Date: Jan 2007
Posts: 94
rrr See this member's comment history on his/her Profile page.
here is the actual code used. the purpose of this program was to show all th bmpfiles in a directory like a slideshow. yes, i know, i could have used some other solution, BUT, i need to know what went wrong.

Code:
cinematic$="cinematic 1" 'nomainwin dim arrayName$(40, 40) files DefaultDir$+"\"+cinematic$, arrayName$() times=val(arrayName$(0, 0)) num=times maxnum=num [loadmoviebmp] while times > 0 if right$(arrayName$(times, 0), 3) = "bmp" then loadbmp DefaultDir$+"\"+cinematic$+"\"+arrayName$(times, 0), DefaultDir$+"\"+cinematic$+"\"+arrayName$(times, 0) end if num=num-1 times=times-1 wend maxnum=num WindowWidth = 526 WindowHeight = 514 UpperLeftX=int((DisplayWidth-WindowWidth)/2) UpperLeftY=int((DisplayHeight-WindowHeight)/2) graphicbox #cin.dis, 5, 5, 511, 477 open "game cinematic" for dialog_popup as #cin print #cin.dis, "down; fill white; flush" print #cin, "font ms_sans_serif 10" print #cin, "trapclose [unloadmovie]" print #cin.dis, "color black ; place 10 45 ; font arial 40" print #cin.dis, "\Right-click to " #cin.dis, "place 10 100" #cin.dis, "\continue" #cin.dis, "when leftButtonDown [movieinput]" num=maxnum wait [movieinput] print str$(num) if right$(arrayName$(num, 0), 3) = "bmp" and num <> 8 then print DefaultDir$+"\"+cinematic$+"\" ; arrayName$(times, 0) print #cin.dis, "drawbmp " ; DefaultDir$+"\"+cinematic$+"\" ; arrayName$(times, 0) ; ".bmp 11 11" else num=num+1 end if wait [unloadmovie] num=0 while num > val(arrayName$(0, 0)) if right$(arrayName$(num, 0), 3) = "bmp" then unloadbmp str$(num) end if num=num+1 wend
  Reply With Quote
 
     
 
 
Old Jan 11, 2007, 12:18 PM   #5  
Carl Gundel
New Member
Carl Gundel is offline
 
Join Date: Jan 2007
Posts: 2
Carl Gundel See this member's comment history on his/her Profile page.
Hi,

The trouble seems to be that you have a space in the pathname. Parsing for the graphics commands delimits by spaces so the drawbmp command is looking for a bitmap named:

C:\Documents

Try making a folder without spaces (perhaps c:\myimages) and put the images in there.

-Carl Gundel, author of Liberty BASIC
Liberty BASIC - Easy Programming for Windows

Comments on this post
rrr agrees: thanks
  Reply With Quote
 
     
 
 
Old Jan 15, 2007, 02:04 AM   #6  
rrr
Junior Member
rrr is offline
 
Join Date: Jan 2007
Posts: 94
rrr See this member's comment history on his/her Profile page.
aha. thank you *bows and slaps own face*
  Reply With Quote
 
     
Answer this Question
Ask about Other Programming


Question Tools Search this Question
Search this Question:

Advanced Search
Display Modes

 
Similar Sponsors

Similar Questions
Question Asker Topic Answers Last Post
pink pill with "watson" and "502" on it lwagoner Medications 2 Jan 21, 2008 09:59 PM
Fan Blower not working in "ON" or "AUTO" in heat or AC phelixu Heating & Air Conditioning 4 Aug 4, 2007 08:43 PM
Heater blows cold when "On", not at all on "Auto" mcdisney Heating & Air Conditioning 1 Nov 13, 2006 04:27 PM
difference between "htm" and "html" wzartv HTML 3 Jul 22, 2005 05:48 AM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 02:14 PM.

Content Relevant URLs by vBSEO 3.0.0 RC6 © 2006, Crawlability, Inc.