PureFORM 1.99 (yet another FORM designer)

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Setting a parent window other than the main window?

Post by gnozal »

jassing wrote:I have a pureform project with 1/2 dozen windows.
Window#1 is defined as main.
When I open up window#2 (not a child window); it can then open up window#3 -- I want this window to have window#2 as parent, not Window#1 -- is there a way to do it pureform so I don't have to change it in the source?
No, you may only have one main window.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
jassing
Addict
Addict
Posts: 1745
Joined: Wed Feb 17, 2010 12:00 am

Re: Setting a parent window other than the main window?

Post by jassing »

gnozal wrote:No, you may only have one main window.
Hmm. I am able to have multiple "main" windows, but it only will let me set windows to be child of one.
Maybe a wish list?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Setting a parent window other than the main window?

Post by gnozal »

jassing wrote:
gnozal wrote:No, you may only have one main window.
Hmm. I am able to have multiple "main" windows, but it only will let me set windows to be child of one.
You may only have one main window.
The other windows may be child windows (of the main window) or not ('Toggle child window' in 'Project' menu).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
jassing
Addict
Addict
Posts: 1745
Joined: Wed Feb 17, 2010 12:00 am

Re: PureFORM 1.99 (yet another FORM designer)

Post by jassing »

I found a work around where I can set the window to be a child of another after the window is created...
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

Code infusion and CR

Post by Maitre_Kanter »

Hello,

I'm using Pureform (without JaPBe), in code infusion,
when I put a CR as below :

Code: Select all

Line1

Line2
and I save as PB file using Pureform, the CR between line1 and line 2 is missing.

When I edited the generated PB file, I notice that only one CR is present (the one after Line1).

Arnaud.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Code infusion and CR

Post by gnozal »

Maitre_Kanter wrote:Hello,

I'm using Pureform (without JaPBe), in code infusion,
when I put a CR as below :

Code: Select all

Line1

Line2
and I save as PB file using Pureform, the CR between line1 and line 2 is missing.

When I edited the generated PB file, I notice that only one CR is present (the one after Line1).

Arnaud.
Should be fixed in build 437.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

Re: PureFORM 1.99 (yet another FORM designer)

Post by Maitre_Kanter »

[FIXED] : Code Infusion and CR

Thank you Monsieur !
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

PureFORM 1.99 - F5 KeyPress (WM_KEYUP vs WM_KEYDOWN)

Post by Maitre_Kanter »

Hi Gnozal,

Is it possbile to detect F5 to activate Build Mode / Preview Mode with WM_KEYDOWN.

The Event WM_KEYDOWN appears many times when I press F5 during seconds.

The problem can be corrected using WM_KEYUP instead of WM_KEYDOWN.

Kanter.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureFORM 1.99 - F5 KeyPress (WM_KEYUP vs WM_KEYDOWN)

Post by gnozal »

Maitre_Kanter wrote:Is it possbile to detect F5 to activate Build Mode / Preview Mode with WM_KEYDOWN.
Actually, the keys are detected with GetAsyncKeyState_() in the main loop, with a minimum of 50 ms between 2 keystrokes.
I don't remember why (2006 !), but it was the best solution at the time.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
jassing
Addict
Addict
Posts: 1745
Joined: Wed Feb 17, 2010 12:00 am

getting "toggle child window" to stick?

Post by jassing »

Is it possible to get "Toggle child window" to stick between sessions?

while editing a project, I am always going to to screen where I do not want to have a parent defined and select "toggle child window" -- is there a way to get this preference to 'stick'?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: getting "toggle child window" to stick?

Post by gnozal »

jassing wrote:Is it possible to get "Toggle child window" to stick between sessions?
while editing a project, I am always going to to screen where I do not want to have a parent defined and select "toggle child window" -- is there a way to get this preference to 'stick'?
It does "stick" here.
The [Main Window], [Child Window] and 'non child window' status is saved with the form (*.pbf file) [if a main window is defined].
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

Re: PureFORM 1.99 (yet another FORM designer)

Post by Maitre_Kanter »

gnozal wrote:Actually, the keys are detected with GetAsyncKeyState_() in the main loop, with a minimum of 50 ms between 2 keystrokes.
I don't remember why (2006 !), but it was the best solution at the time.
see below a little piece of code for Keystroke management using GetAsyncKeyState_ API :

Code: Select all

;- enumeration (Windows)
#KF_UP       =       $8000
#KF_RECENTLY_PRESSED = $0001

;- enumeration (Owner)
#KEY_UP = 0
#KEY_DOWN  = 1
#KEY_STILL_DOWN  = 2

;- Globals
Global    F5_KeyCurrentState.u
Global    F5_KeyTrigger.i

OpenWindow( 0 , 20 , 20 , 20 , 20 , "Test KeyUp" )

;{- Event loop
Repeat
  ;:PureFORM:Loop:Start:
  Delay(1)
  
  WaitWindowEvent()
  
  F5_KeyCurrentState = GetAsyncKeyState_(#VK_F5)
      
  If ( F5_KeyCurrentState > 0 )
  
    Select ( F5_KeyCurrentState & (#KF_UP | #KF_RECENTLY_PRESSED ))
      Case #KF_UP | #KF_RECENTLY_PRESSED
        F5_KeyTrigger = #KEY_DOWN
      Case #KF_UP
        F5_KeyTrigger = #KEY_STILL_DOWN    ;repeat     
    EndSelect
  Else
    If ( F5_KeyTrigger >= #KEY_DOWN )
      F5_KeyTrigger = #KEY_UP
      Debug "#KEY_UP" 
    EndIf
  EndIf      
      
  ;:PureFORM:Loop:End:
ForEver      
"KEY_UP" appears only when F5 is released.
Last edited by Maitre_Kanter on Wed Dec 05, 2012 10:12 am, edited 1 time in total.
jassing
Addict
Addict
Posts: 1745
Joined: Wed Feb 17, 2010 12:00 am

Re: getting "toggle child window" to stick?

Post by jassing »

gnozal wrote:The [Main Window], [Child Window] and 'non child window' status is saved with the form (*.pbf file) [if a main window is defined].
bummer, because everytime I open it; I have to re-toggle it off.

Has happened in at least 3 project files...

Is there a way to copy objects & code to a new window/project? Or would I need to recreate the project?

thanks.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureFORM 1.99 (yet another FORM designer)

Post by gnozal »

Maitre_Kanter wrote:...
see below a little piece of code for Keystroke management using GetAsyncKeyState_ API :
...
Thanks, but I can't find any reference to #KF_RECENTLY_PRESSED ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

Re: PureFORM 1.99 (yet another FORM designer)

Post by Maitre_Kanter »

gnozal wrote:
Maitre_Kanter wrote:...
see below a little piece of code for Keystroke management using GetAsyncKeyState_ API :
...
Thanks, but I can't find any reference to #KF_RECENTLY_PRESSED ?
Corrected, missing Windows Definitions in previous post:

Code: Select all

#KF_UP       =       $8000
#KF_RECENTLY_PRESSED = $0001
Post Reply