Wix default folder dialog - c#

I would like to know if there is a way how to use windows choose folder dialog instead of really bad looking one which is in WIX as a default.

Burn: You can replace the whole MSI GUI by using WiX's Burn (bootstrapper and more) featuring a custom bootstrapper application. The bootstrapper application can do "anything" in terms of GUI.
Please see these similar questions & answers:
WIX Installer with modern look and feel
Changing text color to Wix dialogs
Removing Default dialogs from MSI (please check all answers)
MSI: And yes, it should be possible to show the standard Windows directory selection dialog by hooking up a custom action to the MSI dialog's browse button click event - which will then invoke the Windows common dialog for folder section. Then you set the directory property from the custom action using either C++ or C# or even scripts I guess. Never tried scripts. This old C++ project could work with some minor massage. Or maybe the first section here.
I did this many years ago, and as I recall I ran into problems with dialog Z-order. In other words the folder selector dialog showed up underneath the MSI dialogs in some cases. I can't recall what I did to fix it, but I think it involved some dysfunctional send-keys stuff before I concluded that MSI dialogs are fundamentally flawed. I think a smoke test is in order before you waste significant time on it. That is the best advice I can cough up since I haven't tried it in years.
Some Links:
MsiSetExternalUI function
Custom Actions and User Interface
Win32 - Select Directory Dialog from C/C++

Related

Building a Windows Explorer Extension

I'm looking to build an application that will rely on adding menu extensions to the menu that appears when one right clicks a file or folder. I've heard that you can build it in Python, here are the resources that I am currently looking at:
http://docs.python.org/extending/extending.html
http://docs.python.org/extending/windows.html#building-on-windows
However I'm not quite sure if I'm even looking in the right direction for this kind of stuff. What should I be searching for, and is it possible to build this kind of thing in Python or will I have to learn C#/.NET?
Thanks!
Edit: Looks like these things are called context menus and involves adding entries to the registry in order to associate applications with certain file types. In that case, should I have my application listening in the background for actions from the entry? Also if you know how to do the same thing in OS X or have some nifty cross-platform thing for this, that would be really nifty!
Here is a sample code at Sample code .
Another way is to manipulate the Registry by using the Windows Explorer tool, like the Open with option. Use it to associate a file extension with opening an executable, basically. However, this technique does not add a menu item into Windows Explorer. But it's easier.

Components for WPF similar to the simplified Visual Studio

I would like to make a support plug-ins in my program.
For example in my program there are several tabs in one tab is the editor in which the code is written also in that tab has a button run.
After pressing the button run occurs a compilation of source code and its execution.
The results of work are displayed in the other tab.
I would like to find such a component in which there are:
Syntax Highlighting, Debugger, Analogue of solution explorer
Thank you very much for your answers.
I would like to bring more of clarity to my question.
I want to do something similar to that is shown in the screenshots below
On a single tab there is the editor and at the other tab displays the results.
To write plug-ins I'd like to use C #.
I guess the best place to start is AvalonDock from CodePlex, specifically what you are trying to do is a Tabbed User Interface.
Keep in mind that even with a TabbedWindows framework build/debug and syntax highlighting are not for free and you will have to find icons and design the UI mostly yourself.
for code coloring there are also many components, also free, like Scintilla .NET
You obviously understand that Visual Studio is a very complex application, so rewriting portions of it will be difficult. There are components available to help you, like the ICSharpCode text editor. In fact, that whole project is probably quite valuable.
However, when thinking of plugins and actually writing code for it, I'd personally go down the MEF route. In fact, this is the very framework that VS.NET 2010 uses for extensibility. Provide your user/developer with a set of libraries to code against (like an SDK), and let them use a Visual Studio Express edition to write proper code :)
As source code editor you can use AvalonEdit (it is great, in some aspects even better than VS code editor), solution explorer is fairly easy to create and debugger is way too language-specific to be a reusable component (you didn't specify what language are you developing for!).
The whole thing can be packaged into AvalonDock, so you get the draggable and dockable panels - it even has VS 2010-like skin (and again - is very easy to implement even with only very basic WPF knowledge).
Or you can use the Visual Studio Isolated Shell - it allows you to use the Visual Studio interface in your program (the end users don't have to have VS installed!), but it requires extensive knowledge of VS API (if you ever developed VS extension you know what I am talking about). For example Civilization V used this approach for it's modding environment, but the result smells as stripped VS with custom splash screen, not as professional product. There are many buttons and config. options that don't work, some features that would be expected from such program (and easy to do in custom app) didn't get in because it would be nigh impossible to implant them into the VSIS etc...
EDIT: You may also eventually be interested in this.

How can i add a button to all windows explorer instances?

I am trying to add a button to one of the existing tool bars in any windows explorer instance.
After much research i figured out that BHO (browser helper objects) are the best way to hook
to windows explorer.
My question is :
Is that the correct way to go about it ?
In the SetSite of the BHO i get the comObject that is the explorer window. What now ?
If i can get the hWnd of the explorer window can i use win API to add my button ?
Note i am developing in C# for XP.
Thanks.
1 In pre-XP you can add custom items in the default folder template because the folder window is actually a webpage. In XP and later that is no longer true. A Deskband is the supported way to extend the UI.
2 The site is the same. You can even sink DWebBrowserEvents2 to get notified when the folder view is ready.
3 using window functions on explorer is not supported. The supported way to customize the explorer is to create deskbands. it is theoretically possible if you have the resource to test your code against each and every version of Windows Explorer used by your client audience and continue to do compatibility testing when each new version (or new language) of explorer.exe is released.
BHO can not add deskband. If you want to start BHO and deskband programming, look at Paul DiLascia's article "My Band is Your Band" in the November 1999 issue of MSJ. There is another article "Building Browser Helper Objects with Visual Studio 2005" in MSDN for BHO. Basically you need to handle the DocumentComplete and BeforeNavigate events and be careful not to access the folder view when the document is not ready. You can use any communication method that you see fit between your BHO and your deskband, such as hidden window with special window class, static variable if the two are in the same dll, shared memory, named pipe, etc.
Microsoft does not support creating In-Process extensions in managed code until .Net 4.0

Creating a list of components and their install status in a c# form

I am creating an installer for some sharepoint addons and want a similar style to installers that list each package in the list and have an icon/text next to each showing its status. This starts at waiting then installed/not installed.
Does anyone know what this is called? Or how to implement it? Surely there is a better way than creating one from scratch?
Example photo at:
Example
The Visual Studio installer was probably created from scratch. If you want a similar look and feel to that, you will definitely have to create your own.
I would recommend that you instead look at making a custom skin for the Nullsoft Installer System.
It may be a pain, but you can create custom elements showing progress of individual elements by creating a plug-in.

Enable Visual Styles for a Class Library

how do I enable visual styles when my project is a class library and it's being loaded into a program that does not have Application.EnableVisualStyles() set. I have been struggling with this for 2 days now. This is in C# (I've seen some examples for older C++ and some things that may work for VB, but nothing has been clearly laid out for C# and if it's even possible).
I have tried to run Application.EnableVisualStyles() from my Class Library before creating any controls, but it seems that needs to be done before an Application.Run() is done, and I don't have control when an Application.Run() is called since this is going into a 3rd party app as a plugin (VMware's Virtual Infrastructure Client).
I have tried to create a manifest file and after compiling the class library I link in the manifest file to my ProgressBar.dll with:
mt.exe -manifest ProgressBar.dll.manifest -outputresource:ProgressBar.dll;2
Except this doesn't work. If I make a dummy Application that uses my ProgressBar class library and link the manifest to that Application's exe, then the visual styles come up (basically it's doing the long way of specifying the Manifest file in the Project Properties, Application section).
Right now my buttons look ugly, but the biggest thing that is irritating is that the ProgressBar control doesn't work in Marquee style. I'm very soon going to have to resort to making my own Marquee-style ProgressBar or just throwing in an animated GIF in it's place. With regards to the buttons, I guess I can start using Infragistics buttons in order to get a more consistent result.
Please and thanks as always!
How can you be sure that there are no controls created yet when you call Application.EnableVisualStyles? Created does not necessarily mean that the controls are also visible on a form.
Since you are working with a closed 3rd-party component I would invest my time rather in creating my own controls if the look and feel is that important.
You'll have to use the OpenThemeData Win32 api in your control:
MSDN: Using Windows XP Visual Styles

Categories

Resources