I mean how do you build your own UI most applications I see are unique and have their own independent UI not using existing libraries or UI kits they are simply their own in the sense that they are unique and the developer has complete control over the appearance. In particular a windows user interface program
From what you've told me, #Gonja, This would be the best way to start:
Open Visual Studio and create a new project.
From the languages dropdown, select 'C++'.
Choose 'Windows Desktop Wizard'.
Give your project a name and location.
From the 'Windows desktop project', 'Application type' dropdown, select 'Desktop Application'
Then you will have a new C++ project with all the objects to create a window application.
Just to note, this is not a particularly good question for stackoverflow, so I hope you can read this answer before it's closed by an administrator.
Related
I have created an installer using Visual Studio 2015 (with the Visual Studio installer addon). The goal is to always run the APP with the same local resources, regardless of who is logged on, therefore we target [CommonAppDataFolder] (C:\ProgramData... on Win10). The installer works just fine placing all shared resources where we want them. But the generated MSI provides the option to install as "everyone" or just the "just me"
We want to grey out the option to install as "just me".
Is there a way to do this from within Visual Studio as part of the build process for the MSI.
I see some solutions that involve running MSIEXEC with different parms eg, ALLUSERS, but I am wondering if there is a way to set this up to occur automatically in Visual Studio.
Thank you.
The project Properties window (NOT properties) can be shown by selecting the project in Solution Explorer, and then F4. You can set InstallAllUsers to True there.
The Properties window of the InstallFolder dialog has a settting InstallAllUsersVisible, so just set that to False.
I don't use that particular tool. There might be a better way to
achieve what you want than the below "hack". Adding since you got no other answers (yet).
UPDATE: Go with Phil's answer. I don't have the tool to check but it looks good. Leaving in this answer just for the record. Not recommended unless you have other things you want to change.
Post-Process MSI
Hiding Control: Not ideal, but if you don't mind post-processing the MSI (can be automated with MSI API coding) you could insert a row into the ControlCondition table to hide the whole dialog control in question.
Ad-hoc sample: Hiding the "Back" button from a setup's LicenseAgreementDlg - just add this row (I guess events defined elsewhere could show it again):
.
Dialog at runtime: Below is the actual dialog at runtime.
MSI API
To automate the above. Get hold of WiRunSQL.vbs - part of the Windows SDK - just search your SDK folder if you have Visual Studio installed. Also plenty of copies on github.
In a batch file:
cscript.exe "%~dp0"\WiRunSQL.vbs "MySetup.msi" "INSERT INTO `ControlCondition` (`Dialog_`, `Control_`, `Action`, `Condition`) VALUES ('LicenseAgreementDlg', 'Back', 'Hide', '1')"
pause
I honestly might hard code ALLUSERS=1 in the Property table as well.
Links:
SQL modification of MSI file
List tables in MSI file using VBScript
Windows Installer Scripting Examples
I have looked at this question, but it is something different.
I need to change the message of MsiRMFilesInUse Dialog box.
Currently the message is "Do not close applications. (A reboot will be required.)"
I need to get it changed to "Do not close applications. (Application may not work)" .
The message comes when application is open, and user try to uninstall the app.
The only (but big) restriction is to do it in Visual Studio 2010 setup project. (Installshield/Wix are not allowed).
I have looked at custom action, not able to figure out how to change the message.
Another approach is to create a custom dialog box, but then i am not able to change the dialog box somehow. Also new dialog box has a very limited set of controls.
Per MsiRMFilesInUse Dialog (Windows)
The MsiRMFilesInUse Dialog box can be authored to display a list of
processes that are currently running files that need to be overwritten
or deleted by the installation. The user can select between options to
"Automatically close applications and restart them" or "Do not close
applications. (A reboot will be required.)" If the user selects the
"Automatically close applications and restart them" option, a push
button control on this dialog box can be authored to publish the
RMShutdownAndRestart control event and the Restart Manager can close
the applications and restart them at the end of the installation. This
can eliminate or reduce the need to restart the computer. For more
information, see System Reboots.
Notice the generous use of the word "can be authored". It is written this way because the perspective is of the Windows Installer SDK (Windows Platform). InstallShield (Basic MSI) and WiX (UI Extension) both author this table. Visual Studio Deployment Projects do not because Microsoft (DevDiv) never put the effort in to support it. You can't modify what isn't there.
Now if you are a Windows Installer expert ( which I doubt otherwise you wouldn't even be posting this question ) there are things that can be done. You can write postbuild commands to modify the built MSI to perform SQL updates and/or apply transforms to inject a custom authored dialog into your MSI after VS is done building it.
I've been down this road, I know how to do it. I also know how counterproductive it is as you'll find yourself doing it ALOT to make up for the short comings of the tool. At that point you understand why WiX / InstallShield is needed and move on.
And for the record, I once quit a very well paying job because VDPROJ is all the development managers would allow. I also returned a couple years later for even more $$$$ when they finally realized that they didn't know what they were talking about.
Good luck.
I started reading the Pro Business Applications with Silverlight 4 and I'm having the following problem here with my visual studio 2010
I can't find the data sources tab page as mentioned here:
When you open the Data Sources window in Visual Studio, you will
find that a data source has
already been created for each domain context created by RIA Services
in the Silverlight project, with the entities that they expose beneath
them (as shown in Figure 6-2). Dragging and dropping one of these onto
your design surface will create both a DomainDataSource control and a
bound control to display the data.
I know that the Data Sources window and Data menu are intentionally disabled in Websites and Web Application Projects but my project is a Silverlight business application.
Can someone tell where i can find this window or what should i do to create the DomainDataSource control and the bound control?
Thanks!
If you have MainWindow.xaml open, the DataSources tab is normally right next to the Toolbox tab.
If it does not appear there, go to View -> Toolbars, and turn on the Data Design toolbar. Click the Show Data Sources button.
Or just use Shift + Alt + D
When I create an empty project, I am able to access Data Sources as follows:
Select a project in the solution explorer. (Not a solution!)
The 'Data' menu on the menu bar now allows you to access the data sources for this project, along with other Data Source related options.
OK, i got a workaround. For some reason, it only shows up if you do a Silverlight project. So I started a blank solution, added a silverlight project. Bingo - there is the Data Source window. Now, add whatever project you really need.
You may need to build the project that contains your objects before the objects appear in the tree view.
Pablo
You can find this toolbar option in View -> Other Windows -> Data Sources or use
Shift + Alt + D
I am writing a little application that performs some simple actions on some specific files, in C# at the moment but I wouldn't mind changing.
Ideally, I would like to be able to add a contextual menu on right click in Windows XP/7 Explorer, nothing to do with ad hoc Forms. There, I'd like to add a couple of options in a tab of the name of my app. Also, I would like to build an .exe that installs my program on the user's machine.
Do you have any ideas/links to suggest ? I'm chancing on dodgy pages while googling, not even getting close to what I want to achieve.
Thank you !
First of all you need Visual Studio to fulfill all your requirements
To Create an installer you need to create Setup & deploy project.
Then for Context menu & also I think you will use a notify Icon too for you context menu item. An easy to use tutorial is http://www.dotnetperls.com/contextmenustrip and also the MSDN library has lots n lots of documentation.
There are some good tutorials and few of them that I found very helpful to beginners are
Getting Started with Setup Projects, MSDN Getting Started with Windows Installers, MSDN ContextMenuStrip Class, MSDN Setup & Deploy Projects, NotifyIcon ContextStrip Menu Hope this helps! If you find my answer helpful please rate me :)
When developing in a VS2005+ with C# project and I right click on a framework method/property/type and select ‘Go To Definition’, by default we get a new locked tab with code that has been generated from the framework, labelled appropriately [from metadata].
However when we do the same in a VB.NET project, you get taken to a new tab with the relevant Object Browser view.
This has always struck me as peculiar and was hoping there was a good reason behind it. IMO the object browser is nicer.
Is there a logical reason for the difference in default visual studio behaviour? If so, what is it?
It's a choice each team made based on what they believe their respective customers wanted to see. VB users have a historical attachment to the object browser and many VB features are integrated into it (Go To Def being one of them). C# made a switch in VS2005 to generate metadata on the fly for their version of GoTo def because they believed their customers would like the behavior better.
You can install Resharper for this.
It'll allow you to choose the default behavior when clicking the "go to definition".