Questions tagged as 'c#'

3
answers

Get the value of the ID in a ComboBox

Good day of your support with this topic, I am creating a Windows Forms in which I have a ComboBox I load from a table in SQL this table only has 2 records so far and I want to get the ID of the item selected to then store it i...
asked by 17.11.2017 / 18:10
1
answer

Access files in VS - C #

Colleagues, I have the following problem: I need to access files of different types (images, pdfs) that are within the solution of my project. I tried to use Server.MapPath but it throws an exception, which mentions that HttpContext.Cu...
asked by 15.11.2017 / 16:36
1
answer

Problem debugging a thread when there are several assets Visual Studio 2015

I have a program that reaches a point and launches a task where a series of actions are executed, while those actions I am in a loop checking until that task ends or a certain date is reached. What I want is to purge only what happens in that ta...
asked by 19.07.2017 / 17:12
1
answer

How to put in resize mode a PictureBox created dynamically in C #?

Good morning. I am creating an application in C # under VisualStudio 2013. In it when the user clicks on an option in the context menu of the right mouse button on a Panel, I add a PictureBox to the Panel. So far everything is perfect b...
asked by 31.07.2017 / 19:46
2
answers

Fill combobox with database, but start with white

I have a combobox that I filled with this database query: select ' ' as usr_entrada, null as no_servicio union select usr_entrada, No_Servicio from Telemarketing where Id_Sucursal='cordoba' The idea of the union is to add a blank row to th...
asked by 31.07.2017 / 16:58
4
answers

Why can not I access the methods of a class library?

The practice program that I am doing consists of creating an English deck and writing the cards in console (The King of Hearts -for example-), but they do not come out in order, but at random. I have a class library with 2 classes and 2 enum to...
asked by 29.06.2017 / 21:07
1
answer

How to rotate an object to the sides without turning or turning 360 degrees?

My problem is that I need an object, if it is my character's arm, the problem is that this as my code, I think it is very broad and I want to place restrictions on it as it does not have a 360 degree turning capacity or that only stay in the fro...
asked by 04.08.2017 / 15:28
2
answers

How do I avoid too many open connections?

My Dilemma is that I have a method of type MySqlDataReader that executes a query that sent it by parameter and returns the data ... To read this data I must create a Variable of the same type from where the Method is called, until then Well, it...
asked by 26.05.2017 / 17:55
1
answer

Differences between SetCursorPosition and CursorTop, CursorLeft in C #

I have a question with the following example, I do not understand what exactly CursorTop and CursorLeft do not do SetCursorPosition . using System; class Sample { protected static int origRow; protected static int...
asked by 25.07.2017 / 01:51
1
answer

I have a problem inserting a datatable in a sql table (Merge)

My problem is that I want to empty a datatable in a temporary folder of sql, my code already arrives at the moment of executing my stored procedure that executes the insertion of the datatable. Insertion Code in c # try { co...
asked by 22.03.2017 / 17:46