-
RichTextBox unicode save bug?
I loaded a file with a BOM header FFFE using the flag RtfLoadSaveFormatUnicodeText into a RichTextBox.
The BOM header was removed and not shown up at the text window.
Everything was fine until here.
Later i saved the file with the flag RtfLoadSaveFormatUnicodeText but the BOM header FFFE not have been added to file again!
I thought using the flag RtfLoadSaveFormatUnicodeText when saving a file would always add the BOM header to the file...
Is this a bug or how can i save the file including the BOM header again?
-
Re: RichTextBox unicode save bug?
Quote:
Originally Posted by
Mith
I loaded a file with a BOM header FFFE using the flag RtfLoadSaveFormatUnicodeText into a RichTextBox.
The BOM header was removed and not shown up at the text window.
Everything was fine until here.
Later i saved the file with the flag RtfLoadSaveFormatUnicodeText but the BOM header FFFE not have been added to file again!
I thought using the flag RtfLoadSaveFormatUnicodeText when saving a file would always add the BOM header to the file...
Is this a bug or how can i save the file including the BOM header again?
Thanks. Fixed.
That was a "bug". Not really a bug because the rich edit control just handle streams. It does not care about BOM header.
So it was an oversight by me to not write the BOM header when saving a Unicode file.
-
Re: CommonControls (Replacement of the MS common controls)
I also slightly modified LoadFile for RichTextBox.
It will load unicode file even when there is no BOM.
Prior to this change (when there is no BOM) it fall backs to ANSI text. But that does not make sense at all when specifying RtfLoadSaveFormatUnicodeText. It should read Unicode for BOM and no BOM cases without unlogic fall back to ANSI when there is no BOM.
-
RichTextBox: missing flag at the Find function
Im missing the reverse flag at the the Find function of the RichTextBox to search a document backwards.
See https://docs.microsoft.com/en-us/dotnet
/api/system.windows.forms.richtextboxfinds?view=netframework-4.8
Or does the RichTextBox of the CommonControls not support this flag?
.redraw property
Currently i use my own reverse search function but the backward search can be very slow when using large files and the search text isnt found.
I guess a .redraw property for the RichTextBox would be very nice to speed up the search.
Maybe this code helps you to implement a .redraw property:
https://stackoverflow.com/questions/...ng-its-display
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
Yes, an MDIFrom doesn't have a KeyDown event.
The MDI_ToolBar demo is therefore using a WH_KEYBOARD_LL hook to detect WM_SYSKEYDOWN and with flag LLKHF_ALTDOWN and pass to ToolBar1.ContainerKeyDown. ToolBar1.ContainerKeyDown is a convinient method that will trigger a button click, when there is a button caption with an Ampersand (e.g. "&New Doc", which displays "
New Doc") an key code matching it. (of course the button also must be enabled, not disabled)
However, what you want is then independent from ToolBar1.ContainerKeyDown.
To reach your behavior I just changed the hook, see below:
Code:
Private Type KBDLLHOOKSTRUCT
VKCode As Long
ScanCode As Long
Flags As Long
Time As Long
dwExtraInfo As Long
End Type
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Const WM_KEYDOWN As Long = &H100
Implements IHook
Private Sub IHook_Before(ByRef Handled As Boolean, ByRef RetVal As Long, ByVal HookType As HookTypeConstants, ByVal HookCode As HookCodeConstants, ByVal wParam As Long, ByVal lParam As Long)
If HookType = WH_KEYBOARD_LL Then
If HookCode = HC_ACTION Then
If wParam = WM_KEYDOWN Then
If GetActiveWindow() = Me.hWnd Then
Dim KBDLLHS As KBDLLHOOKSTRUCT
CopyMemory KBDLLHS, ByVal lParam, LenB(KBDLLHS)
Dim KeyCode As Integer
KeyCode = KBDLLHS.VKCode And &HFF&
If KeyCode = vbKeyF1 Then
With New FormChild
.Show vbModeless
End With
Handled = True
RetVal = 1
End If
End If
End If
End If
End If
End Sub
Private Sub IHook_After(ByRef RetVal As Long, ByVal HookType As HookTypeConstants, ByVal HookCode As HookCodeConstants, ByVal wParam As Long, ByVal lParam As Long)
End Sub
Private Sub MDIForm_Load()
Call SetHook(Me, WH_KEYBOARD_LL)
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
Call RemoveHook(Me, WH_KEYBOARD_LL)
End Sub
To make this user-friendly you could include in the button caption in the ToolBar an "(F1)". Even when in real it's totally disconnected.
Hello sir
I noticed that when I call the function SetHook I will be unable to use keyboard keys.
Hence, Impossible to write in textboxes
thanks
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
Yes, an MDIFrom doesn't have a KeyDown event.
The MDI_ToolBar demo is therefore using a WH_KEYBOARD_LL hook to detect WM_SYSKEYDOWN and with flag LLKHF_ALTDOWN and pass to ToolBar1.ContainerKeyDown. ToolBar1.ContainerKeyDown is a convinient method that will trigger a button click, when there is a button caption with an Ampersand (e.g. "&New Doc", which displays "
New Doc") an key code matching it. (of course the button also must be enabled, not disabled)
However, what you want is then independent from ToolBar1.ContainerKeyDown.
To reach your behavior I just changed the hook, see below:
Code:
Private Type KBDLLHOOKSTRUCT
VKCode As Long
ScanCode As Long
Flags As Long
Time As Long
dwExtraInfo As Long
End Type
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Const WM_KEYDOWN As Long = &H100
Implements IHook
Private Sub IHook_Before(ByRef Handled As Boolean, ByRef RetVal As Long, ByVal HookType As HookTypeConstants, ByVal HookCode As HookCodeConstants, ByVal wParam As Long, ByVal lParam As Long)
If HookType = WH_KEYBOARD_LL Then
If HookCode = HC_ACTION Then
If wParam = WM_KEYDOWN Then
If GetActiveWindow() = Me.hWnd Then
Dim KBDLLHS As KBDLLHOOKSTRUCT
CopyMemory KBDLLHS, ByVal lParam, LenB(KBDLLHS)
Dim KeyCode As Integer
KeyCode = KBDLLHS.VKCode And &HFF&
If KeyCode = vbKeyF1 Then
With New FormChild
.Show vbModeless
End With
Handled = True
RetVal = 1
End If
End If
End If
End If
End If
End Sub
Private Sub IHook_After(ByRef RetVal As Long, ByVal HookType As HookTypeConstants, ByVal HookCode As HookCodeConstants, ByVal wParam As Long, ByVal lParam As Long)
End Sub
Private Sub MDIForm_Load()
Call SetHook(Me, WH_KEYBOARD_LL)
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
Call RemoveHook(Me, WH_KEYBOARD_LL)
End Sub
To make this user-friendly you could include in the button caption in the ToolBar an "(F1)". Even when in real it's totally disconnected.
Hello sir
I noticed that when I call the function SetHook I will be unable to use keyboard keys.
Hence, Impossible to write in textboxes
thanks
-
Re: RichTextBox: missing flag at the Find function
Quote:
Originally Posted by
Mith
Im missing the reverse flag at the the Find function of the RichTextBox to search a document backwards.
There is no reverse flag, right.
However, you can search backwards by flipping the parameters. It's demonstrated in the Demo:
Code:
If (CommonDialogFind.Flags And CdlFRDown) = CdlFRDown Then
RetVal = RichTextBox1.Find(CommonDialogFind.FindWhat, RichTextBox1.SelStart + RichTextBox1.SelLength, , Options)
Else
RetVal = RichTextBox1.Find(CommonDialogFind.FindWhat, , RichTextBox1.SelStart, Options)
End If
So if Down is selected in the Find common dialog the search in RichTextBox is forward.
If Up is selected then the search appears backward.
But if two hit results are found it's the first from start and not the first from SelStart.
So it's not real backward but for most cases appear ok.
Whatsoever I will look to include Reverse flag soon.
-
Re: RichTextBox: missing flag at the Find function
Quote:
Originally Posted by
Krool
So it's not real backward but for most cases appear ok.
Currently i use the following function for a real backward search:
Code:
Public Function RTB_FindReverse(ByRef cRTB As VBCCR16.RichTextBox, ByVal sFindText As String, Optional ByVal lStartPos As Long = -1, Optional ByVal lSearchFlags As Long) As Long
Dim I As Long
Dim lPos As Long
Dim TextLen As Long
20 TextLen = Len(sFindText)
30 Call LockWindowUpdate(cRTB.hwnd)
40 If lStartPos = -1 Then
50 lStartPos = Len(cRTB.Text) 'end of file
60 End If
70 For I = lStartPos To 0 Step -1
80 lPos = cRTB.Find(sFindText, I, I + TextLen, lSearchFlags)
90 If lPos <> -1 Then Exit For
100 Next I
110 Call LockWindowUpdate(0)
120 RTB_FindReverse = lPos
End Function
I hope the new reverse flag will help to speed up backward searching through large files...
-
Re: RichTextBox: missing flag at the Find function
Quote:
Originally Posted by
Mith
Thanks Mith. You become a good tester. :)
The flag 'RtfFindOptionReverse' is now included for the Find method.
It has the same value 16 (&H10) as in the .net RichTextBoxFinds Enum.
Your RTB_FindReverse helper function is slow because you call the .Find method in a loop.
Also in each loop the control blinks as the text is selected unless the NoHighlight enum option was specified.
So please try 'RtfFindOptionReverse'. It should work fast without any need to turn off redrawing.
Quote:
Originally Posted by
samer22
I noticed that when I call the function SetHook I will be unable to use keyboard keys.
Hence, Impossible to write in textboxes
thanks
I tested the code snipped I provided to you again in my MDI_ToolBar demo and it was no problem to write in the textbox of the child form.
Please provide a demo project showing your issue.
-
Re: CommonControls (Replacement of the MS common controls)
sorry again sir
I was using select case mistakengly
Code:
Select Case KeyCode
Case vbKeyF1
FormChild.Show
End Select
Handled = True
RetVal = 1
-
Re: RichTextBox: missing flag at the Find function
Quote:
Originally Posted by
Krool
Thanks Mith. You become a good tester. :)
I guess more reports will come n the future because i use your controls to convert a very large vb6 project to unicode :)
I wish we had a unicode TreeGrid control...does anyone known a TreeGrid control with unicode support?
Quote:
Originally Posted by
Krool
The flag 'RtfFindOptionReverse' is now included for the Find method.
The new flag works very well and fast! Thanks for the implementation!
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
I wish we had a unicode TreeGrid control...does anyone known a TreeGrid control with unicode support?
I use the vsFlexGrid from ComponentOne
Seems it's called Grapecity nowadays...
https://www.grapecity.com/activex
-
Re: RichTextBox: missing flag at the Find function
Quote:
a TreeGrid control with unicode support
http://www.vbforums.com/showthread.p...xGrid-control)
EDIT:
Oops, TreeGrid <> Flexgrid
Don't know what you mean by TreeGrid.
-
Re: RichTextBox: missing flag at the Find function
Quote:
I wish we had a unicode TreeGrid control...does anyone known a TreeGrid control with unicode support?
Does the vbFlexGrid also supports a Treeview in a given column?
-
Re: RichTextBox: missing flag at the Find function
Quote:
Originally Posted by
Arnoutdv
Does the vbFlexGrid also supports a Treeview in a given column?
How should that look like?
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
"Official" screenshot here:
https://www.componentsource.com/prod...nshots/2196344
The attached image is from one of my applications
-
Re: CommonControls (Replacement of the MS common controls)
BackColor property in the TabStrip now included.
Also the OCX got updated. I don't like it as it is a functional jump, even it's still binary compatibility.
However, I also found the alternative to wait for 1.7 too stupid. As this feature was so often asked and wqweto now provided a solution... :)
So still until today OCX is still in sync with Std-EXE version.
The BackColor property in TabStrip will be enriched in future so it also works when VisualStyles is False or DrawMode is OwnerDrawn. This was just the first step.
Also bugfix for "TabStrip1.DrawBackground(hWnd, hDC)" method in this update. The bug was was that an offset could happen due to difference between window rect and client rect.
The new routine is also simplified. It's now directly mapped between client hWnd and TabStrip.
Also instead of SendMessage WM_PAINT it now uses WM_PRINT with PRF_CLIENT + PRF_ERASEBKGND. (for correct result even when theming is off)
Code:
Public Sub DrawBackground(ByVal hWnd As Long, ByVal hDC As Long)
If TabStripHandle <> 0 And hWnd <> 0 And hDC <> 0 Then
Dim RC As RECT, P As POINTAPI
GetClientRect hWnd, RC
MapWindowPoints hWnd, TabStripHandle, RC, 2
P.X = RC.Left
P.Y = RC.Top
SetViewportOrgEx hDC, -P.X, -P.Y, P
SendMessage TabStripHandle, WM_PRINT, hDC, ByVal PRF_CLIENT Or PRF_ERASEBKGND
SetViewportOrgEx hDC, P.X, P.Y, P
End If
End Sub
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
BackColor property in the TabStrip now included.
Confirmed, it works very nice! Good job!
Now i can set the TabStrip background color to the form background color:
Attachment 170619
At the beginning i was confused because at the IDE your dont see the defined background color.
-
ListView ListItem and /SubItem Backcolor (UseItemStyleForSubItems property)
There exists a ListItem property named "UseItemStyleForSubItems" that enables you to change the backcolor of ListItems and SubItems.
Is it possible to add this property to the ListView control?
See https://www.google.com/search?q=list...yleForSubItems
-
4 Attachment(s)
ListView column alignment bug
i created a listview with report mode and defined that the first and fifth column is right-aligned.
i also used FullRowSelect=False and AutoSelectFirstItem=False
after i created the report i get this:
Attachment 170621
the first item is auto selected but i used AutoSelectFirstItem=False and the alignment is switched from right to left because the item was autoselect...
normally it should look like this:
Attachment 170623
after i click on another item it looks like this:
Attachment 170625
1. i can avoid this alignment-swapping when i set FullRowSelect=True.
2. if AutoSelectFirstItem is set to False the control should not autoselect the first item ,or?
3. is it somehow possible to lock the listview without using enable=false to prevent user mouse clicks or keyboard inputs? i guess a .locked property would help here...
Example project: Attachment 170627
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Update released
The BackColor property works now when the VisualStyles property is False and regardless of the style, placement or draw mode.. So BackColor is always rendered now.
Attachment 170633
Due to the 2-step drawing of the TabStrip (WM_ERASEBKGND+WM_PAINT) I decided to include a DoubleBuffer property merging the two steps into one in a memory DC on WM_PAINT.
This reduces flicker also for the themed TabStrip.(!)
Quote:
Originally Posted by
Mith
At the beginning i was confused because at the IDE your dont see the defined background color.
That's because I want to avoid subclassing the control + usercontrol at design time. The property is clearly stating:
"Returns/sets the background color used to display text and graphics in an object. This property is ignored at design time."
Quote:
Originally Posted by
Mith
You'r right. There is no BackColor property for ListItems and SubItems..
However, you can change the BackColor via the ItemBkColor event. (applicable for all it's SubItems of an ListItem)
Code:
ListView1_ItemBkColor(ByVal Item As LvwListItem, RGBColor As Long)
Quote:
Originally Posted by
Mith
the first item is auto selected but i used AutoSelectFirstItem=False
I re-checked and confirm that this behavior is intended.
If AutoSelectFirstItem is True the item has LVIS_SELECTED + LVIS_FOCUSED
If False the item has only LVIS_FOCUSED
But in both cases .SelectedItem returns an item because it checks for LVNI_FOCUSED.
This behavior is intended to be like this and won't be changed.
Quote:
Originally Posted by
Mith
can avoid this alignment-swapping
As you noted you can workaround this by having fullrowselect = true
MSDN says:
LVS_REPORT
This style specifies report view. When using the LVS_REPORT style with a list-view control, the first column is always left-aligned. You cannot use LVCFMT_RIGHT to change this alignment. See LVCOLUMN for further information on column alignment.
I know this limitation. In my implementation I workaround this by adjust the LVCOLUMN.fmt value after the insert of the item.
So at least it works for fullrowselect = true. However, when that's False then you have glitches.
-
Re: Run-time-error ´429´ ActiveX component can´t create object
Quote:
Originally Posted by
Mith
VBCCR15 v1.5.20 (side by side)
some users got the following error message box when starting my app under windows 10:
Code:
VBCCR15
Run-time-error ´429´
ActiveX component can´t create object
This error message displays 2 more times after clicking the OK button.
after that the app shows "Run-time-error ´440 Automation error" and the app GUI never displays.
Any ideas how to fix or debug this problem?
Does anyone know what kind of objects will be created by VBCCR15 ?
Maybe it is some kind of a dependency problem?
BTW: i cant reproduce this problem by myself using win10...
Did you ever discover the cause of this? I'm having what I believe is a similar issue. Upon launching my application, two users both report a msgbox window with title "VBCCR16" and a message of "Run-time error 0". When they click OK they get a Run-time-error 429. And my app never appears. This is my first app I've deployed with VBCCR16 so any support tips for dealing with these issues would be appreciated!
-
Re: Run-time-error ´429´ ActiveX component can´t create object
Quote:
Originally Posted by
AAraya
Did you ever discover the cause of this? I'm having what I believe is a similar issue. Upon launching my application, two users both report a msgbox window with title "VBCCR16" and a message of "Run-time error 0". When they click OK they get a Run-time-error 429. And my app never appears. This is my first app I've deployed with VBCCR16 so any support tips for dealing with these issues would be appreciated!
Do you use ImageList with 32 bit pictures?
It has been discussed several times with run-time error 0. It's MS fault and I can't really help.
-
Re: Run-time-error ´429´ ActiveX component can´t create object
Quote:
Originally Posted by
Krool
Do you use ImageList with 32 bit pictures?
It has been discussed several times with run-time error 0. It's MS fault and I can't really help.
I may. I will check. What is the solution for this problem? What color-depth is acceptable for this control?
Also, I'm curious why only a couple of my users see this. What other factors are involved here?
-
Re: CommonControls (Replacement of the MS common controls)
Try to investigate the differences between the users.
Windows versions etc etc
-
Re: Run-time-error ´429´ ActiveX component can´t create object
I remember a similar problem.
No special reason found, but the solution:
Some of my form had an icon associated in the IDE.
On my test-PCs all worked fine, on some but not all users PCs not.
Error 429, error 0, and only when using VBCCR.
The solution was to remove the icons of the forms.
And set them by code during runtime.
No single error since then.
This is a shot in the dark, but perhaps you can try.
EDIT:
I think the error came up on Win7 systems only.
-
Re: Run-time-error ´429´ ActiveX component can´t create object
-
Re: Run-time-error ´429´ ActiveX component can´t create object
IIRC the problem is that Win10 accepts images to be loaded into the imagelist at design time which are NOT acceptable to Windows 7. So everything works fine on a Win10 dev machine but can fail when the app is run on Win7.
Details:
https://stackoverflow.com/a/54136587/3195477
and actually this other post was trying to get to the bottom of the issue in Windows:
https://stackoverflow.com/questions/...ion-of-windows
but never had a satisfactory conclusion.
-
1 Attachment(s)
Windows 10 Run-time-error -2147221164 (80040154) Class not registered
VBCCR16 v.1.6.45
one user recieved this error message using my app under win10:
Attachment 170899
Run-time-error -2147221164 (80040154) Class not registered
I use VBCCR16.OCX side-by-side w/o registering the ocx.
any ideas how to fix that?
I cant reproduce this error message myself using a fresh installed win10.
Thanks for any help!
-
Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered
Quote:
Originally Posted by
Mith
VBCCR16 v.1.6.45
one user recieved this error message using my app under win10:
Attachment 170899
Run-time-error -2147221164 (80040154) Class not registered
I use VBCCR16.OCX side-by-side w/o registering the ocx.
any ideas how to fix that?
I cant reproduce this error message myself using a fresh installed win10.
Thanks for any help!
Is the side-by-side msnifest in a resource file integrated into the .exe or external file?
Some windows installation don't accept external file manifests due to settings.
-
Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered
Quote:
Originally Posted by
Krool
Is the side-by-side msnifest in a resource file integrated into the .exe or external file?
Some windows installation don't accept external file manifests due to settings.
Yes, the manifest file is integraded into a ressource file compiled into the exe.
but guess what, i told the user to manually register the VBCCR16.OCX and now the app runs w/o the error!
i thought we dont need to register SxS files at the system to use them, or im wrong?
-
Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered
-
Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered
Quote:
Originally Posted by
Mith
i thought we dont need to register SxS files at the system to use them, or im wrong?
Registering it manually was a workaround for the problem in the manifest. If you can correct the manifest then it isn't necessary.
I've sometimes found Process Monitor and Process Explorer (google) useful to debug VB6 manifest issues. You can see what tries to get loads & fails, what really is loaded, etc.
-
Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered
Quote:
Originally Posted by
DaveInCaz
Registering it manually was a workaround for the problem in the manifest. If you can correct the manifest then it isn't necessary.
I've sometimes found Process Monitor and Process Explorer (google) useful to debug VB6 manifest issues. You can see what tries to get loads & fails, what really is loaded, etc.
i tested the app with windows 10 / WinXP and no error occured. the manifest file should be correct, or?
i also compared my manifest file with the file "VBCCR16SideBySide.res" and everything is the same.
my manifest file includes more than 20 ocx/dll files and none of them makes a problem.
i guess there must be another problem with the computer of the user because all other users can use the app w/o any problem!
The question is: what is wrong with this computer?
SxS works at this computer, because all other OCX files dont need to be manually registered.
-
Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered
Can someone tell me the advantages to not register the OCX?
-
Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered
Quote:
Originally Posted by
Karl77
Can someone tell me the advantages to not register the OCX?
Yes, "dll-hell"
-
Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered
Quote:
Originally Posted by
Karl77
Can someone tell me the advantages to not register the OCX?
- your app can use another dll version than the one on the system installed
- all the DLLs you use can stay in one (sub)folder
- portable app
-
Re: CommonControls (Replacement of the MS common controls)
Thanks a lot for your valuable work sir!
I Packaged the 'ComCtlsDemo' project using 'Package & Deployment Wizard' and installed the application on my Windows 10 - 32 bit PC. When I run the application, all the controls look beautiful with latest theme. But, when I click on 'RichTextBox' or 'Command2' button, the application crashes without any warning. However, everything works just fine under VB IDE, though the controls look in classic style.
Please suggest a solution!
Also, if possible, please add Scrollbar controls.
-
Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered
Quote:
Originally Posted by
Karl77
Can someone tell me the advantages to not register the OCX?
In general (not specific to this OCX) I've found that our manifested VB6 apps are far more robust. Our manifest is quite comprehensive of dependencies and this has reduced a lot of brittleness and customer support issues because there are just far fewer places for things to go wrong.
Aside from the fact that the manifested app is more isolated from other random changes on the customer's PC, it also means we are always running against & testing against exactly the configuration that we ship.
Dave
-
Re: CommonControls (Replacement of the MS common controls)
Hi, I have a problem with the Toolbar. The TAGs of the ButtonMenus of the Buttons disappear when saving/running the project. I've used the KEY instead of TAG as a workaround but don't know if it's a bug.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
PauloFranc
Hi, I have a problem with the Toolbar. The TAGs of the ButtonMenus of the Buttons disappear when saving/running the project. I've used the KEY instead of TAG as a workaround but don't know if it's a bug.
That was a bug, which was easy to fix now.
Thanks for reporting.
-
Re: CommonControls (Replacement of the MS common controls)
I am using VBCCR16. OCX.
I observed that when rtf text is loaded in RichTextBox and if ScrollBars property is 3 - vbBoth, the rtf text gets aligned horizontally outside horizontal boundaries of RichTextBox and only Horizontal ScrollBar appears. So you've to traverse horizontally to read the text.
I think the case should be opposite.
The rtf text should align vertically and so a Vertical ScrollBar should appear first. Therefore, you should be able to traverse vertically to read rtf text.
-
Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered
Quote:
Originally Posted by
Mith
VBCCR16 v.1.6.45
one user recieved this error message using my app under win10:
Attachment 170899
Run-time-error -2147221164 (80040154) Class not registered
I use VBCCR16.OCX side-by-side w/o registering the ocx.
any ideas how to fix that?
I cant reproduce this error message myself using a fresh installed win10.
Thanks for any help!
Another user has send me the same bugreport.
He installed windows 10 v1903 and after he installed my app.
When starting the app he got the error "VBVCCR16 Run-time error "-2147221164 (80040154)": Class not registered".
I told him to manually register the file and now the app runs well.
Why he have to manually registering a side-by-side OCX file? I dont get it...
-
Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered
Quote:
Originally Posted by
Mith
Why he have to manually registering a side-by-side OCX file? I dont get it...
When I began using VBCCR, I also used the side-by-side approach.
In here it turned out that it was not reliable.
Of course I thought (and think) this was caused by my own errors.
In order to avoid DLL hell, I made my 'own' VBCCR with a different name.
It can't conflict with the original.
While I was at that, I married VBCCR and VBFlexGrid, and added most of my own UCs.
And because it is so simple, I register this 'All-in-one' OCX on setup.
No single error up to now.
-
Re: CommonControls (Replacement of the MS common controls)
I can't replicate any SxS error. It would be interesting to know if something is missing in the manifest or if this is just windows setting confusion stuff on certain users.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
I can't replicate any SxS error. It would be interesting to know if something is missing in the manifest or if this is just windows setting confusion stuff on certain users.
FWIW I've been running VBCCR1x in a SxS manifest for years and have never had a problem either.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
I can't replicate any SxS error. It would be interesting to know if something is missing in the manifest or if this is just windows setting confusion stuff on certain users.
Maybe related to the manifest padding issue described here?
-
Re: CommonControls (Replacement of the MS common controls)
Hi Krool,
Just to say thanks for making this and making it available to all of us that are still using VB6 :)
And thanks for how fast you solved this...
-
Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered
Quote:
Originally Posted by
Karl77
In order to avoid DLL hell, I made my 'own' VBCCR with a different name.
It can't conflict with the original.
The user did a fresh windows 10 installation and there was no other VBCCR16.OCX on that system installed...
i guess there must be some windows 10 bug with the SxS functionality.
It looks like that the Windows system cant automatically register the file VBCCR16.OCX when starting the app.
But as i wrote before, i cant reproduce this problem at Windows 10 and 1000 other users dont have this problem too.
Only 1-2 users expierend this problem and the workaround is to register the OCX for all users at the windows system.
I used SxS to avoid registering the OCX files of my app for all windows users but now SxS not works correctly and only for the file VBCCR16.OCX.
All the other OCX/DLLs of my app have no problem with SxS...strange
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
jpbro
Thanks for the hint but the manifest works w/o any problems for me and the most users.
i couldnt find any error at the manifest file.
Juding by the error message of the 2 users it looks like there be some other reason the windows system cant automatically registering VBCCR16.OCX when the app starts...
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Mith
Thanks for the hint but the manifest works w/o any problems for me and the most users.
i couldnt find any error at the manifest file.
Juding by the error message of the 2 users it looks like there be some other reason the windows system cant automatically registering VBCCR16.OCX when the app starts...
My bet is that they make a custom resource file with all kinds of manifests (xml nodes) included and that maybe in that heavy weight .res file there is a issue with the manifest.
Would be interesting to know those users who have problem with SxS with VBCCR16.OCX still have it when using the "original" manifest which can be downloaded here.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
My bet is that they make a custom resource file with all kinds of manifests (xml nodes) included and that maybe in that heavy weight .res file there is a issue with the manifest.
I already tested the app on all windows platforms from WinXP to Win10 and there are no SxS problems.
And thousand other users using the app on different windows platforms and noone had a problem so far with SxS and VBCCR16.
IMHO the problem not comes from a wrong manifest file. If so all users including me should expierend the same problem, or?
Quote:
Originally Posted by
Krool
Would be interesting to know those users who have problem with SxS with VBCCR16.OCX still have it when using the "original" manifest which can be downloaded here.
Sorry, thats currently not possible. The users with the SxS problem already have registered the OCX file at their windows system...
My bet is there is some kind of a windows bug that prevents the VBCCR16.OCX to register themself under specific circumstances when the app starts. Maybe it have something to do with the user rights?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Mith
Sorry, thats currently not possible. The users with the SxS problem already have registered the OCX file at their windows system...
If your user is patient and willing to help you (and all of us), he could unregister it and see what happens.
-
Re: CommonControls (Replacement of the MS common controls)
> Sorry, thats currently not possible. The users with the SxS problem already have registered the OCX file at their windows system...
Manifests overwrite registry COM entries.
It's possible to get into a limbo though, a franken-registration where half the keys are from the manifest and some missing entries are gleaned from the registry.
That would be very hard to debug, probably w/ RegMon from sysinternals on the broken machine.
cheers,
</wqw>
-
Re: CommonControls (Replacement of the MS common controls)
thanks krool for all your work...
one suggestion, could you add an about box for each control, many a time I got confused what control I am using, MS Controls or VBCCRP.
thanks
-
Re: CommonControls (Replacement of the MS common controls)
FONTCOMBO QUESTION
I'm in the middle of investigating the FontCombo control (struggling with the "@" fonts).
Code:
Private Function EnumFontFunction
is called twice.
I wonder if this is right or not?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Karl77
FONTCOMBO QUESTION
I'm in the middle of investigating the FontCombo control (struggling with the "@" fonts).
Code:
Private Function EnumFontFunction
is called twice.
I wonder if this is right or not?
Yes, that's correct. The enum is per charset and the additional enum is wanted for the SYMBOL_CHARSET.
-
Re: CommonControls (Replacement of the MS common controls)
FONTCOMBO QUESTION2
In the EnumFontFunction I need to exclude determined fonts from populating the list.
I added a ExcludeList property to the control.
Works fine if I set the ExcludeList at design time.
But I need the functionality at runtime.
That doesn't work because the list gets populated before I can set my ExcludeList.
I tried with .Refresh after setting the ExcludeList, but that doesn't work either.
What should I do?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Karl77
FONTCOMBO QUESTION2
In the EnumFontFunction I need to exclude determined fonts from populating the list.
I added a ExcludeList property to the control.
Works fine if I set the ExcludeList at design time.
But I need the functionality at runtime.
That doesn't work because the list gets populated before I can set my ExcludeList.
I tried with .Refresh after setting the ExcludeList, but that doesn't work either.
What should I do?
What does your custom ExcludeList property exactly?
So I can check why it's only working at design time.
Workaround could be that at run-time you loop thru all items and use CB_DELETESTRING.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
So I can check why it's only working at design time.
That's now logical to me, because the list gets populated before the UC can read the property.
And after I set the ExcludeList property there is not function to recreate the list.
So no need to check on this.
Quote:
Workaround could be that at run-time you loop thru all items and use CB_DELETESTRING.
That seems to be the only correct way to me, and not a workaround.
Because the EnumFontFunction runs twice as you explained, it makes no sense to do the exclusion in that place.
Could you make a very short example on how to CB_DELETESTRING from the Combobox?
I fear to destroy the order when certain items get deleted.
Thank you for that.