visual-studio-2010

Add context meu item to all files and folders in the solution explorer using vspackage

你。 提交于 2020-01-03 04:34:15
问题 I want to add a menu item to the context menu of all the files and folders in the solution explorer. I was able to add my menu item to the project node with this entry in the vsct file.. <Menu guid="guidERAPackageAlphaCmdSet" id="ERAInsightMenu" priority="0x0700" type="Context"> <Parent guid="guidSHLMainMenu" id="IDG_VS_CTXT_PROJECT_ADD" /> <Strings> <ButtonText>ERA Insight</ButtonText> <CommandName>ERA Insight</CommandName> </Strings> </Menu> I want to get this in the context menu of all

Windows Phone 8 SDK WebClient Encoding Issue

六眼飞鱼酱① 提交于 2020-01-03 04:22:18
问题 I'm trying to parse html from a site using windows-1254 charset. but all Turkish characters shown like this: � � � � � Where is the actual problem? I did try these: webClient.Encoding = System.Text.Encoding.UTF8 webClient.Encoding = System.Text.Encoding.GetString("UTF-8"); as function this: public string ReplaceText(string _text) { _text = _text.Replace("İ", "İ").Replace("ı", "ı").Replace("ü", "ü").Replace("ÅŸ", "ş").Replace("Å", "Ş").Replace("ç", "ç").Replace("ö", "ö").Replace("ÄŸ", "ğ"

limit directory with GetOpenFileName()

点点圈 提交于 2020-01-03 04:09:07
问题 I know that Microsoft recommends using the Common Item Dialog boxes over GetOpenFileName() and GetSaveFileName() but I am working with some older code. How can I limit GetOpenFileName() to only allow the user to select files in a certain directory? For example, I only want the user to be able to select a file from the "Images" directory. I don't want them to be able to navigate into other directories when opening a file. They must select a file from the "Images" directory. The flag OFN

SelectList to filter results based on sql tables bool column for “Retired”

孤人 提交于 2020-01-03 03:44:08
问题 I have a selectlist which I've setup in a ViewModel and DropDownFor and it already has itself ordered as u can see below but I need it to filter so that the 3rd column "Retired" if it's value is "0" all those results are show but not if it's "1". I was thinking I would need to add after the .OrderBy(...).Where(m=>m.Retired but don't know how exactly I'd filter it from there and ofc it doesn't have to be done in the VM but that's just how I was able to implement the OrderBy filter. VM List

MSBuild task to Build other solution projects fails in VS but works with MSBuild.exe command line

痞子三分冷 提交于 2020-01-03 03:43:06
问题 I have a custom MSBuild task which among other things adds embedded resources to other projects in the solution. After adding the resources I'd like to then build those projects, but found I can't get this working within Visual Studio. To test, I stripped out the custom task entirely and redefined a simple AfterBuild target in the web project of a Silverlight solution. The target uses the MSBuild task to build the Silverlight application project in the solution, and looks like this: <Target

Show a ProgressBar while uploading a picture (Windows Form C#)

為{幸葍}努か 提交于 2020-01-03 03:17:14
问题 I have a situation here. I have a picture box in windows form and i let user to browse a picture by using openfileupload control and after that i set selected picture into picture box. Here is my code: namespace Employee_Card_Manager { public partial class Form1 : Form { string Chosen_File = ""; public Form1() { InitializeComponent(); } private void label1_Click(object sender, EventArgs e) { } private void openFileDialog1_FileOk(object sender, CancelEventArgs e) { } private void button1_Click

VC++ 2010 exclude library

你说的曾经没有我的故事 提交于 2020-01-03 03:11:14
问题 A project I'm building is attempting to include a library, but for the life of me I can't find out the call to include it is coming from. It's trying to include atlthunk.lib, which is supposed to be included through a #pragma comment in atlbase.h, but there's no such comment in my atlbase.h. I read about someone else who had this problem, but circumvented it by "excluding the lib forcefully". I realise this isn't a stable solution, but could someone tell me how one goes about forcefully

Why is my program going into both an if statement AND its corresponding else statement?

这一生的挚爱 提交于 2020-01-03 03:10:14
问题 In part of my program, I have the code: if(cameraName == L"AVT Prosilica GT2750") { mCamera = new camera_avtcam_ex_t(); } else if(cameraName == L"QImaging Retiga 2000R\\4000R") { mCamera = new camera_qcam_ex_t(); } When I have set up my program so that cameraName defaults to L"AVT Prosilica GT2750" (and my debugger will show this to be its value), it goes into the if statement and runs mCamera = new camera_avtcam_ex_t(); , but then when I step to the next executed line my debugger skips

using getch() to hold command prompt open Visual C++ 2010

强颜欢笑 提交于 2020-01-03 03:02:08
问题 Im currently learning c++ from a book called 'Ivor Hortons Beginning Visual c++ 2010'. In all the examples i've attempted so far I've had to use getch() to hold open the command prompt, and sometimes remove the return 0 statement from the end of the main method. Is this a vagary of windows 7 and will it cause problems further down the line? It's no problem doing this at the moment but since this is not included in the book I was wondering if it might be something I've set up wrong. Many

using getch() to hold command prompt open Visual C++ 2010

若如初见. 提交于 2020-01-03 03:02:05
问题 Im currently learning c++ from a book called 'Ivor Hortons Beginning Visual c++ 2010'. In all the examples i've attempted so far I've had to use getch() to hold open the command prompt, and sometimes remove the return 0 statement from the end of the main method. Is this a vagary of windows 7 and will it cause problems further down the line? It's no problem doing this at the moment but since this is not included in the book I was wondering if it might be something I've set up wrong. Many