PlanetSquires Forums

Support Forums => PlanetSquires Software => Topic started by: Paul Squires on May 08, 2020, 04:21:56 PM

Title: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: Paul Squires on May 08, 2020, 04:21:56 PM
Version 2.1.5 (May 8, 2020)
Editor:
- Changed: Running WinFBE for first time with no existing WinFBE.ini config file will automatically create entries for User Tools that exist in the Tools folder.
- Fixed: The 64 bit translation of the SCNotification type structure for Scintilla notifications was incorrect. This caused problems setting the flag for when code parsing should happen which in turn caused issues with Autocompete and displaying of Sub/Function names in the Explorer.
- Fixed: AutoInsert, AutoComplete, and CodeTips are disabled if current position is within a single or multiple line comment block.
- Fixed: Additional checks for ensuring subs/functions names correctly added to Explorer and popup F4 Function List when source code is modified. If AutoComplete is disabled, then Sub/Function will not appear until corresponding End Sub / End Function is typed.

Visual Designer:
- Fixed: Label hot coloring could sometimes not reset if the label immediately next to oroverlaps another control.
- Fixed: DateTimePicker control would not show correctly the FormatCustom visually at design time. Worked at run time only.
- Fixed: Changing DateTimePicker DateFormat property now destroys and recreates the window control in order to properly set the styles.
- Fixed: Form WindowState property not correctly setting Minimized/Maximized/Normal states.
- Fixed: Lassoing control(s) was not updating the Toolbox Property List with the correct active selected control.

Download from: https://github.com/PaulSquires/WinFBE/releases
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: jermy on May 08, 2020, 05:59:25 PM
thanks Paul,

I was creating a systray program, I noticed that the form is displayed for a moment.
frmMain.Visible = False This value is set to False in the toolbox properties, but the form becomes
temporarily visible

I solved it like this for the time being, example;

' frmMain form code file
''
''
'' show the form after 3 seconds

Dim shared FirstRun as integer

Function frmMain_Timer1_Elapsed( ByRef sender As wfxTimer, ByRef e As EventArgs ) As LRESULT

'suppresses flickering while starting
frmMain.BorderStyle = FormBorderStyle.Sizable ' this value is set to none in the toolbox properties, I think this appears for a moment
frmMain.Visible = true   ' this value is set to False in the toolbox properties

   Function = 0
End Function

''
''
Function frmMain_Initialize( ByRef sender As wfxForm, ByRef e As EventArgs ) As LRESULT

with frmMain.Timer1
     .AutoReset = false
     .Interval = 3000
     .Enabled = true
end with

   Function = 0
End Function

''
''
Function frmMain_Activated( ByRef sender As wfxForm, ByRef e As EventArgs ) As LRESULT

if Firstrun = 0 then
          frmMain.Hide   'suppresses flickering while starting
   Firstrun = 1
end if

   Function = 0
End Function



José & Paul thanks for WinFBE.

edit: removed typo
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: Paul Squires on May 08, 2020, 10:51:55 PM
Thanks jermy, your post allowed me to catch the problem with the form flashing on the screen.

You can fix this yourself if you don't want to wait until 2.1.6 update.

Open the \inc\WinFormsX\wfxForm.inc file.

Go to line 756 and replace lines 756 to 766 with the following:

   ' Ensure that window gets correctly placed into the taskbar (if applicable) by
   ' calling ShowWindow with SW_SHOWDEFAULT initially specified.
   if this.IsMainForm then
      if _Visible then
         if this.WindowState = FormWindowState.Maximized then
            ShowWindow(this.hWindow, SW_MAXIMIZE)
         else
            ShowWindow(this.hWindow, SW_SHOWDEFAULT)
         end if   
      end if
   end if


Basically you're adding the If _Visible conditional check.
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: ji_vildaasen on May 09, 2020, 07:34:01 AM
Autocomplete list working well now! I also like how easy it is to update the editor (after you changed the way WinFBE.ini is only updated if needed).

I think I stumbled onto a small bug when testing the Autocomplete bugfix. If there is a Tab in front of "This." then no autocomplete list is shown, but if there is a space(or no characters) then typing "This." will open a autocomplete list as expected.
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: Paul Squires on May 09, 2020, 01:49:33 PM
Quote from: ji_vildaasen on May 09, 2020, 07:34:01 AM
I think I stumbled onto a small bug when testing the Autocomplete bugfix. If there is a Tab in front of "This." then no autocomplete list is shown, but if there is a space(or no characters) then typing "This." will open a autocomplete list as expected.
Thanks - yes, that is indeed a bug. It is fixed now and will be in the next update.
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: ji_vildaasen on May 12, 2020, 06:38:00 PM
This code misses the "w" in "FBImageBox_Parent" when showing autocomplete with "This.Parent." at line 53. I did try to replicate the the error with some test code, but could not replicate it. So there is something with this code that triggers it =)

Also if I type "This." on line 52, the autocompletet list will show "Parent" in the list, but if type "p" then the autocomplete list wont find any matches in the list.. 
I'm using Tabs, not spaces for indentation.

Type FBImageBox_Options

V_Centered as Boolean
H_Centered as Boolean

end type


type FBImageBox_Parent

hWindow as HWND
w as Long
h as Long

Declare Sub Update()

end type


Type FBImageBox

Options as FBImageBox_Options
Parent as FBImageBox_Parent

x as Long
y as Long
w as long
h as Long
   Scale as Long = 1

Border as long = 0
Border_Col as ulong = 0

Buffer as FB.Image Ptr
TempBuffer as FB.Image Ptr

MaxW as Long = 1000
MaxH as Long = 1000
 
Declare sub Draw()
Declare sUB Update()
Declare Destructor()

end type


'____________________________________________________________________________________________________________________________________
Sub FBImageBox.Update()

This.Parent.Update
Parent.Update()

This.Parent
If Options.V_Centered then



end if

This.Draw()

end sub


'____________________________________________________________________________________________________________________________________
Sub FBImageBox.Draw()

PrintMSG "FBImageBox.Draw()"

if Buffer = 0 then exit sub
If TempBuffer = 0 Then TempBuffer = ImageCreate(MaxW, MaxH, 0, 32)

Put TempBuffer, (0, 0), Buffer, Pset

Dim As BITMAPV4HEADER bmi

With BMI
.bV4Size = Len(BITMAPV4HEADER)
.bv4width = TempBuffer->Pitch / 4
.bv4height = -(TempBuffer->Height)
.bv4planes = 1
.bv4bitcount = 32
.bv4v4compression = 0
.bv4sizeimage = ((TempBuffer->Pitch / 4) * TempBuffer->Height) * 4
.bV4RedMask = &h0f00
.bV4GreenMask = &h00f0
.bV4BlueMask = &h000f
.bV4AlphaMask = &hf000
End With

Var hdc = GetDC(Parent.hWindow)
StretchDIBits(hDC, x, y, Buffer->Width, Buffer->Height, 0, 0, Buffer->Width, Buffer->Height, CPtr(Any Ptr, TempBuffer) + SizeOf(FB.Image), CPtr( BITMAPINFO Ptr, @BMI), DIB_RGB_COLORS, SRCCOPY )
DeleteDC(hdc)

end sub

'____________________________________________________________________________________________________________________________________
Destructor FBImageBox()

PrintMSG "FBImageBox.Destructor()"
   
   If Buffer <> 0 then ImageDestroy(Buffer)
   Buffer = 0
   
   If TempBuffer <> 0 then ImageDestroy(TempBuffer)
   TempBuffer = 0
   
end destructor


'____________________________________________________________________________________________________________________________________
Sub FBImageBox_Parent.Update()

w = AfxGetWindowClientWidth( hWindow )
h = AfxGetWindowClientHeight( hWindow )

PrintMSG "FBImageBox_Parent.Update() : w = " & w & ", h = " & h

end sub
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: jermy on May 13, 2020, 05:31:36 PM
Hi paul,

after compiling a program and closing the project inside the ide it is not possible to move the folder of the project, the folder is in use.

Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: Paul Squires on May 13, 2020, 06:12:53 PM
Is your compiled program still running in memory?
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: jermy on May 13, 2020, 07:09:53 PM
Hi Paul,

I tested it with a new empty visual designer project, windows tells me the folder is in use.
i can move the files,  but not the folder where the project is located.
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: Paul Squires on May 13, 2020, 09:30:33 PM
Interesting. I'll try the same thing tomorrow. I'll let you know if I encounter that same problem.
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: Paul Squires on May 14, 2020, 04:21:48 PM
Quote from: ji_vildaasen on May 12, 2020, 06:38:00 PM
This code misses the "w" in "FBImageBox_Parent" when showing autocomplete with "This.Parent." at line 53. I did try to replicate the the error with some test code, but could not replicate it. So there is something with this code that triggers it =)
That is the strangest thing I've seen in a long time. It does not pick it up. If I add new elements to the Type they they get parsed and displayed correctly. If I change the "w" to "ww" then that also gets picked up. However, if I leave it as a simple "w" then it does not get picked up. If I change the "w" to a different letter, like a "z" then it does get picked up! I'll try to find out why in the world this is happening.
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: Paul Squires on May 14, 2020, 04:27:21 PM
Quote from: ji_vildaasen on May 12, 2020, 06:38:00 PM
Also if I type "This." on line 52, the autocompletet list will show "Parent" in the list, but if type "p" then the autocomplete list wont find any matches in the list.. 
I'm using Tabs, not spaces for indentation.
Seems like 64 bit WinFBE might be some of the problem because on 32 bit it does seem to work (sometimes), I need to look at the recent conversion I did for the scintilla SCNotification structure.
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: Paul Squires on May 14, 2020, 04:36:11 PM
Quote from: jermy on May 13, 2020, 05:31:36 PM
Hi paul,
after compiling a program and closing the project inside the ide it is not possible to move the folder of the project, the folder is in use.
Okay, I can confirm replicating this on my system as well. If the project is simply closed then you can move the folder. Something in my code must be holding a file open (maybe). You need to exit WinFBE altogether in order to move the folder. Thanks for the report.
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: Paul Squires on May 16, 2020, 04:36:13 PM
Quote from: ji_vildaasen on May 12, 2020, 06:38:00 PM
This code misses the "w" in "FBImageBox_Parent" when showing autocomplete with "This.Parent." at line 53. I did try to replicate the the error with some test code, but could not replicate it. So there is something with this code that triggers it =)
I was able to find the source of this problem. The fix will be in version 2.1.6 release.

Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: SeaVipe on May 16, 2020, 07:02:08 PM
Hi Paul, This code does not highlight brackets correctly:

Dim As Long l = Get( #ff, i + 1, js( i ) )

Bracket Highlight identifies both left and right Get() as mismatched. js() brackets are matched correctly. It's that pesky # again!
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: raymw on May 16, 2020, 07:55:06 PM
trying to alter some existing programs from about 8 months ago. Getting numerous error lines - no matching overload function - CHARACTERCASING()
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: Paul Squires on May 16, 2020, 10:05:53 PM
Quote from: raymw on May 16, 2020, 07:55:06 PM
trying to alter some existing programs from about 8 months ago. Getting numerous error lines - no matching overload function - CHARACTERCASING()
Hi Ray, try this post:  https://www.planetsquires.com/protect/forum/index.php?topic=4331.msg33429#msg33429
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: Paul Squires on May 16, 2020, 10:10:32 PM
Quote from: SeaVipe on May 16, 2020, 07:02:08 PM
Hi Paul, This code does not highlight brackets correctly:

Dim As Long l = Get( #ff, i + 1, js( i ) )

Bracket Highlight identifies both left and right Get() as mismatched. js() brackets are matched correctly. It's that pesky # again!
Right you are. It's those pesky #'s for sure. Not much I can do about as it is built into the scintilla lexer.

Quote
Also in Code Editor, a CR appears to now always place the new line col at 0. Before it would line up the col with the one above:
I am not seeing this problem in either 32 or 64 bit versions of the editor. Maybe I fixed any such problem in the latest internal build that I am using. I will post 2.1.6 soon for you to test. Also, make sure that the editor option "Enable Auto Indentation" is checked.
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: raymw on May 16, 2020, 10:51:27 PM
Quote from: Paul Squires on May 16, 2020, 10:05:53 PM
Quote from: raymw on May 16, 2020, 07:55:06 PM
trying to alter some existing programs from about 8 months ago. Getting numerous error lines - no matching overload function - CHARACTERCASING()
Hi Ray, try this post:  https://www.planetsquires.com/protect/forum/index.php?topic=4331.msg33429#msg33429

Thanks -  groundhog dayja view   :D
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: Paul Squires on May 17, 2020, 08:01:22 AM
Quote from: jermy on May 13, 2020, 05:31:36 PM
Hi paul,

after compiling a program and closing the project inside the ide it is not possible to move the folder of the project, the folder is in use.

I haven't been able to figure this one out yet. I thought it was due to not have handles released from the call to CreateProcess and Pipes that are used to invoke the compiler and read the compiler output text from the console window. I rearranged some of that code to ensure that the handles were closed but it doesn't seem to have made a difference. I will keep looking for a fix.


Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: jermy on May 24, 2020, 09:49:43 AM

maybe this minor bug is related to the folder is in use bug.

'this program must be compiled first to get the correct folder output.
'when i close the project and open another project the working folder is incorrect, winfbe opens the project from the last compiled folder.
'when i close winfbe and reopen the project, i need to compile the program first to get correct folder output (project folder)
print "current folder;"
print CurDir


I suspect that winfbe is using the folder as the current working folder, after closing a project winfbe should refer its working folder to the winfbe.exe folder
winfbe must refer to the project folder when opening a project
Title: Re: WinFBE Suite 2.1.5 (May 8, 2020)
Post by: jermy on May 24, 2020, 07:34:21 PM
Hi Paul,

the autocomplete function does not work properly with treeview, autofill does not provide suggestions.


''
''
Function frmMain_TreeView1_MouseDown( ByRef sender As wfxTreeView, ByRef e As EventArgs ) As LRESULT

print frmmain.TreeView1.TreeNode.   'gives no suggestions
print sender.TreeNode.
'.text

    Function = 0
End Function