visual-studio-2008

StartPosition problem in C#?

若如初见. 提交于 2019-12-12 05:59:48
问题 I wanna show my WinApp in Center Screen, so I set StartPosition property to CenterScreen but the window doesn't show in center of screen. What's wrong with it ? Am I missing something? P.S: I show the window from a main window and with a button. Edit: The code that I'm using to show the window. Form_CO form_CO = new Form_CO(); void button_CO_Click(object sender, EventArgs e) { try { //StaticVariables.Form_CO_IsShown is to prevent opening the same multiple windows if (!StaticVariables.Form_CO

Ms Test or NUnit?

不问归期 提交于 2019-12-12 05:49:45
问题 Is there any advantage to picking NUnit for unit/integration testing vs the built in MsTest? 回答1: They are pretty similar. Differences are subtle. NUnit has testcases for parametrized tests; MSTest does not. You can write [TestCase(1, "one)] [TestCase(2, "two)] [TestCase(3, "three)] [TestCase(4, "four)] public void CanTranslate(int number, string expectedTranslation) { var translation = _sut.Translate(number); translation.Should().Be.EqualTo(expectedTranslation); } rather than writing 4 tests

Difference in Windows Cryptography Service between VC++ 6.0 and VS 2008

半世苍凉 提交于 2019-12-12 05:49:43
问题 I have a class of encryption that was developed in Microsoft Visual C++ 6.0, and it is working properly. I migrated the code to Microsoft Visual Studio 2008, this class is working, but with a different behavior. When I pass a specific string for encryption, the encryption result generated in the compiled code in Visual C + + 6.0 is different than in Visual Studio 2008, and it should not happen. Can anyone help me understand why this is happening? Cryptography functions of the Windows Services

Create multiple gridviews in code behind

北慕城南 提交于 2019-12-12 05:46:06
问题 This is very interesting.. I want to have multiple gridviews in a panel. and the number of gridviews is not fixed.. So basically i think there should be no code in the .aspx page as i have to create the gridview in codebehind. I have the code for 1 gridview in one panel.. where i define the grid view in the HTML page and populate it from the code behind. Here is the code for that.. can any 1 please help me with the multiple gridviews... this is on the .aspx page <asp:GridView ID="GridView1"

WIndows Mobile 6 SDK - string.Split and StringSplitOptions - can't find

大兔子大兔子 提交于 2019-12-12 05:41:42
问题 I try to do the using System; "some/String".Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) but the compiler can't find the StringSplitOptions enum. How to fix it ? 回答1: Windows Mobile uses .NET Compact Framework, which does not support StringSplitOptions. The only String.Split overload implemented in the Compact Framework is Split(Char[]). 来源: https://stackoverflow.com/questions/31835127/windows-mobile-6-sdk-string-split-and-stringsplitoptions-cant-find

Problem with omp_set_num_threads called from a WinAPI thread

为君一笑 提交于 2019-12-12 05:39:26
问题 I've run into a funny problem using OpenMP v2 under MSVC 9 SP1. when calling omp_set_num_threads from the main thread of execution then using omp_get_num_threads to check the amount set, all works well and checks out. However, in an GUI app, I call the same thing, but its own thread(created with CreateThread ), to prevent the UI from becoming unresponsive, how ever it seems that omp_set_num_threads doesn't work when called from a thread, as omp_get_num_threads always reports 1, and from tests

Combining two projects and get a single .sln file

醉酒当歌 提交于 2019-12-12 05:34:57
问题 I want to combine two projects into one i.e. image and audio steganography with a single .sln file. How do I connect them? I'm using Visual Studio 2008. 回答1: You can find an answer here: How do I merge two different Visual Studio solutions? Or simply right click on the solution Add existing project (or Add existing item) and select the solution to be merged 回答2: What the other guy said about opening one solution and adding an existing project sounds pretty good. If for some reason you open

Using cmd.exe in a VS Setup Custom Action

坚强是说给别人听的谎言 提交于 2019-12-12 05:25:49
问题 I set my Custom Action to cmd.exe and adding these arguments: /K XmlPreProcess.exe /x:"[SETTINGSFILE]" /i:"[TARGETDIR]web.config" [CUSTOMSETTINGS] /e:[ENVIRONMENTBUTTON] >log.txt I'm trying to either: a) stop the command screen so I can read it b) write the results to a file so I can read it. [ENVIRONMENTUTTON] should be equal to QA - which I selected from a dialog form showing 4 radio buttons. [SETTINGSFILE] is a user-entered field also a a dialog form. The command window flashes by, I don't

fixing the header row in gridview?

☆樱花仙子☆ 提交于 2019-12-12 05:11:37
问题 I used a grid view in my project. in that i used vertical scrolls.. its work fine. But the problem is , when i scroll down the header is also move I want to have a fixed header provided the contents alone scroll. please give me an advice in this regard. I found many examples but most of them did not work for Chrome.. is there something which is universal and i can use for free.... any suggestions will be appreciated... Thanks <div> <asp:Panel ID="Panel1" runat="server" Height="100px"

Script all SQL database objects into VS Database project

别来无恙 提交于 2019-12-12 05:04:28
问题 I'm trying to put my database scripts into a VS Database project (I haven't generated them yet). I'm assuming there should be some kind of "auto generate all" functionality, but I can't find anything. Or do I really have to generate them one by one manually from management studio? 回答1: In VS, Data->Schema Compare. Source = your database. Destination = Your Project. 回答2: I found out if you open server explorer you can just drag and drop the objects into the database project. :) 来源: https:/