windows-10

System.NullReferenceException occurs in xaml designer

六月ゝ 毕业季﹏ 提交于 2019-12-01 15:48:27
I've created a C++ UWP Windows 10 app using Visual Studio 2015. However, I'm not able to visualize any xaml in the designer because I'm always getting a System.NullReferenceException error. How can I fix this? That's very odd but I solved following these steps: Close any instance of Visual Studio Open Visual studio and create a new C# UWP empty project (name it as you like, do not matter) Run the "useless" created project then close it as Visual Studio Open again your previous C++ UWP project In my case everything started working! Switching solution platform to x86 worked for me. I'm

System.NullReferenceException occurs in xaml designer

杀马特。学长 韩版系。学妹 提交于 2019-12-01 14:58:51
问题 I've created a C++ UWP Windows 10 app using Visual Studio 2015. However, I'm not able to visualize any xaml in the designer because I'm always getting a System.NullReferenceException error. How can I fix this? 回答1: That's very odd but I solved following these steps: Close any instance of Visual Studio Open Visual studio and create a new C# UWP empty project (name it as you like, do not matter) Run the "useless" created project then close it as Visual Studio Open again your previous C++ UWP

Running UWP app from Command Line is “ONLY” showing the splash screen of the app

99封情书 提交于 2019-12-01 14:32:56
I'm using Launch UWP App Via CommandLine online tutorial to execute my UWP app named UWPTest via PowerShell on Windows 10 -latest version update 1903 . The app opens successfully but only shows the splash screen. Moreover, the splash screen just stays there forever unless I close it using X button on top right corner. Question : What could be the cause and how can we resolve it? Note : The splash screen does not hang it just stays there and I can move it around, maximize, minimize, etc. When I ran the app from start menu it works as expected and shows the following Main Page. Ref: uap5

Set “RUNASADMIN” application compatibility flag in Inno Setup

你离开我真会死。 提交于 2019-12-01 13:34:23
My application was made with Java and it needs Administrator privilege to run on Windows. Using Inno Setup I could change change a registry with the following code and it works just fine for Windows 7, however for Windows 10 and 8, I don't have the same success, since the registry apparently doesn't exist anymore. [Registry] Root: HKCR; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\AppExecutable.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows NT

bcrypt loading error in windows 10

允我心安 提交于 2019-12-01 13:12:28
now I am trying to install bcrypt in windows 10, but I got an loading error whenever running webrick server as the following. C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bcrypt-3.1.10-x64-mingw32/lib/bcrypt.rb:16:in `require': cannot load such file -- bcrypt_ext (LoadError) I am using rails 4.1.5 and ruby 2.2.3. There was no problem with bcrypt when I was using windows 8.1. The ruby version was 2.1.6 when I was using windows 8.1 How can I solve this bcrypt issue? It took me few hours to get this done but please feel free to share it.The root problem here is that ruby itself comes with bcrypt

Windows 10 Bluetooth Advertisement API

 ̄綄美尐妖づ 提交于 2019-12-01 13:09:53
Is it possible to use an AdvertisementPublisher to send a major and minor ID when acting as a beacon, and is it also possible to use an AdvertisementWatcher to send and receive the ID? Cheers kiewic Yes, do this to send: var manufacturerData = new BluetoothLEManufacturerData(); manufacturerData.CompanyId = 0x004c; byte[] dataArray = new byte[] { // last 2 bytes of Apple's iBeacon 0x02, 0x15, // Proximity UUID 0x44, 0x50, 0x3f, 0x1b, 0xc0, 0x9c, 0x4a, 0xee, 0x97, 0x2f, 0x75, 0x0e, 0x9d, 0x34, 0x67, 0x84, // Major 0x00, 0x01, // Minor 0x00, 0x10, // TX power 0xc5 }; // using System.Runtime

Running UWP app from Command Line is “ONLY” showing the splash screen of the app

元气小坏坏 提交于 2019-12-01 12:25:18
问题 I'm using Launch UWP App Via CommandLine online tutorial to execute my UWP app named UWPTest via PowerShell on Windows 10 -latest version update 1903 . The app opens successfully but only shows the splash screen. Moreover, the splash screen just stays there forever unless I close it using X button on top right corner. Question : What could be the cause and how can we resolve it? Note : The splash screen does not hang it just stays there and I can move it around, maximize, minimize, etc. When

GetTickCount values on Windows 10

非 Y 不嫁゛ 提交于 2019-12-01 12:16:44
Im trying to use the GetTickCount() in Windows API to get the system uptime. I want to know how long the system has been running. However the return from GetTickCount is insanely high. This code gives me uptime of over 500 hours. This goes for GetTickCount64() as well. Why is this value so high? DWORD time_ms = GetTickCount(); DWORD seconds = (time_ms / 1000) % 60; DWORD minutes = time_ms /(1000*60) % 60; DWORD hours = time_ms / (1000*60*60); stringstream ss; ss << "Hours: "; ss << hours; ss << " Minutes: "; ss << minutes; ss << " seconds: "; ss << seconds; MessageBoxA(0, ss.str().c_str(),

UWP C# Scroll to the bottom of TextBox

一曲冷凌霜 提交于 2019-12-01 12:07:56
How do you scroll to the bottom of a TextBox for a UWP app? With my transition to UWP, this has been one of the questions that hasn't been straight-forward. I used to be able to use this: textBox.SelectionStart = textBox.TextLength; textBox.ScrollToCaret(); But, this doesn't work for UWP apps Using the answer from https://code.msdn.microsoft.com/windowsapps/How-to-scroll-to-the-a8ea5867 sometimes caused lines to be deleted when scrolling up. To fix that, try this: private void ScrollToBottom(TextBox textBox) { var grid = (Grid)VisualTreeHelper.GetChild(textBox, 0); for (var i = 0; i <=

WIndows universal app with system.drawing and possible alternative

≡放荡痞女 提交于 2019-12-01 11:50:47
I'm developing a windows universal app and i need to work with Bitemap but i cannot seem to reference System.Drawing, Why cant windows universal app cannot reference this dll and what alternative do i have? Edit Any suggestions on how can i use my already written filtering library (that depends on system.drawing) in a universal app? Tnx System.Drawing is the .NET namespace for working with GDI+. This technology is not available for Windows Store apps or universal Windows Apps. See .NET for Windows apps . You can make use of the Win2D project for a WinRT wrapper usable from C# for drawing with