WinFBE Suite 2.1.5 (May 8, 2020)

Started by Paul Squires, May 08, 2020, 04:21:56 PM

Previous topic - Next topic

Paul Squires

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
Paul Squires
PlanetSquires Software

jermy

#1
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

Paul Squires

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.
Paul Squires
PlanetSquires Software

ji_vildaasen

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.

Paul Squires

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.
Paul Squires
PlanetSquires Software

ji_vildaasen

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

jermy

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.


Paul Squires

Is your compiled program still running in memory?
Paul Squires
PlanetSquires Software

jermy

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.

Paul Squires

Interesting. I'll try the same thing tomorrow. I'll let you know if I encounter that same problem.
Paul Squires
PlanetSquires Software

Paul Squires

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.
Paul Squires
PlanetSquires Software

Paul Squires

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.
Paul Squires
PlanetSquires Software

Paul Squires

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.
Paul Squires
PlanetSquires Software

Paul Squires

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.

Paul Squires
PlanetSquires Software

SeaVipe

#14
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!
Clive Richey