visual-studio-2008

Custom User Control in C#…Right Click Menu to Copy Text (Java Developer learning C#)

折月煮酒 提交于 2019-12-13 16:16:36
问题 I'm working on a custom user control that essentially displays a name value pair (name is on a black background, value on a white). I have my control displaying correctly, even showing up in Designer and on my build page. What I'd like to do from here is have the ability to right click on the user control and have a menu come up that has a "Copy Value" option, that when selected will copy the value in the "value" part of the user control to the clipboard. What is the best method of approach?

Visual Studio: Intellisense Problems and Linux Compatibility

独自空忆成欢 提交于 2019-12-13 16:09:14
问题 Two somewhat unrelated questions: Sometimes when I am working on a C++ project in Visual Studio 2008 Express, intellisense just does not want to "work" even though it really should. Auto completion box does not show and status bar says something along the lines of: "Intellisense: No further information is available". Sometimes it can be fixed by either rebuilding the solution or re-opening the solution, and sometimes even that doesn't work. Is this a known problem? If so: are there any known

Heap corruption with strdup

与世无争的帅哥 提交于 2019-12-13 16:08:57
问题 I am using VTK together with MSVC and get a strange behaviour when trying to load data. I tinkered a little bit with it and even the following code generates a heap corruption, any ideas what is happening or what possibly went wrong? vtkAbstractArray *vtkDataReader::ReadArray(const char *dataType, int numTuples, int numComp) { char* type=strdup(dataType); free(type); // <--- here the heap corrution appears ... This is the call stack: > msvcr90d.dll!_CrtIsValidHeapPointer(const void *

How do I embed an ASP.NET Web Site (or Web Application) into another?

Deadly 提交于 2019-12-13 16:01:14
问题 I have very little experience with ASP.NET and I am doing some self-training before I start writing my first web site/application, which will be a calibration utility. How that utility works is not my concern right now. However, the utility eventually needs to end up embedded in someone else's web site, either just as a URL to the page with my code, or embedded (say, as an HTML frame or an iframe). To figure out the basics of this, I coded up two very simple ASP.NET web sites, a "parent"

Getting a “Value for <column> in table <table> is DBNull” error

不问归期 提交于 2019-12-13 15:24:56
问题 I'm working on a WCF service, in which I'm trying to load data from one data table passed to the method, into another data table from the local database (in this case, the "local" database is a SQL Server database on a Windows 2003 Server). When I do I get the following error message: "The value for column 'VocNeedDesc' in table 'ASIVocationalNeeds' is DBNull." This actually is OK, because column VocNeedDesc in table ASIVocationalNeeds allows nulls. Originally I just assigned the value of

Global.asax template not available in Visual Studio

大兔子大兔子 提交于 2019-12-13 15:17:44
问题 When I attempt to "add new item" to my web project (by right-clicking, add new item) - there is no template for it. What might the problem be? I'm using VS2008. Additional Info: When I right click on the solution and "Add", "New Web Site" - I have zero tempates to choose from. I have tried running devenv /installvstemplates and this template box is still empty. I have only three templates in the following directory. Is there somewhere I can just copy the other templates from manually? C:

How to insert data into MS access file using C#?

徘徊边缘 提交于 2019-12-13 14:31:25
问题 I have created an access file with a table named "login". The columns are username and password. Now i want to add new members to the table with their username and password. The information will be obtained from textbox1 and textbox2. How can i do this? By the way, what is the connection string? Is it from the database properties? what i get is "@Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\qianren\Desktop\iplan version\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\log

Reference trouble with BizTalk schema project in Visual Studio 2008

时光毁灭记忆、已成空白 提交于 2019-12-13 14:29:34
问题 In a large VS 2008 solution we have different schema projects and mapping projects. The mapping projects reference the appropriate schema projects and this works fine overall. However, recently I added a new schema project and it consistently gives the same problem. When I add a new schema to it, and I want to use that schema in a mapping project that already has a reference to the schema project, the map fails to validate with the message Cannot load source/destination schema [...]. Either

Show method name in “Find all references” - C# Visual Studio

a 夏天 提交于 2019-12-13 14:23:26
问题 When i rightclick something in visual studio and press Find all references i get a list of all locations where this object occur. Is there any way to also show the scope of this location (Namespace.Class.Method) instead of just a line-number. Now i have to doubleclick all of the results to see where it actually is. 回答1: One more vote for ReSharper. Check here for some screenshots as to the type of results. You can change how the results are presented (My favourite is Project+Namespace+Member,

Inline speed and compiler optimization

梦想与她 提交于 2019-12-13 14:19:31
问题 I'm doing a bit of hands on research surrounding the speed benefits of making a function inline. I don't have the book with me, but one text I was reading, was suggesting a fairly large overhead cost to making function calls; and when ever executable size is either negligible, or can be spared, a function should be declared inline, for speed. I've written the following code to test this theory, and from what I can tell, there is no speed benifit from declaring a function as inline. Both