visual-studio-2010

Visual Studio Configuration Manager x64 only option

亡梦爱人 提交于 2019-12-25 03:08:59
问题 I seem to have completely the *emphasized text*opposite*emphasized text* problem to everyone else... I'm trying to have my program (C++/CLI - Visual Studio 2010) run on any machine - but it's only working on 64 bit machines... I checked my Configuration Manager and when I try and choose a new platform, "x64" is the only one that exists? There is no other option - and I'm a bit stuck for ideas :( 回答1: In the configuration manager, for each project it lists the Platform (x86, x64, etc.). Just

C++ Boost not found file

空扰寡人 提交于 2019-12-25 03:08:01
问题 I'm trying to use variant from boost and I'm receiving this error: fatal error C1083: Cannot open include file: 'boost/variant.hpp': No such file or directory I've included the files in project properties. In the Reference Directories and Library Directories I've tried also with "...\lib" "....\stage\lib" And also in the Include Directories I've tried also with: "...\boost_1_68_0" "...\boost_1_68_0\boost" In the beginning, I used D:\Libs\boost_1_68_0\libs and because it didn't work I've

How to find and update a matching control once a file exists

你离开我真会死。 提交于 2019-12-25 02:58:40
问题 I have written a WinForm project which displays a ListBox containing a list of file names. When the user clicks a submit button, the application dynamically loads and displays one PictureBox control for each file and then waits while they are processed. As PDF files are generated for each one, the matching PictureBox for that file needs to be updated to display an image. Here's what I have so far: Private Sub ButtonSubmit_Click(sender As System.Object, e As System.EventArgs) Handles

Multithreaded code executes by threadnumber-times slower using System.Threading and Visual Studio C# Express Hosting Process

感情迁移 提交于 2019-12-25 02:58:27
问题 I have a very simple program counting the characters in a string. An integer threadnum sets the number of threads and divides the data by threadnum accordingly into chunks for each thread to process. Each thread increments the values contained in a shared dictionary, building a character historgram. private Dictionary<UInt32, int> dict = new Dictionary<UInt32, int>(); In order to wait for all threads to finish and continue with the main process, I invoke Thread.Join Initially I had a local

Programming a Hotkey in C# with Visual Studio 2010

微笑、不失礼 提交于 2019-12-25 02:51:06
问题 I have a small form with 9 Check Boxes in it. I am trying to make hotkeys for those boxes that correspond with the Numpad, but I'm having the darnedest time. I have two main problems: 1. private void checkBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.NumPad7) { MessageBox.Show("It's working"); } } That is my code. It works, but doesn't do what I want. It makes a message appear, but ONLY if that checkbox is highlighted. I think KeyPreview might help in this context, but

Store image in database and retrieve it

冷暖自知 提交于 2019-12-25 02:43:05
问题 My code for inserting image in database is as follows: MemoryStream ms =new MemoryStream(); byte[] PhotoByte=null; PhotoByte=ms.ToArray(); pictureBox1.Image.Save(ms, ImageFormat.Jpeg); PhotoByte =ms.ToArray(); Str = "insert into Experimmm Values('" + PhotoByte + "','" + textBox1.Text + "')"; Conn.Open(); cmd.Connection = Conn; cmd.CommandText = Str; cmd.ExecuteNonQuery(); Conn.Close(); Which is going well. I can see binary data in ma database table like <Binary Data> My code for retrieving

Using zlib in Visual C++ project

一世执手 提交于 2019-12-25 02:29:44
问题 I've been struggling to compile my Visual C++ 2010 project with dependency of Zlib. I've got source code that worked on Linux and Mac OS X. Here's, where I have linker errors: error LNK2019: unresolved external symbol _inflate@8 referenced in function... error LNK2019: unresolved external symbol _inflateInit2_@16 referenced in function... error LNK2019: unresolved external symbol _deflate@8 referenced in function... error LNK2019: unresolved external symbol _deflateInit2_@32 referenced in

EF and SQL Server CE with NuGet

自古美人都是妖i 提交于 2019-12-25 02:29:07
问题 While poking around NuGet I noticed a couple of packages that I have already installed, EF and SQL Server CE. This raised a couple of questions that I have not been able to find any information on. On EF package what does this add that isn't already there in VS or does it just do all the reference work for you? On SQL Server CE package, what does this add that installing it doesn't? Or is this just a better way to install it. It certainly takes a lot to get an environment setup and I like

How to convert an array from string to integer

∥☆過路亽.° 提交于 2019-12-25 02:25:56
问题 I have an array "string()" with 3 element (2,5,6) How do I convert all of element from string to int? I tried CInt and Array.ConvertAll but they didn't work. Please show me the way to do that. Thank you. 回答1: You have not said what type of problem you are having using Array.ConvertAll or shown your implementation of it, but this works for me. Module Module1 Sub Main() Dim mystringArray As String() = New String() {"2", "5", "6"} Dim myintArray As Integer() myintArray = Array.ConvertAll

Data provider required to connect to local data file could not be found

浪子不回头ぞ 提交于 2019-12-25 02:24:26
问题 I am using Visual Studio 2010 ultimate edition and i install it with full components. Now i working on win form project in which i need to include a local database so whenever i am trying to add local database file( mydata.sdf ) in my project then a box comes showing this message: Data provider required to connect to local data file could not be found.The file will be added to project but the typed dataset associated with the file will not be generated. So please suggest me how can i solve