Quick VB6 Sample and String Finder
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Quick VB6 Sample and String Finder
I've been working on upgrading some legacy VB6 code from the old Viewer to the Editor so I created a basic sample that others might find helpful.
I also compiled up the VB sample in this for other to use because it has routines to list the various strings for commands, commandbars, menus, tools, and so on for users to help migrate up from the Viewer. I've found the Find Text in List helpful to search for the strings I need for the various tools, cmd, and properties.
I also compiled up the VB sample in this for other to use because it has routines to list the various strings for commands, commandbars, menus, tools, and so on for users to help migrate up from the Viewer. I've found the Find Text in List helpful to search for the strings I need for the various tools, cmd, and properties.
- Attachments
-
- PDF-XChangeEditorSample-V1.zip
- (93.74 KiB) Downloaded 119 times
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Quick VB6 Sample and String Finder
Hello RMan,
Thank you very much for the sample. We will check it out and will publish it on our Git page.
Cheers,
Alex
Thank you very much for the sample. We will check it out and will publish it on our Git page.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 211
- Joined: Sun Aug 05, 2012 5:20 pm
Re: Quick VB6 Sample and String Finder
Thanks a lot for this, huge help. Still have problem though that cannot load user settings from file. does nothing, doesn't throw any error, not sure if any suggestions on how to remedy this perhaps registry in the only option?
Call PDF.Inst.LoadUserSettings(PDF.Inst.CreateString(App.Path & "\PCMPDFSettingsEditMode.xcs"), 0)
Call PDF.Inst.LoadUserSettings(PDF.Inst.CreateString(App.Path & "\PCMPDFSettingsEditMode.xcs"), 0)
Re: Quick VB6 Sample and String Finder
Try defining it as a PDFXEditCtl.IString and leave off the optional parameter. Here's what I'm using to load it from the Registry.
Dim oString As PDFXEditCtl.IString
Set oString = PDFEditor.Inst.CreateString("HKCU\" & g_sRegistryTrackerCtrlSettings)
Call PDFEditor.Inst.LoadUserSettings(oString)
Dim oString As PDFXEditCtl.IString
Set oString = PDFEditor.Inst.CreateString("HKCU\" & g_sRegistryTrackerCtrlSettings)
Call PDFEditor.Inst.LoadUserSettings(oString)
Re: Quick VB6 Sample and String Finder
Also it might have to be the newer .xces type of file. Try renaming it as .xces and loading that into the Editor first and resaving it. But I seam to remember a couple functions where I had to define the parameters first instead of calling them inline like you were doing.
-
- User
- Posts: 211
- Joined: Sun Aug 05, 2012 5:20 pm
Re: Quick VB6 Sample and String Finder
yes this function only works I found for the setting.dat, registry type file, the exported xcs file has to use the import settings command, more difficult, still learning the interfaces, as the example in C# is easy and works fine, but no issue now, just using your registry example
-
- User
- Posts: 211
- Joined: Sun Aug 05, 2012 5:20 pm
Re: Quick VB6 Sample and String Finder
Hi RMAN, any chance you could explain how you got the editor to handle events in VB6, I am unclear by your example. Thanks
Re: Quick VB6 Sample and String Finder
I don't think I've really had to use callbacks yet. I've been off this for a bit so I'll try to jump back on it and take a look. If you don't have to do anything with the callback you might be able to just pass Nothing to it or define a VB Class Module and set it to that. In the test project I have a class module I was working on for the bookmarks pane but I never got it to work yet. But here's what I had so far.
Is this for the settings or exactly what are you trying to do?
Is this for the settings or exactly what are you trying to do?
- Tracker Supp-Stefan
- Site Admin
- Posts: 17929
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Quick VB6 Sample and String Finder
Hi RMan,
It seems like the main discussion on this subject is now in the other topic:
https://forum.pdf-xchange.com/ ... 66&t=28826
So If you don't mind - lets continue the discussion there.
Cheers,
Stefan
It seems like the main discussion on this subject is now in the other topic:
https://forum.pdf-xchange.com/ ... 66&t=28826
So If you don't mind - lets continue the discussion there.
Cheers,
Stefan