Colordialog in PowerPoint - vsto

I am making some add-in to PowerPoint.
I would like to let user choose color using colordialog (or some other this kind control). But it would be the best if it would look exactly like built-in color dialog/color picker in PowerPoint, and with the same colors in sections Theme Colors, Custom Colors and Standard Colors. Is it achievable? If yes, how can I achieve it?

It really depends on what you need to use the color for. Office has many pre-defined controls that can be easily incorporated into an addin, some of which use the standard Office color picker (which includes the theme colors, custom colors, etc. that you are looking for). You can download a list of all Office controls from the Microsoft website (you will only need to use the PowerPointControls.xlsx file). Any of the controls listed in the file can be added to your addin by specifying the idMso in the ribbon XML (assuming you are creating a ribbon). You will need to look through all of the controls to se if there is one that matches the functionality you are looking for.
Note that most of the controls have some sort of additional functionality attached to them in addition to selecting a color. I have not yet found one that selects and returns a color. Hopefully what ever functionality you are in need of is included in one of the controls. You may be able to get a better answer if you provide more information on your specific application.

Related

Picture Transparency Object in PowerPoint VBA

PowerPoint added native capability for picture transparency (without having to create a shape) in late 2018. See that linked article to see what I mean.
I'm trying to figure out what/if an appropriate VBA object exists for it (there's not much online since it's a fairly new feature). I've tried the traditional FillFormat.Transparency object, as well as a few other analogous attempts. (Basically, have been searching the VBA documentation up and down for an hour or two).
Any thoughts?
Currently, there is no way to set the Picture Transparency directly (without using a Shape Fill). You would notice that the Shape properties are arranged somewhat as it appears on the Picture Tools Pane. For example, the Picture settings are on the last tab (where you have Picture Corrections, Color, Transparency and Crop). These are all accessible with the Shape.PictureFormat object. (The .FillFormat is only applicable when you are filling a shape).
You will notice the .PictureFormat has Properties relating to the aforementioned settings, except for Picture Transparency. The .PictureFormat.TransparencyColor cannot be used to set the degree of transparency.
The PowerPoint VBA object model often lags well behind new features that appear in the user interface, so there's nothing available yet to do what you want.
Just a note, when it appears, transparency will be a property, not an object. The current TransparencyColor and TransparentBackground properties are for the old routine that creates a single picture color that is 100% transparent.

How do I style a word document exported from a webpage in VB.Net

I'm trying to export text retrieved from a database into a word document in VB.Net and while I have a working example, I need to figure out how to style some sections of the document appropriately.
I have found a few working examples from MS Online resources (such as this one), which I've found can cover some basics:
para.Range.Text = "Quad Chart"
para.Range.Style = "Heading 1"
para.Range.Bold.Font = True
But it doesn't cover even some of the simplest of formatting such as:
How you align the text (left, right, center)?
How you specify letting?
How do you start a list style?
What I'm trying to find is either a straight answer to these or (even better), a definitive list of the commands that would allow most any formatting.
Also, I would prefer not using Spire, which seems to be a common answer.
Thanks!
The VBA object model describes all the classes, their methods and properties that you can use for the marking up of content.
Your suggestion to use styles is strongly recommended as a way of separating your code from the presentation. Create a document template (.dot or .dotx, depending on Word version) and attach this to your documents. Then, when the document is opened, it will inherit layout and presentation from the template and be correctly rendered.
The list creation is a little intricate as you will need to restart the list if you are using numbering.
If you are interested in a completely different approach, you can look at Applying an XSLT Transform in the Microsoft Office Word 2003 XML Software Development Kit. This describes how to generate XML documents and using XSL transforms to describe the presentation. More general, but definitely more complex to set up.
Your preferred approach will depend on whether you want to generate native documents with a template, or to require your users to install the transform using the tools in the SDK.
So, you have a few examples. Office VBA is a cut down version of VB6, so why not record some macros in Word, open the VB editor and look at what it does. It's also the easiest way to navigate the help on the Word object model.

Text Editor Control in Windows application in VB.net

I am using Windows application for development. In that i have functionality where there is a control in which user can type anything then edit them like bold, italic, underline, fore colour,back colour, insert image, edit size of font, change font type etc. Its like MS Word.
At present i am using RTF ( Rich text box) control for the same. but its to complex to use. Now i want other way to do that.
can any one suggest me any third party control which can full fill my requirement or any other way to do it? I am ready by third party control like MS Word functionality.
Thanks in Advance.
Try controls from http://www.devexpress.com or http://www.telerik.com

How to create a program on top of Visio?

Is it possible to make a standalone/independent (from visio) program that is built on visio. Say, can i attach some of the design templates and visio drawing page on to my form??
Thanks
Visio supports VBA. With that, you can add all kinds of interactivity to your document.
And, you can embed visio in another program with the activex control.
Both of these methods require visio to be installed on the machine (if that's what you were getting at by the "independent" comment).
The Visio Viewer may or may not install the activex control or support VBA, I don't know.
There's a value stream mapping tool called SigmaFlow VSM that is an application built on Visio like you want to make. Basically the tool loads up Visio and strips out a lot of the Visio toolbars and puts their own UI in. Obviously it requires you have Visio installed.
There's a similar tool called eVSM that leaves the Visio UI in place, but provides a toolbar and templates and stencils for the purpose of building value stream maps.
I prefer the eSVM approach, where you end up giving the user the full ability to do whatever they want within Visio, while making the very specific task of Value Stream Map diagram creation easy.

Creating a More Attractive DataGridView

My form looks like this with a DataGridView:
I would like to make it look more professional. Can someone recommend a "makeover" for it? Perhaps there is a more attractive way to display this data.
I have been using a free grid control from Component Factory, it has all the same features as the standard DataGridView. The grid allows customization for pretty much all UI elements.
This looks quite nice already. What you might want to do is set the Dock to Fill with the Properties panel to make it fill the whole form.
Personally, I'd recommend softening those colors a bit. Use pastel-versions of the same color perhaps.
Also, like person-b suggests: Dock->Fill.
I'm not a big fan of unnecessary row/record-selector columns. If you don't need it, I'd recommend getting rid of it.
One last thing, Normally I'd recommend not paining your UI with a crayon, instead letting the colors default to whatever the user has specified as their Windows theme. However, I see the point of coloring the columns in your case. I would suggest that you allow the user to modify the colors. I'm not color-blind, but it's possible your colors may be unreadable to someone who is.
My first thoughts are on the column colors, does the color mean something, if you are try to differentiate to columns I would use two subtle colors. Large color shifts should have a meaning (Errors are bold and Red). The Font should use the System font styles and basic colors should also you the system colors. Colors and font styles may work for you but not everyone, some people are color blind, some people need larger fonts.