What is msstdfmt.dll? - vb6

The file msstdfmt.dll is I believe supplied with Visual Basic 6 and is sometimes a dependency for deployment.
The copy on my PC includes the helpstring
Microsoft Data Formatting Object Library 6.0 (SP6)
which is not very informative.
What is this DLL for? What are the key functionalities that it provides?

According to Microsoft documentation:
The Microsoft Standard Data Formatting Object Library is required for
controls that implement a DataFormat property. An Application Error
occurs when a control makes an attempt to use the DataFormat property
and the Microsoft Standard Data Formatting Object Library is not
registered. Controls that implement a DataFormat property include, but
are not limited to, the following:
CheckBox, ComboBox, Image, Label, ListBox, PictureBox, TextBox,
ImageCombo, MonthView, DTPicker, Calendar, DataCombo, DataList,
DBCombo, DBList, MaskEdBox, RichTextBox.

It is used pretty extensively for data formatting.
It gets used implicitly with many databound controls and when you create databound UserControls or datasource UserControls and Classes. Instances of the StdDataFormat object it provides can also be used explicitly, either for direct use in code or even assigned to an ADO Field object's DataFormat property.
It is a pretty fundamental library for any VB6 program that is not written in "Let's pretend we are writing QBasic" i.e. Dark World scripting mode. Egad, you may as well be using stone knives and bearskins (a.k.a. Python).

Related

Shape property "decorative" not in VSTO?

I program PowerPoint add-ins both in VBA and in VSTO. In VBA I can use shape.Decorative to check, if a shape is decorative - and therefore does not need an alternative text. In VSTO however there is no such property.
I'm using Visual Studio 2022, the reference to PowerPoint is set to version 15.0.0.0.0 - but I can't see where I could change that. Am I using the wrong template?
I'm grateful for any tips how to get to that attribute. Thanks in advance, Sabina
The PowerPoint object model provides the Shape.Decorative property which sets or returns the decorative flag for the specified object. So, it doesn't matter whether it is a VSTO add-ins or VBA macro. The PowerPoint object model is common for all programming languages. In this situation you can:
Use a newer PIA to get access to the property (with intellisense suggestions).
Use the late-binding technology to invoke the property programmatically even when it is not available in PIAs. The Type.InvokeMember method invokes a specific member of the current Type.

What is imgMain control in visual Basic 6?

I'm using a VB6 application as a reference and have come across imgMain. I'm assuming its an image control, however, I cannot find the object on any of the forms. It's used to load the image. I'm just not sure what's going on with this. I'm assuming its an IMAGE CONTROL, but I cannot find this on any of the forms? it's mentioned a lot of times in teh application as it lets you view incoming faxes and stuff.
Without having a look on source code i assume It might be custom user control that was created for some reasons probably to extend basic picturebox control.
One thing i can advise you is to further inspect code and dig to code of this custom control. If code for this control is not available then see what methods and properties instances of that particular control uses and compare them with regular picturebox.

Codedom at runtime

I am building a code generation tool using vs 2010 visualisation & modelling sdk. One of the things that I need to generate is a simple data capture ui (windows forms, preferably using devexpress layout control), with capture fields & labels for each property in a class.
I can use t4 text templates to do this, but I am conscious that I will be re-inventing the wheel if I do this - a simpler approach would be to add controls to a form constructed at runtime and allow the appropriate codedomseriaizer to generate the form.designer.cs code for me - is this possible?
To summarise, I would like to build a form at runtime, and retrieve a string of the designer.cs file..
Graham
Could you not simply leave the runtime generation code in use, and design only the other parts of the form using the designer? This way the autogenerated controls will be automatically updated if new properties are added to the class.

Programatically configure Office 2010 Word Ribbon via VBA

Is it possible to configure a Ribbon (e.g. adding a tab etc.) in Office 2010 programatically via VBA? I.e. by writing VBScript code in a macro.
Br. Morten
You can manipulate a Ribbon tab and its controls using VBA, but you cannot create one. Not with the Object Model anyway. The best you could do - somehow - is to get some kind of OPC dll (like an ActiveX component) that handles opening/relationships/closing of OPC documents (like .docx documents) and old school MSXML for creating a ribbon definition and adding it to the package.
Have a look at this blog post for Excel
http://www.xtremevbtalk.com/showthread.php?t=265636
and this one for Word
http://www.wordarticles.com/Shorts/RibbonVBA/RibbonVBADemo.htm
If your UI is static, i.e. you don't need to programatically change the behavior of, or add/remove UI elements on the fly, you can define a customUI within a macro-enabled template. You can use your VBA functions as call-backs for the UI elements defined in the XML.
Have a look at this guide. In a nutshell, you define a customUI\customUI14.xml file within the .dotm archive. This XML describes your custom ribbon elements using this schema.
This definitely works for Word templates (.dotm files). I think a similar approach works for any OOXML format.

custom controls with sub components ownership

I have a Visual Studio designer enabled control which uses a collection editor to allow the user to create and edit sub components.
For example, I have a control which offers a readonly "List" property containing a collection of bindings (themselves components with a name property and an event). The user can modify this list of bindings at will and everything works pretty well. They can create and remove bindings without a glitch.
However, when they copy the control, the designer does not copy the binding, it still refers to the original binding components. Also, when they delete the control, it doesn't delete the bindings. It is as if the form has the ownership of these bindings, not the control.
I'm sure there is an attribute to use or some interface to implement, maybe even a custom editor trick to use, but googling for it has left me "feeling unlucky".
Thanks for any help you may have! :)

Resources