visual-studio-2010

Share .cs file among VS 2010 C# projects

筅森魡賤 提交于 2019-12-31 04:34:13
问题 I was wondering if two separate C# Windows projects (in two separate solutions) can share one .cs file with shared definitions? If so, then how? PS. One project is ASP.NET web app and the second project is C# Windows service (started as a Windows console project.) 回答1: Add Existing Item->Add As Link (found by selecting drop down on Add button) 回答2: Move that cs file/code to be shared to a new class library project and refer that in your other 2 projects. 来源: https://stackoverflow.com

What does HRESULT 0x80070057 mean, and why is my program crashing?

二次信任 提交于 2019-12-31 04:29:07
问题 I've written a program that takes two images, then runs an algorithm on them to isolate a hand in the "foreground" and match the gesture to a known one. A few days ago, I ran the program with some test parameters, just to test a few tweaks I had made, and it all worked fine. I have not touched the code since then. Today, I ran the program with two new images, and it crashed, giving me the error code 0x0 and HRESULT=0x80070057 . Beyond this, when I stopped debugging from C# Visual Studio 2010

How can I interpret a masking system in my login system?

纵然是瞬间 提交于 2019-12-31 04:17:07
问题 I'm just not sure how I can mask with the addition of arrays. I would also like the masking system to recognize backspace not as a letter. Module Module1 Sub Main() Dim memofs As Char Dim stdntpassword As String = Nothing Dim staffpassword As String = Nothing Console.Write("Are you a member of staff? (y/n) ") memofs = Console.ReadLine If memofs = "y" Or memofs = "Y" Then ElseIf memofs = "n" Or memofs = "N" Then Console.WriteLine("Password: ") stdntpassword = Console.ReadLine End If For

Link error linking from managed to unmanaged C++ despite linking to .lib file with exported symbols

╄→尐↘猪︶ㄣ 提交于 2019-12-31 04:05:45
问题 Despite following various posts on using and linking to unmanaged C++ code from a C++/CLI wrapper dll, I cannot resolve these link issues. 1>MyClassAdapter.obj : error LNK2028: unresolved token (0A00000A) "public: __thiscall MyClass::~MyClass(void)" (??1MyClass@@$$FQAE@XZ) referenced in function "public: void * __thiscall MyClass::`scalar deleting destructor'(unsigned int)" (??_GMyClass@@$$FQAEPAXI@Z) 1>MyClassAdapter.obj : error LNK2028: unresolved token (0A00000B) "public: __thiscall

Python Ctypes Load Library

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-31 04:02:33
问题 I am using windows 7 64 bit machine. I installed Visual studio 2010 and developed a simple win32 dll to add 2 numbers.. The dll is created and i used a test application to test the dll and it works fine.. Now i write python script(shown below) to use this library. But i get the following error message. Traceback (most recent call last): File "C:\Users\sbritto\Documents\Visual Studio 2008\Projects\MathFuncsDll\Debug\MathFuncs.py", line 5, in <module> lib = ctypes.WinDLL('MathFuncsDll.dll',use

Supported Windows compilers in CUDA

点点圈 提交于 2019-12-31 03:50:06
问题 I am a complete novice CUDA programmer trying to get started, and I am encountering the issue mentioned here with version 5.5 "clean" error with CUDA 5.5 in Visual Studio 2010 Express Can anyone confirm that this is an issue with version 5.5 only? Is there an earlier version that I can install e.g. 5.0, that will allow nvcc to work with the Visual Studio 10.0 Express version compiler under 64-bit Windows 7? 回答1: This is a late answer provided here to remove this question from the unanswered

Unable To Cast object type 'System.String[*]' to type 'System.String[]'

天涯浪子 提交于 2019-12-31 03:33:05
问题 Hi everyone i had a issue with a code in C# .NET, I'm using a DLL for connect to OPC Servers the DLL that was used in a VB.NET project and works with no problem at all. I'm trying to show a list of available Servers in a ListBox, the code used in VB.NET (and works) is this one: Dim AllOPCServers As Object AllOPCServers = AnOPCServer.GetOPCServers ' Load the list returned into the List box for user selection Dim i As Short For i = LBound(AllOPCServers) To UBound(AllOPCServers)

Visual Studio 2010 Runtime Libraries

北城余情 提交于 2019-12-31 03:27:12
问题 I wrote a tool that many users would use on their computers. I noticed however, that users who do not have visual studio installed, cannot open my executable. The error says that msvcp100.dll is missing. I found in internet a redistributable package from microsoft, that should apparently provide these dlls. My question is: is there another way to bypass this problem? Something like an option in the project properties? 回答1: Yes, you can change a compiler setting to link the C++ standard

Error 1 error LNK1104: cannot open file 'winmm.lib'

这一生的挚爱 提交于 2019-12-31 03:01:30
问题 Ok, so I am running Visual Basic 2010 Express and I tried to run Tutorial # 2 in the Direct X SDK; however, the program won't compile for some reason, although in the tutorial I am reading now it said that I only needed the Direct X SDK and Visual Basic 2010 Express. I opened Tutorial02_2010.sln, and tried to compile it. Here's the code of the main file: //-------------------------------------------------------------------------------------- // File: Tutorial02.cpp // // This application

How to anti-alias the fonts in visual studio in windows forms application?

China☆狼群 提交于 2019-12-31 03:00:53
问题 enter link description heredoes any one know the code to anti alias the fonts so that the project looks more professional.tell me the code and where to insert it in the project.As of now the fonts looks jaggy the programming language is visual C# 4.0 .net and IDE is VS 2010 for example this is a label1 what do I need to insert to anti alias this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit