Loading ...
Sorry, an error occurred while loading the content.
 

Re: [libertybasic] drawbmp

Expand Messages
  • Sarmed N.
    Thank you very much. ________________________________ From: Stefan Pendl To: libertybasic@yahoogroups.com Sent: Wednesday, August 29,
    Message 1 of 6 , Aug 30, 2012
      Thank you very much.



      ________________________________
      From: Stefan Pendl <pendl2megabit@...>
      To: libertybasic@yahoogroups.com
      Sent: Wednesday, August 29, 2012 10:24 PM
      Subject: Re: [libertybasic] drawbmp


       
      Am 29.08.2012 16:58, schrieb Sarmed N.:
      > The example works,
      > The reason was a SPACE!
      >
      > Thank you Stefan.
      >

      Yes, missing a space is annoying and you can miss one easily.
      That's the important thing I don't like about the command strings.

      You could create a custom function:

      function MyDrawBMP$(Image$, PosX, PosY)
      MyDrawBMP$ = "drawbmp "; Image$; " "; PosX; " "; PosY
      end function

      You would use it as:

      #window.graphic MyDrawBMP$("image", 10, 200)

      A function is so much easier to use with arguments, than concatenating
      variables and literals.

      --
      Stefan Pendl
      http://stefanpendl.runbasichosting.com/

      LB 4.04 Pro ... http://www.libertybasic.com/assist.html
      LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

      LB Community Wiki .............. http://basic.wikispaces.com/
      LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
      LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

      Books at http://www.lulu.com/ and http://www.amazon.com/
      Alyce Watson ... APIs for Liberty BASIC
      Carl Gundel .... Beginning Programming with Liberty BASIC

      Windows 7 Home Premium 64-bit SP1
      AMD Turion X2 RM-70 2GHz, 4GB RAM



      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.