MSComctlLib reference/components load with "was not a loaded control class" error - class

I'm having trouble oppening an project developed in VB6. Some controls attached with MSComctLib class are not loading.
I'm using Windows 7.
In the error analysis the following message appears (without the number of lines):
Class MSComctlLib.ImageList of control ImageList1 was not a loaded control class.
Class MSComctlLib.Toolbar of control Toolbar1 was not a loaded control class.
MSComctlLib.StatusBar class of control sbStatusBar was not a loaded control class.
and then a lot of invalid property names,
Ex:
The property name _ExtentX in ImageList1 is invalid
The property name Buttons in Toolbar1 is invalid
...
According to the guidance of microsoft support site http://support.microsoft.com/kb/896559, an update would be the solution http://www.microsoft.com/en-us/download/details.aspx?id=10019
I tried running the executable VisualBasic6-KB896559-v1-ENU
but I still have the same error when opening the project.
Could someone tell me how to solve it?
Thanks in advance!

If you don't have the common controls selected in your project, but the controls are on a form, then you'll receive these errors when you try to load the project (or add a pre-existing form to a project that doesn't have the component selected).
On the VB6 menu, select Project-Components. Scroll down to Microsoft Windows Common Controls 6.0 (if you have a service pack installed, then the SP level will usually be at the end of the library name). Select that component, click Ok. Save the project, and then reload the project.
If this is the source of your issue, you should now be able to load those forms that have a reference into the common controls.

Related

how to export then import a powerapps solution that has a canvas app using a custom component

I cannot seem to export then import a powerapps solution that has a canvas app that references a custom component. I'm using the powerapps portal to create the solution, where I add the canvas app that uses the custom component. When I export, download, and try to import the solution at this point it fails with the error:
error code 8004F036: The dependent component CustomControl (Id=xxx) does not exist. Failure trying to associate it with CanvasApp (Id=yyy) as a dependency. Missing dependency lookup type = EntityNameLookup.
If I first go to the solution and click 'add required objects' it will not add the custom component. If I manually add it, it shows it as added, but still after exporting, downloading, and importing, I get the same error. It would be great if someone knows the proper steps to get this working.
You will have to do this in 2 steps.
custom control (either you created on or you used from some 3 rd party) should be deployed (imported) to Target system. If it is managed solution from 3rd party then you might have solution.zip file use this and deploy to target system. If you created this custom control, then create separate solution and just add your custom control and deploy this solution.
Once custom control is imported, then deploy/import your powerapps solutions.

Is there a way to retrieve information from a ui element that has the property IsControlElement = False? (Python + Appium + WinAppDriver)

Greetings and salutations!
I'm working on a UI automation project for a windows desktop app (FrameworkId: Win32)
Stack: Python (3.7) + Appium (1.15.1) + WinAppDriver (v1.1).
I have identified an element using Inspect.exe, but when I try to code, whatever I do I receive this error:
selenium.common.exceptions.NoSuchElementException: Message: An element could not be located on the page using the given search parameters.
The locator strategy I'm using is xpath:
self.driver.find_element_by_xpath("//*[#LocalizedControlType='text' and #IsControlElement='false']")
As you can see, Inspect.exe has shown that it has the property "IsControlElement='false'", but I cannot for the life of me "access" it via code.
I would also like to point out that any elements that had the IsControlElement='true' are properly found and I can "interact" with them.
Thank you very much for your help!
Source of issue
This is probably an issue within Microsoft's UI Automation implementation in .NET.
The property IsControlElement should have returned true while it didn't.
From my tests, it seems to be an issue somewhere within UIAutomationCore.dll.
I speculate that the root cause is that the automation implementation was targeted for accessibility in mind, and they have mistakenly ignored some controls which are NOT readable (Image, Geometry, etc.).
Workaround for some cases
Try to use UI control from a type that has a text.
if it's already a textual control, try to use a different textual control type. for example - in WPF project - use Label instead of TextBlock
if it's NOT a textual element, if possible, wrap the control in a textual element. in WPF projects you can use a <Label Padding="0"> as a wrapper.
Other things to consider
Try to use UIAComWrapper
Related issues
https://stackoverflow.com/a/46452431/426315
UIAutomation won't retrieve children of an element
UI Automation - #32770 (Dialog) shows in Insepct.exe but not in VisualUIAVerifyNative.exe
Side Note
Since you haven't specified which Python GUI library are you using, I was not able to provide examples for your library. Sorry.

ServiceLocator Current GetInstance?

I have assemblies discovered in a directory using MEF and they are loaded when needed during runtime when a user selects a menu.
After a assembly is loaded each has its own UI and views can be added to it as the user needs them, but when I use excelView = ServiceLocator.Current.GetInstance(); I get an exception.
Exception Details
How do I solved this problem, because I'm assuming directory discovered assembles are added to the AggregateCatalog so the ServiceLocator can find them right?
This is how the main IExcelView is setup:
I found the problem, I needed to add the Key I used to Export the class.

ATG browser components is not available

I want to create new companent in ATG. And if I forward to Browser Companent page, then I have 404 error. How I can fix this?
I assume that you have created a new component by creating a .properties file. The things to look for are
Is the file in an appropriate config layer? i.e. is it in a location on the configpath, such as the config directory of a module, or the localconfig directory of a server, where the application expects to look for .properties files?
Is the file a valid .properties file and properly formatted?
Is the class mentioned in the $class property correct, valid and fully qualified (package name and class name)
Has the named class been compiled successfully?
Is the named class available on the classpath? i.e. is it in the classes.jar of a module or in the classes directory (if that is how the module's class path has been defined?
Is the class a valid JavaBean - particularly, does it have a no-argument constructor?
Have you compiled, built and assembled your ATG application since creating this new component?
Have you restarted your ATG application since creating this new component?
Assuming this is all correct and yet you still cannot see your component, the next step is to troubleshoot why it is not visible.
Is the path to your component you are using in the dyn/admin component browser correct?
If the path is correct, and you still see an error in the browser, then take a look at the server logs (for around the time you first tried to access the component) - you might see an error or a sequence of errors telling you why the server could not instantiate the component
Can you go to the containing folder and see if the component is listed there - though it is OK if you cannot because it may not have been started if nothing is referencing it
Can you see your component in the ACC. Start the ACC, and go to View Components by Path and navigate to were you think your component should be. Can you see it there? If so, it means that your properties file is OK.
In the ACC, When you click on the puzzle-piece icon that represents your component, does it show it as being an instance of your class or as an instance of Object. If Object, it means that it cannot determine the class of the component
In the ACC, double-click the component and try to start it. Keep looking at the server logs as you do so
This should help you get to the bottom of things.

How to create view via fragment that is linked to applicatio model eclipse plugin

Using application.e4xmi, I want to create view via fragments using this application model. Could you please tell me the step by step procedure.
what i have tried is, i have created one fragment in the one plugin application. in that i have given application id after that i have created part stack and after that created part. Here i have given class URI is my view class(path of view class in the viewplugin project). But without that view plugin in the runconfigurations, i am unable to see view part.
As far as I understand your question, you wish to have a plugin containing a model fragment which contributes to an application model located in another plugin, and the problem is that a (View-)Part you tried to contribute that way doesn't show in the application window. I hope I didn't get you wrong there and I will assume that the error is not just that the plugin with the model fragment is not included in the run configurations... (?)
You can find a useful tutorial in Lars Vogel's webpages. However, as the various requirements may be confusing, I will summarize the process for potential future readers.
TL;DR:
You might have set a wrong Element ID and/or Featurename for your Part.
Your question implies that you maybe tried to implement a Part model element as a ViewPart, when in E4, there is no longer any interface for a (View) Part to implement, so maybe try creating the Part controls in a #PostConstruct-annotated method instead.
Another possible reason for your contributed Part not showing up is the plugin providing the model fragment not having the correct settings for the bundle options SymbolicName and/or ActivationPolicy ('Plug-in is singleton' and 'Activate when class is loaded').
Application
In order to have an application model to contribute to, we first need an Eclipse4 application project. Create one by selecting File -> New -> Other from the Eclipse main menu. Choose the wizard Eclipse 4 Application Project in the Eclipse 4 category. Name your project as you wish, choose Equinox as OSGI framework, and check the Generate an Activator... option. The newly created project will contain a file Application.e4xmi (your application model) and a *.product file (product definition). Open the latter in and make sure org.eclipse.e4.ui.workbench.swt.E4Application is set as Application in the Overview tab.
Open Application.e4xmi and append a Part Stack somewhere in the model tree, as you probably have already done anyways.
Model fragment
Create a new plugin for the model fragment. Letting it have an Activator class won't harm. It is important, however, that the options Activate this plug-in when one of its classes is loaded and This plug-in is a singleton are both checked in the Overview tab of its plugin.xml editor. Next, create a model fragment with New -> Other... -> Eclipse 4 -> Model -> New Model Fragment in the plugin's Package Explorer context menu. The wizard will automatically create an extension of org.bbaw.bts.ui.pdr.fragment specifying your model fragment file. The plugin's dependencies should include:
org.eclipse.swt
org.eclipse.jface
org.eclipse.e4.core.di
org.eclipse.e4.ui.workbench
javax.inject
org.eclipse.e4.ui.di
Open the model fragment file (fragment.e4xmi by default) and attach a Model Fragment to the Model Fragments node. Your new Model Fragment element needs to specify both an Element ID and a Featurename in order to correctly address the Application Model's element that you want to contribute to. Thus, copy the ID of the Part Stack previously created in the Application Model into the Element ID field of the Model Fragment you've just created. In the Featurename field, type children, as this is the Part stack's attribute we want to contribute to. Then, append a Part to the Model Fragment element and specify the Class URI of the Part's implementation. This class is basically a POJO, no implementation of ViewPart is necessary! It creates its GUI in a method annotated with the #PostConstruct annotation, e.g.
#PostConstruct
public final void createComposite(final Composite parent)
That should be it. When running the application project's product, the Part should appear like expected (given the plugin containing that Part is included in the run configuration...).