All my lightswitch applications are showing a white blank screen in Desktop mode - silverlight

I created a new LightSwitch solution in Silverlight web mode and it was working fine, then I changed it to silverlight desktop mode in order to get access to AutomationFactory, however in desktop it refuses to show anything other then a white blank screen.
I opened my older lightswitch silverlight desktop solutions, and if I run any of those in debug or in release mode they are all showing a white blank screen! They were working fine before, I don't know what happened.
There is a setting in X.DesktopClient -> Properties -> OutOfBrowserSettings.xml where if you set
<SecuritySettings ElevatedPermissions="NotRequired" />
Instead of "Required", then the application works in desktop mode and is no longer showing a blank screen, however it behaves as if it was a web application, (It doesn't have access to AutomationFactory and the export to excel doesn't work etc...) so this won't do.
Any help is deeply appreciated.
Details
Windows 8.1, Visual Studio 2013, LightSwitch 2013, Silverlight 5.1

I ran into this issue when I was missing references to an extention I'd added (DevExpress Reporting). I had to highlight the references and set their Copy Local properties to True

Related

How do I fix DPI scaling issues for Visual Studio 2017 Windows Forms

I've been encountering this issue ever since I bought this laptop with 4k display in 2015. With a lot of effort I managed to work around the issue but I'm growing tired of it.
VS2017 is supposedly DPI aware hence I do not expect any issues when creating a simple MDI Parent Form and running the app. But to my frustration the icons in the toolStrip (just the standard one in the MDI parent form) are scaled horribly.
When I create a form with a button on it which looks just fine in Visual Studio 2017 designer and I run the app and load the form, the button text isn't completely shown.
My display settings are as follows:
Resolution: 3840x2160
Scaled 250% (in display settings) because at 100% everything is unreadable
I've tried to find solutions, but the only workable thing I could find was setting my visual studio designer to dpi-unaware via registry (link here)
Help anyone?
Update When I add a new MDI form with the setting of DPI-awareness OFF, everything looks OK except Visual Studio itself (blurry).
I have similar problem when working with Windows Forms (Windows Forms Designer) on Visual Studio 2017, but I think it would be the same on Visual Studio 2019.
From Microsoft documentation here, there is a tip to disable the scaling/DPI aware feature.
If you prefer to manage settings from the command line, devenv.exe
takes /noscale as a command-line parameter to run in 100% scaling
mode.
So, basically, I just created a shortcut on the Desktop to Visual Studio (devenv.exe) and added the parameter /noscale on the shortcut Target field like so:
"...\path\to\IDE\devenv.exe" /noscale
So, everytime Visual Studio is started through the shortcut, it will always start with 100% scaling mode. If you use high resolution screen (high-dpi) screen, you will notice that the Visual Studio text will appear a little bit blurry because of this.
You should change the settings so there won't be a difference when the program runs on different machines.
Go to the project's properties page, then to Manifest Tool and then Input and Output. Change the DPI awareness to 'none'

Winforms app: Wrong icon in start menu search

I'm building a simple Winforms application that deploys via msi (Visual Studio setip project). The msi creates a shortcut on the users desktop and the start menu.
Everywhere (desktop, start menu, taskbar when program is running, .exe file) the program icon is displayed correctly.
But not when I type the program name in the start menu search (see screenshot below). There some generic icon is displayed.
I quadruple-checked the icon set in Visual Studio > Winforms Project > Properties > Application and the icon for the shortcut set via the Visual Studio setup project. The .ico file has many different resolutions embedded, up to 512x512px. Since it's working fine everywhere else (except in the search) I can't think of anything als I could try.
Hans' comment was the solution for me. It seems that Windows caches the old/wrong icon. When I tried it on a clean Windows 10, it worked immediately.
Of course, I tried to clear the icon caches according to Application icon is blank when started from Process.Start or the script at http://www.winhelponline.com/blog/how-to-rebuild-the-icon-cache-in-windows but this did not work on my machine (even with a lot of restarts and killing of explorer.exe).

ActiveX Ms Chart Control Not Rendered Under IE 7

We're using Visual C++ 6.0 to develop a web-application, which uses ActiveX controls.
One of them is this Microsoft Chart Control(6.0), to show some statistics or something.
Well, it works and shows up fine when the .ocx is run under a PC that has Internet Explorer 6.0.
But under an IE 7 machine, that chart isn't displayed; there is a blank image instead. It doesn't show up. No errors or exceptions thrown.
When I run the application from Eclipse in hosted mode though, it works fine again. Only when opened in IE 7, that chart disappears.
This MS Chart Control apparently uses MSCHART20.ocx
Thanks in advance for any advice towards a fix, or a workaround, or a needed upgrade.
I don't like upgrades though. But I need to figure out what kind of upgrade can be done to make this work.

Winforms control spacing in Windows 7

We have an in-house .net 2.0 winforms app currently developed on Visual Studio 2005 in Windows XP. Everyone in the office until now is running Windows XP, and there are no issues.
We recently ordered a new computer with Windows 7 for one of our managers we were hoping to use, and the app installs fine. The issue is the spacing around every label, textbox, and button - making some forms not fit.
Is there some setting that we can use to make Windows 7 display each control where it is placed in our XP development environment and like the rest of our XP clients show?
Ugh, what kind of idiot management team gives a new machine to a manager instead of a programmer?
Control Panel + Display, Advanced tab, change the DPI setting to repro the problem on your XP machine. Read the docs for the Form.AutoScaleMode to find out what's going on.

Why do my toolbox items disappear in Visual Studio 2008?

I'm working on a solution that contains multiple projects targeting Windows Mobile 5 and standard Windows applications.
Lately when opening up a form in designer the common UI controls (textbox, button, label, etc etc...) have vanished leaving only the controls defined within the project.
Resetting the toolbox has no effect. A google search suggested deleting the toolbox temp files in the Local Settings\Application Data\Microsoft\VisualStudio\9.0, however this was only successful in bringing back the default controls for Windows Mobile 5. The WinForms controls are still mysteriously missing.
Also, if I right-click and Select All on the toolbox, all of the WinForms controls do in fact come up, however they're all grayed out.
Has anyone else experienced this?
I just had a similiar problem. In a managed C++ project all the default toolbox items disappeared form the winforms designer. After playing around for a while I found that there was a problem in the .vcproj file.
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="COLLADA Import"
ProjectGUID="{0DEEF9B6-1929-44E3-92EC-13712839FB63}"
RootNamespace="COLLADAImport"
Keyword="ManagedCProj"
TargetFrameworkVersion="0"
>
When you set TargetFrameworkVersion to a valid number, for example 131072 for .Net 2.0, the toolbox items will be back.
If you right click on the Toolbox and select 'Choose Items...' and then sort by the 'Namespace' column, you can then select the ones you need (for example System.Windows.Forms for WinForms).
You can multiselect with Shift and then select/deselect the group.
The controls then reappear in the Toolbox as enabled.
I've noticed this exact same thing for regular WinForms as well. I can't speak to mobile applications but in regular winforms this has a tendency to happen.
I believe it's actually a bug in Visual Studio.
There are some things you can do (again, for WinForms. I'm not sure about mobile) with adding attributes to your control. Such as:
[ToolboxBitmap(typeof(MyControl), "MyControlBitmap")]
There are some other useful related things on this site:
http://en.csharp-online.net/Design-Time_Integration-Attributes
I had exactly the same problem (after installing Windows Mobile SDK all items in the toolbox were greyed out).
I've startet the Visual Studio 2008 command line as administrator and started the following command (WARNING - all your settings are lost !!)
devenv /setup /resetuserdata /selfreg /resetskippkgs
After that the toolbox looked fine and worked like on the first day.
The idea came from this thread: connect.microsoft.com
Go to the Tools menu and choose import & export settings, then choose the 'reset all' setting, then yes. Save your current settings, after that you'll have your toolbox reappear.
Actually you may be able to add a registry key to get this to work also.
Make sure you're not in Debug mode.
If you are running Visual Studio 2008 under vista, try running it as an Administrator. Right click on the shortcut and select Run as Administrator.
Well guess what install Service pack 1 for VS 2008 and it would go away and if you have wireless mouse and keyboard turn it off. Choose one of these two both work.

Resources