FAQ Database Discussion Community


How can I find (and rehabilitate, if necessary) the Code Snippet I created?

visual-studio-2010,visual-studio,code-snippets,vsinstaller
I created a code snippet (the first of many, hopefully) using mainly this article as guidance. It seemed to work. Here are the steps I took: First, I created this file with the code snippet (HtmlTableRowWithTwoCells.snippet): <?xml version="1.0" encoding="utf-8" ?> <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/CodeSnippet"> <CodeSnippet Format="1.0.0"> <!-- The Title of the snippet,...

How change project name with conditions in c++

c++,visual-studio-2010
How can i change change the name of project executable in c++? I know that i can do it in Project Properties under "Configuration Properties", but i want to do it in my code, for example using conditions #ifdef *something define* //Project name be A.exe #else //Project name be B.exe...

Double templated function overload fails

c++,visual-studio-2010,templates,compiler-errors,c++03
I have a template class, having various template functions. One of them need to be overloaded (a couple of times). Basically - if my class would not be a template, these would be my function(s): class OtherClass { public: template<class T> T foo(T &t, const std::string &trash); }; template<class T>...

ShapeContainer not Staying In Front of PictureBoxes

vb.net,visual-studio-2010,powerpacks
I have a GUI in Visual Studio 2010 that has several PictureBoxes, LineShapes/Rectangles, and Labels/TextBoxes. The LineShapes/Rectangles need to be in front of the PictureBoxes, and the Labels/TextBoxes need to be in front of the LineShapes/Rectangles. For months my GUI was working correctly, when I called the BringToFront() method in...

How to pass absolute database name,server name as parameter?

c#,sql,sql-server,visual-studio-2010,sql-server-2008r2-express
I have a requirement where I need to select data from database DB1 and insert into database DB2. update [Server1\SQLEXPRESS].[DB1].dbo.table1 set CName = (select CName from [Server2\SQLEXPRESS].[DB2].dbo.table1 where CID = 3) So above script is working fine. Now I want to pass [Server1\SQLEXPRESS].[DB1] [Server2\SQLEXPRESS].[DB2] as parameters, because the server name...

How to populate a textbox when the form opens?

c#,winforms,visual-studio-2010
I am writing a program (My first program...) that contains a form that saves textbox info, checkbox, and radio button selections off to a text file when the save button is clicked. This part works. Then when the form opens (the next time you run the program) it collects all...

The specified task executable cmd.exe could not be run. The process cannot access the file because it is being used by another process

visual-studio-2010
I recently started getting this error intermittently when running or building a solution in Visual Studio 2010: The specified task executable cmd.exe could not be run. The process cannot access the file 'c:\temp\etc' because it is being used by another process. There are similar problems reported elsewhere, due to things...

Adding and converting numbers

c#,visual-studio-2010
So far my program asks the user for a number and it to the total ( which in my case is set to 0 at the moment) the ask another number and adds them up. int userNumber; int total = 0; int i; Console.WriteLine("Please enter a number"); string input =...

Accept Only 0's And 1's TextBox In C++ [closed]

c++,visual-studio-2010
In C++!!I am making a binary application!!But I want to accept only 0 and 1 in my Text Box in which the user will type binary numbers while typing on it.I tried many codes from Google but I didn't find the answer.

Error in sending HTTP requests in Windows Phone 7.1

.net,visual-studio-2010,visual-studio,windows-phone,windows-phone-7.1
I am trying to send a HTTP request in Windows Phone using Visual Studio 2010 Express, but I am getting this error: The type or namespace name 'HttpClient' could not be found (are you missing a using directive or an assembly reference?) It's not able to find HttpClient even when...

VB.Net: Retrieve input and display in upper and lower cases

vb.net,visual-studio-2010
Say I have a textbox that has the following text : "hello" without the quotes. How would I take that text and output something like this : [Hh][Ee][Ll][Ll][Oo] Is there a better/faster way than manually changing it?...

Replacing string at certain index of Split

vb.net,string,visual-studio-2010
Using streamreader to read line by line of a text file. When I get to a certain line (i.e., 123|abc|99999||ded||789), I want to replace ONLY the first empty area with text. So far, I've been toying with If sLine.Split("|")(3) = "" Then 'This is where I'm stuck, I want to...

Different pattern to give input in console application

c#,visual-studio-2010
I am a beginner in .net and I made a simple console application and it's works. My problem is when I give input the input must be in new line eg: 1 2 3 how I input like 1 2 3 I am using the following code int a, b,...

GetFullPath no output ?! VB.NET

vb.net,visual-studio-2010,path
Good evening to all of you! I have a problem that I can't solve with the method GetFullPath in vb.net. What I want to do : I would like to get the full path of a text file (test.txt) which is located in the same folder as the app.exe, the...

Retrieve text from control

vb.net,visual-studio-2010,combobox
I am developing a program for visual basic 2010. I have a ComboBox which has a drop-down box containing information like this: "I like apples: 123". Now I would like to get the information which is after the ":", 123. How can I get this information into the ComboBox text...

Vb 2010 how to split (explode) a string

vb.net,visual-studio-2010
Based on the code I provided I would like to explode a string into two. The code is working but only if SearchQurry contains two phrases. Private Sub SearchTxt_PreviewKeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.PreviewKeyDownEventArgs) Handles SearchTxt.PreviewKeyDown Dim SearchQurry As String = SearchTxt.Text Dim MyString As System.String MyString =...

NHibernate trying to update ID to null on a delete operation

c#,xml,visual-studio-2010,nhibernate
At first I have these entities: Persona, Paciente, Alergia, Cita and Consulta. The problem comes when I try to delete a Persona. My DB looks like this: I'm currently just working with Persona and Paciente. And those are their mapping and classes: <?xml version="1.0" encoding="utf-8"?> <hibernate-mapping assembly="Odontologia General Admin" namespace="Odontologia_General_Admin.Persistence.Entidades"...

How do I generate xsd from dataset.xsd in Visual Studio

c#,xml,visual-studio-2010,xsd,xsd.exe
Using Visual Studio 2010 in a generic C# project, I've created a DataSet (DataSet1.xsd) and dragged my table onto it. I can see the table in the designer view. I want to see the raw .xsd file based on this DataSet. I don't want to write the .xsd by hand,...

Visual Basic Performance Counter Doesn't Work

vb.net,visual-studio-2010,performancecounter
Ok so I'm trying to get the CPU usage using a PerformanceCounter in Visual Studio 2010 but the problem I'm having is when I add the PerformanceCounter and try to add a CategoryName the list is empty along with CounterName and InstanceName. I also tried adding the counter using the...

How to add ( RichTextBox1.Text) to a textfile.txt

vb.net,visual-studio-2010
I have a textfile called foodadvices.txt My app have a 2 richtextbox and button The button job is to add all texts in rtb1 to the textfile My idea is to read the textfile into rtb2 So the final code after reading textfile is RichTextBox2.Text = richtextbox 1.text & richtextbox2.text...

Linker error when calling a C function from C++ code in different VS2010 project

c++,c,visual-studio-2010,extern,lnk2001
I'm trying to include some C code I found in our C++ project. The function is defined like this in the C file. #ifdef __cplusplus extern "C" { #endif extern char *dtoa(double, int, int, int *, int *, char **); extern char *g_fmt(char *, double); extern void freedtoa(char*); #ifdef __cplusplus...

Return #N/A error from ExcelDNA

excel,visual-studio-2010,excel-dna
I'm pretty new to excelDNA, so I may be missing something obvious. I'm trying to return a #N/A from an excelDNA UDF. The function I'm using (via Visual Studio 2010) is below: public static object returnError() { return ExcelDna.Integration.ExcelError.ExcelErrorNA; } When called from an Excel worksheet, this returns a #VALUE...

Exception (integer overflow) when initializing 64-bit Mersenne Twister

vb.net,visual-studio-2010,random,numbers,64bit
I am using the 64-bit verison of the Mersenne Twister, specifically the version: A C-program for MT19937-64 (2004/9/29 version). Coded by Takuji Nishimura and Makoto Matsumoto. and am receiving an integer overflow when compiling into the Release but don't get the exception during run-time in Debug. I have integer overflow...

TFS Moving Files with history

visual-studio-2010,version-control,tfs,tfs2010
FYI, I have gone through this link - Team Foundation Server - Moving Source with History which is of different scenario Issue: We were working in a single solution with multiple projects in TFS1 before three months, but unfortunately one bad day due to the hardware issue we were not...

Debug error: Heap corruption detected

c,visual-studio-2010,pointers,malloc
I am playing around a bit in C and trying to write a test program for kind of oop in c programming. I get the Error of the headline in Visual Studio 2010. In using gcc i don't get this error. Can anyone point me to what i am doing...

VB.NET code snippet to insert comment block in Visual Studio 2010

vb.net,visual-studio-2010
I have used /// snippet in C# when I use Visual Studio 2010 and this will create a pre-defined comment block. When I use VB.NET the same princioal using ''' doesn't work. I can make my own snippets to intellisense, but is there predefined snippet for this?...

Visual Basic email system bcc mails [closed]

vb.net,visual-studio-2010
I am making visual basic email software this software send attachment files and messages i want to send mails many companies i am adding To field but i want to add BCC and CC mail system also include but it don't have any idea how i code for this ..if...

Division button for Win32 app

c++,visual-studio-2010,winapi
I'm coding in Microsoft Visual Studio 2010 Professional, and when I add this code into my code everything blows up. I'm trying to make a calculator and this segment of code is the code for my "division button". Can you help me? When I add this, 10 build errors show...

Running a .asmx Web service as a Windows Service

c#,visual-studio-2010,web-services,wcf,asmx
I'm a total novice on asking questions on this forum - I hope I ask this question correctly. The problem I'm trying to tackle is this: I have a Visual Studio 2010 project which is for a Web Service. The class which does the work is defined in a ".asmx"...

How to output a single file for each row of an excel file read in?

vb.net,excel,visual-studio-2010
How can I output a file for each row of excel data? Right now it outputs the correct number of files but has the rows of data incremented, so file 1 is correct, file 2 has row 1 and row 2, etc. Dim smNum As Integer = 0 If rowct...

Visual Studio - Can I view the code of an older version of a project?

c#,visual-studio-2010
I made the mistake of changing a subroutine in a project and publishing it. Now I want to revert back to the older subroutine. Is it possible to find the older project and retrieve the older subroutine?

playing media in visual studio 2012 using c#

java,visual-studio-2010,music,player
Basically i have developed a music player in java. And now i want my application in Visual studio 2012 to play the media file in java music player developed by me. how to do that please someone help.

std::map for small sparse collections

c++,visual-studio-2010,visual-c++
Given a struct MyData, of which many instances exist (I'd say several millions at most), for each instance I need to store a member which may contain values for up to 8 keys. The key will always be an int ranged 0-7, and the values will always be a 3D...

How to import a package from SSMS to Visual Studio for local machine?

visual-studio-2010,visual-studio,ssis,ssms
I'm trying to mess around with an SSIS package on my local machine. Currently, this package is in SSMS under a server. When I try to export this package, save it on my desktop and doule-click to open it, a deployment wizard comes up. What I want, is the package...

How to read and write a file using Memory Mapped File C#?

c#,asp.net,visual-studio-2010,file,memory-mapped-files
I have an image in D Drive like "D:\Image\1.tiff". I want to read this file and write it in an another location, for example in the path "D:\Project\". How to do this using Memory Mapped File?

Launch Condition : Windows OS service pack version with OS bit

c#,visual-studio-2010,setup-deployment
For an windows application I am creating a Deployment project in VS2010. I want to add Launch Condition such as : Setup up should start on : Windows XP having Service Pack 3 For 32 bit OR Windows XP having Service Pack 2 For 64 bit Currently I tried with...

Determining High CPU Usage on my C# Console App [closed]

c#,visual-studio-2010
I am working on a C# console application. It mostly just hosts a soap service, and listens for messages coming in to process. However, even when no soap messages are received, all 6 cores on my laptop are being heavily used. From a code walk through I can't see what...

Do I need Windows Server 2012 and VS 2012 or 2013 to write plugins for MS CRM 2015?

visual-studio-2010,dynamics-crm,windows-server-2008-r2,dynamics-crm-2015
I've been asked to take a look at some of our current plugins and alter them for our upgrade to 2015. However, looking at the SDK it says the system requirements (see here) are Windows Server 2012 (and 8, but not relevant for me) and Visual Studio 2012 or 2013....

How do you build the example CUDA Thrust device sort?

c++,visual-studio-2010,sorting,cuda,thrust
I am trying to build and run the Thrust example code in Visual Studio 2010 with the latest version (7.0) of CUDA and the THURST install that comes with it. I cannot get the example code to build and run. By eliminating parts of the code, I found the problem...

Precision not respected

visual-studio-2010,fortran
I use Visual Studio (2010 SP1) with Fortran IMSL (2011) and I can't get the right precision for my reals: program prova use, intrinsic :: iso_fortran_env implicit none integer, parameter :: ikind=selected_real_kind(p=8, r=99) real(kind=ikind) :: a=0.79 real(real64) :: b=0.79 real(kind=16) :: c=0.79 real(8) :: d=0.79 print *, a print *,...

Delphi exe setup in visual studio

visual-studio-2010,setup-project
I have a multiple exe file in that was created in delphi 6 . I want to create a setup file from the Visual Studio 2010 for these EXE. How can i do that. Please provide me the steps for do this.

unable to display contents byte[] properly on to a text box in c#

c#,visual-studio-2010
i am trying to display the byte[] in the text box, first i am reading all the encrypted info from the file temp.enc to the byte array FileStream f = File.OpenRead("temp.enc"); byte[] b = new byte[f.Length];//length is 32 bytes f.Read(b, 0, Convert.ToInt32(f.Length)); f.Close(); second i try to display the content...

How to execute four queries once and then check success or failure?

vb.net,windows,visual-studio-2010,ms-access
I need to execute four queries and then if there is success must return true otherwise false. The queries affect the database but the function returns false Private Function save_to_data() Dim success As Boolean = False Dim conn As OleDbConnection = GetDbConnection() Dim total_due As Decimal = sanitize(txt_total_due.Text) Dim amount_paid...

OpenCV heap corruption on Release mode

c++,visual-studio-2010,opencv
I have a simple code written in Visual Studio 2010 with openCV 2.4.10 which extracts some features from some input file. Mat extractSIFT(Mat img) { cv::Ptr<cv::FeatureDetector> detector; cv::Ptr<cv::Feature2D> descriptorExtractor; detector = cv::FeatureDetector::create("Dense"); descriptorExtractor = cv::DescriptorExtractor::create("SIFT"); detector->set("initXyStep",GRID_SPACING); vector<cv::KeyPoint> keypoints; detector->detect(img,keypoints); Mat o; //Mat o(keypoints.size(),128,CV_8U);...

Why does this regex cause my program to crash? [closed]

c++,regex,visual-studio-2010
I was writing a regex to extract a directory and filename. I tested it in a regex tester and it seems to work there, but when I run it in my C++ program it crashes. regex re("^(.*)(\\/|\\\)(.*\\.flt)$"); I'm compiling with Visual Studio 2010 SP1. When I run the code it...

MvcSiteMapProvider.dll not working in Visual Studio 2013

asp.net-mvc,visual-studio-2010,visual-studio-2013,mvcsitemapprovider
I have a MVC 2 project created in Visual Studio 2010 that use MvcSiteMapProvider.dll and works fine. But when loading the project in Visual Studio 2013, everything else work fine except it crashes at Html.MvcSiteMap().SiteMapPath The error message is An exception of type 'MvcSiteMapProvider.MvcSiteMapException' occurred in MvcSiteMapProvider.dll but was not...

Windows service: Get username when user log on

c#,windows,visual-studio-2010,service
my windows service should save the name of the user, which logon/logoff at the moment. The following code works for me but didn't save the username: protected override void OnSessionChange(SessionChangeDescription changeDescription) { try { string user = ""; foreach (ManagementObject currentObject in _wmiComputerSystem.GetInstances()) { user += currentObject.Properties["UserName"].Value.ToString().Trim(); } switch (changeDescription.Reason)...

unable to change a label text from NetworkAddressChangedEventHandler c#

c#,multithreading,visual-studio-2010
i will start with saying that i don't know c# very good and it's probable a very simple solution. what i want to achieve is when network status is changed i want to change a label i found out how to triger and event when network is changed using System.Net.NetworkInformation;...

Opening Python files via Visual Basic 2010

c#,python,vb.net,visual-studio-2010
I'm trying to make a Visual Basic 2010 program that can open a Python file. I've tried doing, Shell("C:\Users\Seth Connell\Desktop\J.A.R.V.I.S\Jarvis.py") but it returns an Error, "FileNotFound Exception Was Unhandled", but I know the file is at that location. Am I doing something wrong? Can Visual Basic 2010 open python files?...

xsd:complexType after xsd:attribute declarations yields error

xml,vb.net,visual-studio-2010,xsd,xml-validation
I have the following XSD: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="urn:com.xxxxx.xxx" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:com.xxxxx.xxx"> <xsd:element name="Stuff_EXT" type="DT_Analyse_EXT"/> <xsd:complexType name="Stuff_EXT"> <xsd:annotation> <xsd:documentation xml:lang="EN">Data Type Response</xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:element name="Res"> <xsd:complexType> <xsd:sequence>...

How to build a portable program by visual studio

visual-studio-2010,opencv
I am using visual studio 2010 under Win7-64bit to build an application with openCV. I finished development and build the release version without error. I also successfully run the program in debug mode. I then move the .exe file to other directory in the same computer. I run it in...

Error opening a Visual Studio 2010 project

visual-studio-2010,visual-studio
I have a Visual Studio C# project at work that I took home so I could work on it at home. At home when I click on the .sln file I get the following error - "The selected file is a solution file, but was created by a newer version...

Need help coming up with best structure for declaring/populating many arrays of XYZ data

arrays,vb.net,visual-studio-2010,data-structures
This is likely a simple concept for those who have worked with VB/VS for a while. I am plotting XY-style data on a scatter plot. Each set of data (Scan) has three columns of double precision data points: Potential, Current, and Time, not necessarily in that order. Each set contains...

Deployment Project - custom action update

c#,visual-studio-2010,deployment,setup-deployment
Situation: I have a Deployment Project in visual studio 2010 setup to install a console application. This console application has some custom actions written into it for the Deployment project. EDIT: To clarify, these custom actions are using the System.Configuration.Install.Installer class in .NET. I use the Committed, BeforeUninstall, AfterUninstall events...

Can not open Visual Studio C# solution after upgrading from VS2010 to VS2013 (or VS2012), error message “The given path's format is not supported”

c#,visual-studio-2010,visual-studio-2012,visual-studio-2013,projects-and-solutions
I had to upgrade a legacy project from Visual Studio 2010 to Visual Studio 2013. When in VS 2013 I tried to load solutions, it showed migration report with warnings (and no errors!) - all warnings where ­Visual Studio needs to make non-functional changes to this project in order to...

how to fill Combobox in vb 2010 with data from database (access database)

vb.net,visual-studio-2010
Sorry am a beginer to Vb, therefore am looking for a simple way to fill combox with data from access database. PHP WAY #connection first. $sql = "select * from projects"; $select_records = mysqli_query($con,$sql); while($fetch = mysqli_fetch_array($select_records)): echo "<form>"; echo "<select name='project">"; echo "<option name='$fetch[projectname]'>$fetch[projectname]</option>"; echo "</select>"; echo "</form>"; endwhile;...

In Setup project, difference between adding 'project output' and 'assembly'

c#,visual-studio-2010
I am not sure what is the correct thing to add. In the Setup Project, when one clicks on "View" -> Editor" -> "File System", and then right-clicks and a pop-up appears. If Project A uses Project B, must I add B.dll (assembly), or the output of Project B? (Assuming...

Want to create function validating textbox with letters only

vb.net,winforms,visual-studio-2010
And another function to validate specific format like " ad12-XYX- 123-EFD-20" I have created the function for numbers only' I want something similar to this Private Sub AllowNumericonly(Byval CTRL As control) if not Isnumeric(ctrl.text) And Ctrl.test<> "" Then MSGbox("Please enter numbers only." , Vbinformation) ctrl.text = "" ctrl.focus() End if...

How to properly align strings in C# using String.Format()?

c#,string,visual-studio-2010,format
guys, sorry to flood this website with such a boring question, but even after reading the documentation about C# and looking at their examples, I just can't seem to find an explanation for this. Namely, I have a code like this: String s = "Hello"; String n = "World"; String...

Serial COM Programming : Random Numbers

c++,visual-studio-2010,serial-port,serial-communication
i need a little help with my coding.. see the coding below is used if we were to write a string and send through a com port.. what if we were to generate random strings and send it through a com port.. what do i actually have to change in...

The name 'hello' does not exist in the current context [closed]

c#,asp.net,.net,visual-studio-2010
I have this in Default.aspx <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ApprovalProcess._Default" %> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <h2> Welcome to ASP.NET! </h2> <p> To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET...

Visual Studio 2010 Lazily Quantified Regex Replace

regex,vb.net,visual-studio-2010
Is there a way to do a non-greedy Regex replace / Regex find in VS 2010? I mean for the find-and-replace feature in visual studio: NOT a regex.replace method. I'm doing something like this to remove terrible exception handling: Find: Catch <.*> As Exception(.*\n)*.*End Try but because the (.*\n)* is...

Merging text files based on headings.

c#,visual-studio-2010,visual-studio,visual-studio-2012,split
I am looking for some advice on how I could merge multiple text files based on their headings. So say I have the following 3 text files with the following headings. As you can see some elements repeat and some are unique to the text file. The text files contain...

Creating a popup CMenu without a checkbox

c++,visual-studio-2010,mfc,windows-forms-designer,cmenu
I am creating a CMenu in Visual Studio 2010, MFC. I have a working CMenu that appears when a user right-clicks on a dialog. I can't seem to find a way to create menu selection without a spot for a checkbox. In Visual Studio's designer, my menu looks like this:...

How to create a class to check for keypress

vb.net,winforms,visual-studio-2010,visual-studio-2012
I have successfully created the code to check for keypress but my problem is, I want it to be in a class so that I can reuse it in other forms as well. How do I exactly do this? Here is the code: Private Sub money_KeyPress(ByVal sender As Object, ByVal...

how to enable or disable visual studio feature [duplicate]

c#,html,visual-studio-2010,visual-studio
This question already has an answer here: Visual Studio - Command to collapse all sections of code? 10 answers i'm a web developer. how to enable/disable this feature in visual studio? please see this pic of visual studio: ...

Search multiple solutions in Visual Studio 2010

visual-studio-2010,solution
Is there a way to search a term in multiple solutions at the same time? I know that Ctrl+Shift+F will search the entire current solution but I need a way to search the term in three solutions, all at once. I am using Visual studio 2010

Datagridview doesnt auto select first row after filling datasource

vb.net,visual-studio-2010,data-binding,datagridview
i have datagridview with 4 columns [Nam] , [ID] , [Shuru] , [Payan] second column ([ID]) is hidden and is used to gather some details about the data. this is the Load code : Private Sub SalMali_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.DGV_SalMaliTableAdapter.Fill(Me.FDBDataSet.DGV_SalMali) End Sub which...

Why does this composite control not render its child controls?

c#,asp.net,.net,visual-studio-2010
IDE: Visual Studio 2010 Framework: .net 3.5 WebServer: Visual Studio Dev Server I'm trying to get a grasp of custom controls and composite controls. The code below has been produced more or less directly from examples I've found in various tutorials. I have registered the control on my page and...

Compiling Fortran using Ifort for Linux under Windows

linux,windows,visual-studio-2010,fortran,intel-fortran
I develop an run some Fortran Code under Windows (7, 64bit) using Visual Stuido 2010 and ifort. The Code, mostly compiled to DLL, is tested in Windows and is deployd approx. 25% of the time to Windows (2000 up to 7) and 75% to Suse Linux. While the Windows solution...

Loop through several objects in VB [duplicate]

vb.net,visual-studio-2010
This question already has an answer here: Access several controls with a for in visual basic 2 answers I want to check for something though several comboboxes, and I thought about looping though them because their names are as follows: ComboBox1 ComboBox2 ComboBox3 ComboBox4 ... ComboBoxn What I'd like...

What to look for when parallelized code runs faster in Visual Studio automated tests?

c#,multithreading,visual-studio-2010,visual-studio,garbage-collection
We have a C# (.NET 4.0 framework) project with Parallel.For loops that runs plenty fast in an automated test inside Visual Studio, but the same parallelized code doesn't run as expected in a standalone application, and we're trying to figure out why. The code is high-memory usage, but our workstations...

How to move multiple picture boxes when clicked VB.Net?

vb.net,visual-studio-2010
I will have 30 different picture boxes on a form, and I am using the arrow keys on the keyboard to move these. However I don't know how to move multiple picture boxes using the code I have. Ideally I would like to move one at a time when clicked...

knockoutjs function is not invoke when button clicked

visual-studio-2010,knockout.js
i have one knockout view model function which is not invoke when clicking the button. probably i am missing something. i am running the code from VS2010 IDE. i test the same code in jsfiddle and it is working there but when i try to run the same code from...

I need to add a delay between displaying labels in VB but i seem to be having trouble

vb.net,multithreading,visual-studio-2010
i am creating a simple application for 'fun' where when the user opens the application, it pretents to connect to a device and shut it down. I want it to slowly display the labels like Connecting to device... (wait like 10 seconds) Exploiting registry... (wait like 10 seconds) and so...

How do I create a new txt file every time I click on this button?

vb.net,visual-studio-2010,visual-studio-2012
Private Sub cmdsummary_Click(sender As Object, e As EventArgs) Handles cmdsummary.Click Dim writer As New System.IO.StreamWriter("C:\Users\salman\Desktop\Text.txt") writer.WriteLine(Me.customer.Text + Me.txtcustomer.Text) writer.WriteLine(Me.todaystotal.Text + Me.txtsummarytotal.Text) writer.WriteLine(Me.average.Text + Me.txtaveragetotal.Text) writer.Close() End Sub Every time I click on cmdsummary it edits the notepad file (txt) and updates it but I want to create a new txt...

(403) Forbidden when calling console app that generates file

c#,asp.net,visual-studio-2010
We have a simple console app that generates a TXT file and sends it as an email to a list of users. This console app is in the Remote Server on drive E. The console app works; if I go to the Remote Server and I run it from a...

Display scrollbars with reportviewer and asp.net webform?

c#,asp.net,visual-studio-2010,.net-4.0,reportviewer
I will be displaying 4 reports in one webform, so I would like to create a section of about 500x500px for each report and use the horizontal/vertical scrollbars to navigate each report. I've tried wrapping the reportviewer in a div, iframe, panel, tablecell, but none of them can contain the...

Simple explanation about loading files into memory

vb.net,visual-studio-2010,memory-management
What does it mean to "load into memory"? I watched some videos online where they were talking about reducing processing reports times, and they constantly say "you don't want to load a huge file into memory, instead read line by line." Can I have an example of what loading a...

VB - Had a function working, doesn't anymore

vb.net,visual-studio-2010,visual-studio-2013
EDIT: Ok, it's because I'm using 2.0 Framework. Any ideas how I can modify that area or alternatives? I have to, unfortunately, stick with 2.0 Dim dir2 As New DirectoryInfo("d:\input") Dim sw2 As New StreamWriter("d:\input\reportCond.txt") For Each fi2 As FileInfo In dir2.GetFiles("report.txt") Dim sr2 As New StreamReader(fi2.FullName) While Not sr2.EndOfStream...

Limiting input characters and focusing to the next input box - VB.Net

vb.net,visual-studio-2010,setfocus
I have 6 textboxes that I want to use for password validation. How can I: limit the number of characters the user can enter into each password field to X-characters; and ensure that text that are being entered into each field automatically flow into the next input field? Thank you....

how to create sub task in Visual Studio Online API

visual-studio-2010,visual-studio-online,vso-rest-api
I'm trying to create a sub-task of a User Story, in Visual Studio Online, from my Mob App. How can I make it the right way? Whether I should use query or is there any direct endpoint for adding a subtask...?

Trying to fire onclick event asp:ImageButton [closed]

asp.net,visual-studio-2010,internet-explorer
My asp:ImageButton doest not fire onclick event on IE, but is working normally on chrome or firefox. Don't know if my code is right, but is here: <asp:ImageButton ID="SaveBtn" runat="server" OnClick="Save_Click" ToolTip="Save" ImageUrl="images/save.png" /> Using .NET Framework 3.5 Note: IE10...

PyGame Menu Formatting

python,visual-studio-2010,pygame
So I've been recently working on programming a game in Python as well as an external library called PyGame. If anyone is familiar with the game Hearthstone, that is sort of the feel I'm going for. However, that is besides the point. I have already researched how to display images...

How to include NodeCallback and MatrixTransform Library in visual studio?

c++,visual-studio-2010,openscenegraph
I am using microsoft Visual Studio 2010, I receive an error when I include NodeCallback or MatrixTransform. include <osg/NodeCallback> include <osg/MatrixTransform> the above two library are underlined with red which indicatesthat it has an error. the following is the output from the visual studio when I build the file: animationcallback.h(2):...

Open File with Non ASCII Characters

c++,visual-studio-2010,unicode
I am trying to compute SHA-256 of file. I have the following code that gives correct value of Checksum when the path is valid ie. It is ASCII. I have the following code: #include <openssl\evp.h> #include <sys\stat.h> #include <iostream> #include <string> #include <fstream> #include <cstdio> const int MAX_BUFFER_SIZE = 1024;...

Unable to install MVC 3

asp.net-mvc,visual-studio-2010,asp.net-mvc-3,installation
I am attempting to install asp.net MVC 3 to use with Visual Web Developer 2010 Express. I try to install from AspNetMVC3ToolsUpdateSetup.exe. The install log shows this: MSI (s) (08:E4) [00:22:35:745]: Product: Microsoft ASP.NET MVC 3 -- A later version of Microsoft ASP.NET MVC 3 is already installed. Setup will...

Error while calling Select() in UDP sockets

winforms,visual-studio-2010,sockets,select,visual-c++
I am doing socket programming (UDP sockets) in Windows Form application. I want to use select(). socket() is called on button click, select() is called in different thread and socket descriptor is declared global. Below is my part of code regarding select: fd_set fds; struct timeval tv; tv.tv_sec = 1;...

F# “The value of constructor … not defined”

visual-studio-2010,f#
So, this is my second F# console application. The code goes like this: let rec fact n = if n = 1 then 1.0 else float(n)*fact(n-1);; let rec pow x n = if n = 1 then x else float(x) * pow x (n-1);; let rec func1 eps x n...

Dose VS2010 pre-calculate preprocessor defined by #define?

c++,visual-studio-2010,macros,preprocessor
For Visual Studio 2010, if I define #define PI 4.0f*atan(1.0f) when PI is used somewhere later in the code, does the value needs to be calculate again or simply 3.1415926... being plugged in? Thanks. EDIT: Because I heard someone says the compiler might optimize to replace it with 3.1415926.., depending...

is there a difference between running an executable and debugging it in Visual Studio?

c++,visual-studio-2010,winapi,runtime-error,visual-studio-debugging
I'm writing a piece of code in Windows which uses both winapi messagebox and some dynamic memory for RS232 application I saw a strange situation when the same application creates different error when I run it in debugging mode (using VS2010 and step-in debugging) and running it as an executable...

Enforcing coding styles in Visual Studio and VIM

c++,visual-studio-2010,visual-studio,vim,coding-style
I work with a medium sized team of developers, with half being Linux developers using VIM on Ubuntu and MacVIM on OSX, and the other half being Windows developers using Visual Studio 2010 or later. A fair bit of time has been wasted in the past when handling things like...

Converting number to character

c#,visual-studio-2010
the following code converts characters A-Z to a number between 1 and 26, all are upper case for simplicity. static void Main(string[] args) { string letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; foreach (char c in letters) { Console.WriteLine(c +" = " + CharToNumber(c)); Console.ReadLine(); } } static int CharToNumber(char character) { // index...

same struct different files

c,visual-studio-2010,struct
I've got a little problem. I have 2 files: one.c and two.c they both decler and implement the struct: StackNode the header files are: one.h: #ifndef ONE_H #define ONE_H typedef struct StackNode StackNode; #endif two.h: #ifndef TWO_H #define TWO_H #include "one.h" #endif cpp files: one.c: #include <stdio.h> #include <malloc.h> #include...

PCAP program error when compiling

c++,c,visual-studio-2010,pcap,winpcap
It is a program to get the source and destination address from the network adapter .When trying to compile the following program,I am been left with errors. Does Any one have an idea on these errors.Thanks #include <stdio.h> #include <conio.h> #include "packet32.h" #include <ntddndis.h> #include <stdint.h> #include <cstdint> #define PCAP_DONT_INCLUDE_PCAP_BPF_H...

Can't Install Visual Studio 2010 on Windows 10

visual-studio-2010,windows-10
When I run the VS2010 installer, nothing opens. I checked my running processes and I do not see anything new in there either. I have tried running it in compatibility mode for 8, 8.1, and 7. I have also tried running it as an administrator. Same problem. Opening the setup...

Include an external solution in premake

visual-studio-2010,premake
I am trying to write a top level premake4 script to build a project that has multiple external dependencies. The external builds include things like Java and CMake that (as far as I can tell) premake does not understand. The script does generate an MS Visual Studio 2010 solution. Is...

Assign a tag to a button and retrieve it

c#,visual-studio-2010
I have some buttons built at run-time, and I want to assign a tag for each of the buttons. I do it so private void CreateCategory(DataTable dt) { int top = 0; int left = 0; string color = ""; foreach (DataRow row in dt.Rows) { // MessageBox.Show(row["Denumire"].ToString()); // List<Button>...

How to integrate two different website projects under one solution?

c#,asp.net,visual-studio-2010,visual-studio,projects-and-solutions
I am using VS 2010 and trying to integrate my two different website projects. I am able to add both of them under a single solution. By default the start up projects is the already present project. But I am not able to redirect the web pages of project...

Drag and drop an image into a RichTextBox

vb.net,image,visual-studio-2010,drag-and-drop,windows-explorer
I am updating code done in VB 4, where I have a RichTextBox. I need to be able to drag-and-drop an image from Windows Explorer into the RTB. Unfortunately, I am unable to get the drag-and-drop to work. I've created a much more simple Windows Form program to try to...