Search found 12 matches

by forgottencoder
Tue Aug 20, 2019 5:31 pm
Forum: Coding Questions
Topic: Animation [quality]
Replies: 19
Views: 5090

Re: Animation [quality]

Hi everyone

This is my best mojo so far. :D

To achieve best performance try to change delays values, x values and cnt values.



Enumeration
#win1
#box1
#bt1
#sp1
EndEnumeration

Global event

InitSprite()

If OpenWindow(#win1, 0, 0, 800, 600, "Side Menu", #PB_Window_SystemMenu | #PB_Window ...
by forgottencoder
Tue Aug 20, 2019 3:19 am
Forum: Coding Questions
Topic: Animation [quality]
Replies: 19
Views: 5090

Re: Animation [quality]

Hi

Made a small program. Don't know if this will help you. I tried. :D



Enumeration
#win1
#im1
#box1
#ig1
#bt1
EndEnumeration

Global event

If OpenWindow(#win1, 0, 0, 800, 600, "Side Menu", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)

ButtonGadget(#bt1, 10, 10, 120, 20, "Menu ...
by forgottencoder
Tue Aug 20, 2019 2:13 am
Forum: Coding Questions
Topic: Closing a window with the space key ?
Replies: 8
Views: 1857

Re: Closing a window with the space key ?

function GetAsyncKeyState_ is reacting to all space presses because if i pressed space inside a string gadget it exits window.

So sharing a possible solution.



Enumeration
#sg1
#sg2
EndEnumeration

Global eg, event

If OpenWindow(0, 0, 0, 800, 600, "Close window with <space> after pressing ...
by forgottencoder
Tue Aug 20, 2019 1:13 am
Forum: Coding Questions
Topic: Closing a window with the space key ?
Replies: 8
Views: 1857

Re: Closing a window with the space key ?

I continue to search in forum and i start seing a function called GetAsyncKeyState_
and codes like #VK_Control, #VK_F5 ... hum ... what if i can do something like this GetAsyncKeyState_(#VK_SPACE) ... let me try ... it worked ... wtf?
This must be Purebasic deep underground because i can't find this ...
by forgottencoder
Mon Aug 19, 2019 10:56 pm
Forum: Coding Questions
Topic: Closing a window with the space key ?
Replies: 8
Views: 1857

Closing a window with the space key ?

Hi everyone

Is it possible to close a window with the space key ?



Global event

If OpenWindow(0,0,0,800,600,"Close window with <space>",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
Repeat
event=WindowEvent()
Select event
Case #PB_Event_CloseWindow
End

; this next code is my ...
by forgottencoder
Sun Aug 18, 2019 5:19 pm
Forum: Coding Questions
Topic: [SOLVED] How to get the source file .pb directory ?
Replies: 3
Views: 1125

Re: How to get the source file .pb directory ?

Thanks infratec for pointing me in the right direction :D

Sharing a little code after activating IDE flag.

Code: Select all

directory$ = GetCurrentDirectory()
mypbipath$=directory$+"pbi"
Debug(mypbipath$)
by forgottencoder
Sun Aug 18, 2019 4:57 pm
Forum: Coding Questions
Topic: [SOLVED] How to get the source file .pb directory ?
Replies: 3
Views: 1125

[SOLVED] How to get the source file .pb directory ?

Hi everybody

1º source code is loaded from some directory in disk
2º Is there a way of getting the source file directory with code when you run the program with F5 ?

The goal is to do this automaticly and then add directories to it:

getsourcecodedir()+"pbi/test.pbi"

xincludefile instruction ...
by forgottencoder
Sun Aug 18, 2019 4:33 pm
Forum: Coding Questions
Topic: [SOLVED] Calling a window from another events problem
Replies: 5
Views: 1521

Re: Calling a window from another events problem

Thanks everybody for answers. Now i am on the right track. :D
by forgottencoder
Fri Aug 16, 2019 10:56 am
Forum: Coding Questions
Topic: [SOLVED] Calling a window from another events problem
Replies: 5
Views: 1521

[SOLVED] Calling a window from another events problem

Hi everyone

1º In window1 when i press "add 1" button it adds to textbox (it's working).
2º Then i open window2 and press "add 1" button and it adds to textbox in window1.
3º Then when i go back to window 1 and press "add 1" button it doesn't work anymore.

What i am doing wrong ? I don't want to ...
by forgottencoder
Sun Jul 21, 2019 11:28 am
Forum: Coding Questions
Topic: Command ProgramParameter not retrieving parameter ???
Replies: 5
Views: 1266

Re: Command ProgramParameter not retrieving parameter ???

So that's why. mk-soft i confirm that i was using a batch file with % to execute the program with parameter.
I went thru command line and it's working. Ta-Da. Learning everyday.

Thanks everybody for the help :)
by forgottencoder
Sun Jul 21, 2019 9:50 am
Forum: Coding Questions
Topic: Command ProgramParameter not retrieving parameter ???
Replies: 5
Views: 1266

Re: Command ProgramParameter not retrieving parameter ???

Not working on purebasic 5.70 32 bits.
by forgottencoder
Sun Jul 21, 2019 2:36 am
Forum: Coding Questions
Topic: Command ProgramParameter not retrieving parameter ???
Replies: 5
Views: 1266

Command ProgramParameter not retrieving parameter ???



;call your program test
;and type on command line "test %asa" and you will get "asa" not "%asa" for 1st parameter ???

OpenConsole()
Result$ = ProgramParameter(0)
PrintN(Result$)
Input()
CloseConsole()




I am using version 5.70 and windows 7 64bits. I forgot to mention earlier that i have ...