I have uploaded a test version of the WinFBE Suite for you to try - especially for those of you who are having trouble with the compiler path error.
Please post in this thread your good and bad experiences with this release. If no major problems are found then I will release it as a general release.
https://github.com/PaulSquires/WinFBE/releases/tag/1.6.8-test
Version 1.6.8-TEST (July 25, 2018)
- Added: Form KeyPreview property.
- Fixed: Ability to unset any previously set button for the form properties: AcceptButton, CancelButton.
- Fixed: Positioning to wrong error line when error in visual designer code file.
- Fixed: Incorrect code generation for CheckBox BackColor.
- Fixed: Color System MenuText had a typo causing error during compilation.
- Fixed: QuickRun was not working for Form source files.
- Fixed: Changed RedirConsoleToFile function to use WSTRING rather than ZSTRING.
- Fixed: Changed CreateChildProcess function to use WSTRING rather than ZSTRING.
- Fixed: Form reload when source code changed by external editor.
- Fixed: GPF during cut or copy operation if Form is part of the selected group of controls.
Filter non-numeric characters from a TextBox
''
'' Key events are always processed in the following order:
'' (1) KeyDown
'' (2) KeyPress
'' (3) KeyUp
''
'' Based on example from: https://msdn.microsoft.com/en-us/library/system.windows.forms.control.keypress(v=vs.110).aspx
'' Listing of virtual keycodes can be found at: https://docs.microsoft.com/en-us/windows/desktop/inputdev/virtual-key-codes
''
'' Boolean flag used to determine when a character other than a number is entered.
dim shared nonNumberEntered as boolean = false
'' Handle KeyDown event to determine the type of character entered into the control.
Function Form1_TextBox1_KeyDown( ByRef sender As wfxTextBox, ByRef e As EventArgs) As LRESULT
'' Initialize the flag to false.
nonNumberEntered = false
'' Determine whether the keystroke is a number from the top of the keyboard.
if (e.KeyCode < VK_0 or e.KeyCode > VK_9) then
'' Determine whether the keystroke is a number from the keypad.
if (e.KeyCode < VK_NumPad0 or e.KeyCode > VK_NumPad9) then
'' Determine whether the keystroke is a backspace.
if (e.KeyCode <> VK_BACK) then
'' A non-numerical keystroke was pressed.
'' Set the flag to true and evaluate in KeyPress event.
nonNumberEntered = true
end if
end if
end if
'' If shift key was pressed, it's not a number.
if e.Shift = true then
nonNumberEntered = true
end if
function = 0
end function
'' This event occurs after the KeyDown event and can be used to prevent
'' characters from entering the control.
Function Form1_TextBox1_KeyPress( ByRef sender As wfxTextBox, ByRef e As EventArgs) As LRESULT
'' Check for the flag being set in the KeyDown event.
if nonNumberEntered = true then
'' Stop the character from being entered into the control since it is non-numerical.
e.Handled = true
end if
function = 0
end function
Form KeyPreview (filter keyboard characters at the form level)
''
'' Key events are always processed in the following order:
'' (1) KeyDown
'' (2) KeyPress
'' (3) KeyUp
''
'' *** Ensure that the form KeyPreview property is set to True ***
''
'' Boolean flag used to determine if numeric character is handled.
dim shared bNumberEntered as boolean = false
''
''
Function Form1_KeyDown( ByRef sender As wfxForm, ByRef e As EventArgs) As LRESULT
bNumberEntered = false
select case e.KeyCode
' Determine whether the keystroke is a number.
CASE VK_0 to VK_9, VK_NumPad0 to VK_NumPad9
? chr(e.KeyCode)
bNumberEntered = true
case VK_RETURN
? "ENTER"
bNumberEntered = true
END SELECT
Function = 0
End Function
''
''
Function Form1_KeyPress( ByRef sender As wfxForm, ByRef e As EventArgs) As LRESULT
if bNumberEntered = true then
e.Handled = true
END IF
Function = 0
End Function
Hi Paul
I have quickly tested this release on Win7 and am sorry to report that the path problem is still there and the workaround is still the same. Later today I will test under Win10 but will only reply if there is any difference, which is unlikely.
Thanks Gregory, this is really baffling to me.
Can you verify the steps you did to test on Win7?
- Download WinFBE Suite rar file from GitHub.
- Unpack the rar file into a folder on your computer (what folder name?)
- Double-click WinFBE32.exe to start the program? Did you use a shortcut instead?
- Open the sample FormTest.wfbe project from the Sample Projects \ Visual Designer folder?
- Simply press compile?
- Is this when you see the error? What is the error? Message box? Just doesn't compile? GPF?
- Does your compiler setup look like the attached picture?
- You are not intermixing any other older versions of WinFBE or the FB compiler?
I'll get to the bottom of this... losing sleep :) :) :)
Hi Paul, 2:15 am here .
Quote- Download WinFBE Suite rar file from GitHub.
- Unpack the rar file into a folder on your computer (what folder name?)
- Double-click WinFBE32.exe to start the program? Did you use a shortcut instead?
- Open the sample FormTest.wfbe project from the Sample Projects \ Visual Designer folder?
- Simply press compile?
this what happened, windows 10, v1803
- Download WinFBE Suite rar file from GitHub. - yes
- Unpack the rar file into a folder on your computer (what folder name?) c:/users/ray/fbetest/
- Double-click WinFBE32.exe to start the program? Did you use a shortcut instead? double click, (on .exe, not shortcut) hourglass for a second or two, then nothing - no message box/whatever
couldn't get as far as loading sample, 'cos fbe didn't load.
Best wishes,
Ray
ps, tried a few times here's the first appcrash report, if any use.
Version=1
EventType=APPCRASH
EventTime=131770413427582347
ReportType=2
Consent=1
UploadTime=131770413428634012
ReportStatus=2147487744
ReportIdentifier=95034833-4563-4510-bca7-084e97120e02
IntegratorReportIdentifier=62b89a37-b23f-4f3f-bf52-1d8dadebd75c
Wow64Host=34404
Wow64Guest=332
NsAppName=winfbe32.exe
AppSessionGuid=000015a4-0001-0005-1c7a-1c2c7e24d401
TargetAppId=W:0006f9d23411e6dea85acd6270513016dae60000ffff!0000b3e3440a408330a3d6041042b439960c881f46a7!winfbe32.exe
TargetAppVer=1970//01//01:00:00:00!d2689!winfbe32.exe
BootId=4294967295
ServiceSplit=7
TargetAsId=2797
IsFatal=1
Response.BucketId=83d493d5349c2efb5c22caa9dd3e15dc
Response.BucketTable=1
Response.LegacyBucketId=2027405613180261852
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=winfbe32.exe
Sig[1].Name=Application Version
Sig[1].Value=0.0.0.0
Sig[2].Name=Application Timestamp
Sig[2].Value=00000000
Sig[3].Name=Fault Module Name
Sig[3].Value=winfbe32.exe
Sig[4].Name=Fault Module Version
Sig[4].Value=0.0.0.0
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=00000000
Sig[6].Name=Exception Code
Sig[6].Value=c0000005
Sig[7].Name=Exception Offset
Sig[7].Value=00039005
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.17134.2.0.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=2057
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=2beb
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=2beba6fb4680d73a8c78ca7c24ccdb46
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=b1f0
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=b1f0b380dbcd74b72a4df4e63607c2ae
UI[2]=C:\Users\Ray\fbetest\WinFBE_Suite(1)\WinFBE_Suite\winfbe32.exe
LoadedModule[0]=C:\Users\Ray\fbetest\WinFBE_Suite(1)\WinFBE_Suite\winfbe32.exe
LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\WINDOWS\System32\KERNEL32.DLL
LoadedModule[3]=C:\WINDOWS\System32\KERNELBASE.dll
LoadedModule[4]=C:\WINDOWS\System32\ADVAPI32.dll
LoadedModule[5]=C:\WINDOWS\System32\msvcrt.dll
LoadedModule[6]=C:\WINDOWS\System32\sechost.dll
LoadedModule[7]=C:\WINDOWS\System32\RPCRT4.dll
LoadedModule[8]=C:\WINDOWS\System32\SspiCli.dll
LoadedModule[9]=C:\WINDOWS\System32\CRYPTBASE.dll
LoadedModule[10]=C:\WINDOWS\System32\bcryptPrimitives.dll
LoadedModule[11]=C:\WINDOWS\System32\COMDLG32.DLL
LoadedModule[12]=C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.17134.165_none_42efcd1c44e192b2\COMCTL32.DLL
LoadedModule[13]=C:\WINDOWS\System32\combase.dll
LoadedModule[14]=C:\WINDOWS\System32\ucrtbase.dll
LoadedModule[15]=C:\WINDOWS\System32\GDI32.dll
LoadedModule[16]=C:\WINDOWS\System32\shcore.dll
LoadedModule[17]=C:\WINDOWS\System32\gdi32full.dll
LoadedModule[18]=C:\WINDOWS\System32\msvcp_win.dll
LoadedModule[19]=C:\WINDOWS\System32\USER32.dll
LoadedModule[20]=C:\WINDOWS\System32\win32u.dll
LoadedModule[21]=C:\WINDOWS\System32\SHLWAPI.dll
LoadedModule[22]=C:\WINDOWS\System32\SHELL32.dll
LoadedModule[23]=C:\WINDOWS\System32\cfgmgr32.dll
LoadedModule[24]=C:\WINDOWS\System32\windows.storage.dll
LoadedModule[25]=C:\WINDOWS\System32\kernel.appcore.dll
LoadedModule[26]=C:\WINDOWS\System32\profapi.dll
LoadedModule[27]=C:\WINDOWS\System32\powrprof.dll
LoadedModule[28]=C:\WINDOWS\System32\FLTLIB.DLL
LoadedModule[29]=C:\WINDOWS\System32\ole32.dll
LoadedModule[30]=C:\WINDOWS\System32\OLEAUT32.dll
LoadedModule[31]=C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.17134.165_none_73dac0019f740c80\gdiplus.dll
LoadedModule[32]=C:\WINDOWS\SYSTEM32\UxTheme.dll
LoadedModule[33]=C:\WINDOWS\SYSTEM32\VERSION.dll
LoadedModule[34]=C:\WINDOWS\System32\IMM32.DLL
LoadedModule[35]=C:\Program Files (x86)\Ruiware\WinPatrol\PATROLPRO.DLL
LoadedModule[36]=C:\Users\Ray\fbetest\WinFBE_Suite(1)\WinFBE_Suite\SciLexer32.dll
LoadedModule[37]=C:\WINDOWS\SYSTEM32\MSIMG32.DLL
LoadedModule[38]=C:\WINDOWS\SYSTEM32\hhctrl.ocx
State[0].Key=Transport.DoneStage1
State[0].Value=1
OsInfo[0].Key=vermaj
OsInfo[0].Value=10
OsInfo[1].Key=vermin
OsInfo[1].Value=0
OsInfo[2].Key=verbld
OsInfo[2].Value=17134
OsInfo[3].Key=ubr
OsInfo[3].Value=165
OsInfo[4].Key=versp
OsInfo[4].Value=0
OsInfo[5].Key=arch
OsInfo[5].Value=9
OsInfo[6].Key=lcid
OsInfo[6].Value=2057
OsInfo[7].Key=geoid
OsInfo[7].Value=242
OsInfo[8].Key=sku
OsInfo[8].Value=48
OsInfo[9].Key=domain
OsInfo[9].Value=0
OsInfo[10].Key=prodsuite
OsInfo[10].Value=256
OsInfo[11].Key=ntprodtype
OsInfo[11].Value=1
OsInfo[12].Key=platid
OsInfo[12].Value=10
OsInfo[13].Key=sr
OsInfo[13].Value=0
OsInfo[14].Key=tmsi
OsInfo[14].Value=20974
OsInfo[15].Key=osinsty
OsInfo[15].Value=3
OsInfo[16].Key=iever
OsInfo[16].Value=11.165.17134.0-11.0.75
OsInfo[17].Key=portos
OsInfo[17].Value=0
OsInfo[18].Key=ram
OsInfo[18].Value=8084
OsInfo[19].Key=svolsz
OsInfo[19].Value=237
OsInfo[20].Key=wimbt
OsInfo[20].Value=0
OsInfo[21].Key=blddt
OsInfo[21].Value=180410
OsInfo[22].Key=bldtm
OsInfo[22].Value=1804
OsInfo[23].Key=bldbrch
OsInfo[23].Value=rs4_release
OsInfo[24].Key=bldchk
OsInfo[24].Value=0
OsInfo[25].Key=wpvermaj
OsInfo[25].Value=0
OsInfo[26].Key=wpvermin
OsInfo[26].Value=0
OsInfo[27].Key=wpbuildmaj
OsInfo[27].Value=0
OsInfo[28].Key=wpbuildmin
OsInfo[28].Value=0
OsInfo[29].Key=osver
OsInfo[29].Value=10.0.17134.165.amd64fre.rs4_release.180410-1804
OsInfo[30].Key=buildflightid
OsInfo[30].Value=3B805871-C763-472A-96E4-0641523B34E1.1
OsInfo[31].Key=edition
OsInfo[31].Value=Professional
OsInfo[32].Key=ring
OsInfo[33].Key=expid
OsInfo[34].Key=containerid
OsInfo[35].Key=containertype
OsInfo[36].Key=edu
OsInfo[36].Value=0
FriendlyEventName=Stopped working
ConsentKey=APPCRASH
AppName=winfbe32.exe
AppPath=C:\Users\Ray\fbetest\WinFBE_Suite(1)\WinFBE_Suite\winfbe32.exe
NsPartner=windows
NsGroup=windows8
ApplicationIdentity=74FC35374A1B86A261B0E6D0D76E6192
MetadataHash=1266492313means nothing to me, but maybe of use to someone.
Excellent Ray, thanks for the report.
Can you try this... open the \Settings\WinFBE.ini configuration file.
Find the line that says Codetips= 1.
Change the 1 to 0.
This will turn off Codetips and disable loading any of the codetip files on startup. From your description, it appears that maybe the "preparse" codetip database may be the problem. Disabling codetips prevents WinFBE from loading those files.
' WINFBE CONFIGURATION
[Editor]
AskExit= 0
HideToolbar= 0
HideStatusbar= 0
MultipleInstances= 1
CompileAutosave= 1
CloseFuncList= 1
HideCompile= 1
SyntaxHighlighting= 1
Codetips= 1 '<------- change this 1 to 0
AutoComplete= 1
RightEdge= 0
RightEdgePosition=80
LeftMargin= 1
Hi Paul. I see Ray has already replied to you and my situation is similar.
Firstly, the file downloaded from github and the test version from your link above.
The file is unpacked to a folder on the C drive, usually C:\WinFBE_Suite, though sometimes others while I have been trying different combinations. The folder name doesn't seem to matter.
I doubleclick on the exe file to run it, either WinFBE32 or WinFBE64. Again it doesn't matter which as the behaviour is the same. On Win10, as Ray says, hourglass for a bit and then nothing. On Win7, a message comes up saying that the program has stopped working. With a bit of luck, I will be able to attach a screenprint and crash report to this post.
With respect to your suggestion to change the Codetips setting from 1 to 0, I can report that doing this now allows both exes to run.
Hope this helps.
Hello at All
@Gregory
You're right. I still have the problem that WinFBE does not start with one click or double click. :)
I can put the described entries in the.ini file in quotation marks. Then the program starts without error message.
But then I get the error message when I want to use the compiler.
I have linked the corresponding files with WinFBE (open with).
Since then WinFBE starts now without error message with a double click on the project or.bas file and can also use the compiler without having to change the entries again and again.
It may not be the best, but it's a working temporary solution.
Paul is surely only satisfied when WinFBE works according to his ideas. :)
(I work with Win 10 Pro.)
Hi Paul :)
thank you for the code examples.
Hi Paul,
changing the .ini entry lets the fbe start, and I can run the test form project, but there is no designer option - i.e the forms are in .inc files and thus do not allow any editing in the designer. fwiw, I have a dozen fbe.ini files on my system. I wonder if paths are not fully specified that the first one found is used. The test form is the same as you have used before? just in case I'm getting the wrong project files.
edit to add. I've used 'everything' http://www.voidtools.com/ (http://www.voidtools.com/) to remove all the earlier fbe references I could find. Now I can click on the inc form files and the visual editor opens. Now seems to be installed and working OK. I'll do some more testing a bit later on.
Thanks everyone for your patience with regard to this problem. I will work on the codetip issue. It seems to be related to the change I made a few versions ago related to the preparsed include files.
Ray - looks like you may be loading an older version of the project. If the project had not been upgraded to the UTF-16 file encoding then you would simply see in the code editor a long listing of form metadata followed by the code generation and then lastly the form's event handler code.
Ray - just saw your edited post... happy to hear that it is now working okay for you :)
Hi Paul, seems to be ok, wrt compiling. Now, what were we supposed to be testing?