windows-applications

Can't convert HttpResponseMessage with UTF8 encoding

你说的曾经没有我的故事 提交于 2019-12-14 03:26:08
问题 I'm struggling with the usual conversion issue, but unfortunately I haven't been able to find anything for my specific problem. My app is receiving a System.Net.Http.HttpResponseMessage, from a php server, UTF8 encoded, containing some characters like \u00c3\u00a0 (à) and I'm not able to convert them. string message = await result.Content.ReadAsStringAsync(); byte[] messageBytes = Encoding.UTF8.GetBytes(message); string newmessage = Encoding.UTF8.GetString(messageBytes, 0, messageBytes.Length

Enable/Disable Windows Key

血红的双手。 提交于 2019-12-13 08:47:49
问题 I use the following code for Enable/Disable windows key in Keyboard.It was working fine . public static class WindowsKey { public static void Disable() { RegistryKey key = null; try { key = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Keyboard Layout", true); byte[] binary = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xE0, 0x00, 0x00, 0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00 }; key.SetValue("Scancode Map", binary,

Storing and getting data in windows phone app and using NavigationService.GoBack()

陌路散爱 提交于 2019-12-13 05:04:14
问题 I have created a Windows phone app based on a quiz game. I want that when the user give the correct answer for some question then a small tick mark will be permanently on in the tab of the question. I want to store score for every question so that i can display that in a place name as 'your score'. And that score will not be reset even if the app is closed.I have used IsolatedStorageFile to store the data for each page separately. In each page i have provided a back button which will navigate

Conversion failed when converting datetime from character string

这一生的挚爱 提交于 2019-12-13 01:02:38
问题 I am trying to pass parameters from windows application to a stored procedure. there are two parameters '@dt' & '@dt2' which get value from datetimepickers. whenever i execute the stored procedure it comes up with the error saying "Conversion failed when converting datetime from character string." After executing the query i want to display it in a datagridview. i am unable to figure out the problem.. here is my procedure and code Stored Procedure ALTER proc [dbo].[deepak_proc] ( @dt datetime

C# How to upload large files to ftp site

柔情痞子 提交于 2019-12-12 09:56:17
问题 I am developing an windows application for backup(Files and sql server database). Now i need to upload these files(.rar files) to my ftp site. For uploading i use this code. Code string file = "D:\\RP-3160-driver.zip"; //opening the file for read. string uploadFileName = "", uploadUrl = ""; uploadFileName = new FileInfo(file).Name; uploadUrl = "ftp://ftp.Sitename.com/tempFiles/"; FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read); try { long FileSize = new FileInfo(file)

My application crashed when snapped with items in listviews

别说谁变了你拦得住时间么 提交于 2019-12-12 05:24:25
问题 So, im currently working on a project using C#/XAML for a Windows 8 Store App and I've encountred a problem. When the user navigates to a Page a ListView with some Controls shows up. Then when the user decides to snap the page my application crashes and shows this: In my IntelliTrace this shows up and I press an Exception. It navigates me to this code. /// <summary> /// Implement this partial method to configure the service endpoint. /// </summary> /// <param name="serviceEndpoint">The

Invalid package family name error on Windows PhoneGap app

守給你的承諾、 提交于 2019-12-12 04:39:04
问题 I have done a windows app using phoneGap, But when I upload the APPX file in windows dev center, I got some errors like 'Invalid package family name'. 回答1: I worked through a similar problem today and I found this article helpful: http://cordova.apache.org/docs/en/latest/guide/platforms/win8/index.html Check your build configuration file (build.json) and make sure you select a release if your release settings are defined to match the Strong Name with the Windows Store expected Publisher Name.

Fixing a prompt window over the main window in a windows application using C#

主宰稳场 提交于 2019-12-12 03:43:48
问题 We have included a spell check feature in our windows application and here's the issue we are facing. Steps in replicating the issue: Clicked on the spell check feature. Tabbed to another application before the spell check prompt appeared. On coming back, the application is unresponsive as the spell check window has gone out of focus. The only way to access the application after which is to use Alt + Tab, go to the window and close it. My question is how can the prompt window be fixed over

Difference between multi-threading vs multi-threading apartment?

烂漫一生 提交于 2019-12-12 03:39:44
问题 I am doing Multi-threading in single threaded apartment(STA) application. I am making an app that will load lot of data to the application which is making the application do not respond for long time. So I used multi-threading so that the application responds while loading so user can use other functionalities in it that are not related to loading data. My question is am I doing MTA inside STA application or just doing multi-threading in STA application? If so what is the difference between

application stop unexpectedly

最后都变了- 提交于 2019-12-11 15:36:54
问题 Why did my application stop unexpectedly? I tried everything to solve the error but I can not find the solution. This is a Windows application. UPDATE: event viewer: 1 Faulting application viamura.crawlerapp.exe, version 1.0.0.0, stamp 4d9d9be8, faulting module imon.dll, version 2.70.16.0, stamp 455c9b06, debug? 0, fault address 0x0002474a. 2 Application: ViaMura.CrawlerApp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: