Windows

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
izidor
Veteran
Posts: 110
Joined: Wed Apr 22, 2009 3:13 am
Contact:

Windows

Post by izidor »

It's me again! (who would say)

I am having trouble with PUT statement and I really can't (i do not know how, English isn't my mother language) explain what is the problem so if anyone has some time to look at it I'd be really thankful.


QB64 code!

Code: Select all

SCREEN 9

LINE (100,100)-(300,200),2,BF
GET (100,100)-(300,200),window
CLS
LINE (0,0)-(640,390),1,BF
GET (0,0)-(639,349),back
CLS
PUT (0,0),back,pset

DO
DO WHILE _MOUSEINPUT
IF _MOUSEBUTTON(1) then

PUT (0,0),back,pset
PUT (__MOUSEX,_MOUSEY),window,pset
CLS
PUT (0,0),back,pset
PUT (__MOUSEX,_MOUSEY),window,pset

end if

LOOP
LOOP
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

Shouldn't you be using the same coordinates for your back as you do for your window? Also, why are you doing cls and then using the exact same code a second time?
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

I sorta like how this place changes the QB64 _ M O U S E X command to _MOUSEX.

You would think that _MOUSEX would not be a good word here :P
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
izidor
Veteran
Posts: 110
Joined: Wed Apr 22, 2009 3:13 am
Contact:

Post by izidor »

@Nodtvedit

I am sorry but really do not understand it ("
Shouldn't you be using the same coordinates for your back as you do for your window?"),why would be need to move a window if it is big as the whole screen?


@burger2227

Yeah, it's very strange.

Are people from phpBB group perverts? :)
User avatar
coma8coma1
Veteran
Posts: 100
Joined: Sat Dec 08, 2007 5:29 pm
Location: Maryland, USA

Post by coma8coma1 »

don't we first have to define an array to store the GETted data in?
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

LOL at GETTed :P

You are right though. I assumed he had done that before the code he submitted.

He actually uses 2 arrays not shown.

Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

Maybe this forum needs a QB64-specific subforum...
Post Reply