How can I embed an application manifest into an application using VS2008?

You can add a manifest to your C# application by following these steps: Right-click on your project in the Solution Explorer Select “Add New Item” from the context menu. Choose “Application Manifest File” from the list of options in the dialog box that appears. However, note that Visual Studio already adds a manifest to your … Read more

How can I set the dpiAware property in a Windows application manifest to “per monitor” in Visual Studio?

New in Windows 10 is dpiAwareness as well as dpiAware, so we need to update this example a bit. Now, it is fine because if dpiAwareness does not exist, then the settings will be inherited from dpiAware. To enable DPI awareness in full, with the latest Win10 support (see Ref URL for other possible options), … Read more

Reference jars inside a jar

You will need a custom class loader for this, have a look at One Jar. One-JAR lets you package a Java application together with its dependency Jars into a single executable Jar file. It has an ant task which can simplify the building of it as well. REFERENCE (from background) Most developers reasonably assume that … Read more

How to fix “unexpected element found in ” error?

The Android Gradle Plugin needs to know about new manifest elements, particularly for the manifest merger process. The plugin has a tendency to get confused if it sees elements in the manifest merger that it does not recognize, tossing out build errors like the one in the question. In this case, Android 11 introduced <queries> … Read more

Apply a theme to an activity in Android?

You can apply a theme to any activity by including android:theme inside <activity> inside manifest file. For example: <activity android:theme=”@android:style/Theme.Dialog”> <activity android:theme=”@style/CustomTheme”> And if you want to set theme programatically then use setTheme() before calling setContentView() and super.onCreate() method inside onCreate() method.