visual-studio-2012

how to print 2 alerts consecutives WinJS

自古美人都是妖i 提交于 2020-01-05 01:33:24
问题 I want to print two alerts on my app, one to show an application and after pressing close button on first alert to show the second alert Windows.UI.Popups.MessageDialog("Hello Welcome").showAsync(); Windows.UI.Popups.MessageDialog("Welcome to my app").showAsync(); if I just print an alert, everything works good but on the other scenary (two alerts) the code stops with an error, how to fix that?? 回答1: You can't have multiple MessageDialog s open at the same time. Since the showAsync returns

Alignment and the STL in VS 2012/VC11

▼魔方 西西 提交于 2020-01-05 00:49:13
问题 I have a vague memory of the STL having trouble with aligned structs (e.g. SIMD vectors placed in a std::vector), unless you specify a custom allocator. According to this document VS 2012/VC11 has partial support for c++ alignment. Does this mean that the VS STL implementation can handle aligned structs now, without providing a custom allocator? 回答1: No. It means that the VC++ compiler supports a method for specifying the required alignment for a type (the __declspec(align(N)) syntax). VC++

How can I create a completely invisible button?

拜拜、爱过 提交于 2020-01-04 15:59:11
问题 I'm trying to create a WPF button, that is completely invisible, but still has an onclick or click event, without resorting to something like MouseDown and check the keyeventargs, etc. I have tried setting the button's visibility to Collapsed or Hidden, which also makes the button unclickable, and therefore useless for my purposes. Any more ideas? 回答1: Try this : <Button Opacity="0" /> 回答2: just make a button and set button.Visibility = Visibility.Hidden; or button.Visibility = Visibility

How to downgrade application with WIX Bundle?

为君一笑 提交于 2020-01-04 14:02:07
问题 I created a WIX Burn setup. The Bundle chained multiple .MSI files for global installation (all MSI support downgrading). <Bundle Name="APP 4.3.0" Version="4.3.0" Manufacturer="Manu" UpgradeCode="$(var.UpgradeCode)"> <Chain> <PackageGroupRef Id="VCppRedistPackage"/> <PackageGroupRef Id="DotNet4Package"/> <MsiPackage Id="CrystalReportPackage" SourceFile="$(var.SolutionDir)_CommonFiles\CRRuntime_32bit_13_0_9.msi" DownloadUrl="http://MyAppRuntime/CrystalReport_NET40/CRRuntime_32bit_13_0_9.msi"

Colorize knockoutjs comment bindings in code editor

跟風遠走 提交于 2020-01-04 12:46:30
问题 A project I'm working on makes extensive use of knockout comment bindings. In the code editor, these are difficult to summarily differentiate from standard comments in the markup. Is there any way that one might be able to make knockout comment bindings appear in a different color? 回答1: In the absence of a solution, I coded an editor classifier Visual Studio extension to change the color of knockoutjs comment bindings in documents with HTML content types: https://github.com/biggyspender

Colorize knockoutjs comment bindings in code editor

China☆狼群 提交于 2020-01-04 12:46:13
问题 A project I'm working on makes extensive use of knockout comment bindings. In the code editor, these are difficult to summarily differentiate from standard comments in the markup. Is there any way that one might be able to make knockout comment bindings appear in a different color? 回答1: In the absence of a solution, I coded an editor classifier Visual Studio extension to change the color of knockoutjs comment bindings in documents with HTML content types: https://github.com/biggyspender

Adding Office 2010 Interop (PIA) in Visual Studio 2012

霸气de小男生 提交于 2020-01-04 09:05:28
问题 I am writing an application in VB.NET that will send emails using outlook. My problem is that I need the Office 2010 PIA to do this. The following are the steps I have already tried (I am using Visual Studio Express 2012): Restarted the machine Downloaded Office 2010 PIARedist and installed it Restarted Visual Studio Restarted the machine again Uninstalled Office and the PIA and re-installed Office, making sure that the PIA was selected in the installation options (it was already selected by

How to add a “using” statement to the System.Data.Entity namespace [closed]

坚强是说给别人听的谎言 提交于 2020-01-04 07:11:00
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 6 years ago . I am new to Visual Studio and C# in general. I'm following a tutorial trying to learn the language (tutorial here). One of the steps is to add a “using”

Admob WP8 System.UnauthorizedAccessException

心不动则不痛 提交于 2020-01-04 06:35:15
问题 I am developing a WP8 app using VS2012. I wish to add Admob banner ads, unfortunately it is raising an exception which is causing my app to freeze. To catch this admob exception, I had to disable 'Just my code' VS2012 setting, and after executing the following code, I get a 'System.UnauthorizedAccessException: Access is denied' at the last line. _adControl = new AdView { Format = AdFormats.SmartBanner, AdUnitID = "ca-app-pub-31231-FAKE-FAKE-FAKE" }; _adControl.VerticalAlignment =

“You need to install an app for this task” error with Windows Phone 8 App

为君一笑 提交于 2020-01-04 06:13:27
问题 My Windows Phone app gives me error "You need to install an app for this task do you want to search it on store?" on app but there's nothing shows up on debugging. if i click on yes it opens store and searching for something and founds nothing. how can I solve this? edit: it goes away when I disable IsEnabledScript. 回答1: Let me try to guess: you are using a WebControl . The page you initially navigate to probably tries to redirect to an URI that has a protocol extension (like facebook://) via