Search the Community
Showing results for tags 'visual studio'.
-
i want to use the entire area of the datagrid rather than the corner area as shown in the image and i want to remove the circled area shown in the image
-
so i want to update a record in the database on button click. i have tried the code below but it didnt work. the error i get is:Unrecognized escape sequence. the sq part in the connection string is highlighted in red as shown in the image i have uploaded. private void button7_Click(object sender, EventArgs e) { try{ SqlConnection cn = new SqlConnection("Data Source=Dell-PC\SQLEXPRESS;Initial Catalog=employee_db;Integrated Security=True"); cn.Open(); SqlCommand cmd = new SqlCommand("UPDATE Posts SET description=@des WHERE id =@npid"); cmd.Parameters.AddWithValue("@des",textBox1.Text); cmd.ExecuteNonQuery(); cn.Close(); } catch(Exception ex) { MessageBox.Show(ex.Message); } }
- 1 reply
-
- sql server
- microsoft
-
(and 1 more)
Tagged with:
-
i want to pass the value typed in textbox of page 1 to a variable in page 2 for some calculation how can this be done? i have tried the code below but it gives me an error saying i cant access that textbox because of its protection levels.i went to change its access modifier from its properties but an option like that was not available. //me trying to access textbox1 of aspx page 1 from page 2 Form f1 = new Form1(); String x = f1.TextBox1;
- 1 reply
-
- visual studio
- programming
-
(and 2 more)
Tagged with:
-
Hi, I want to start programming and making computer programmes, is there any tips or suggestions for a first time programmer like me who has never even programmed in their entire life.
- 16 replies
-
- programming
- microsoft
-
(and 2 more)
Tagged with:
-
I have been trying to display text from a file into the console in C++, but the I'm getting the following errors: (These are the header files that I used: #include "stdafx.h" #include <iostream> #include <math.h> #include <cstring> #include <cstdlib> #include <process.h> #include <fstream>)
- 3 replies
-
- programming
- pc
-
(and 4 more)
Tagged with:
-
I have a problem with my C# Windows Form Application. When i click on a checkbox to turn its state to true it calls a Public void in another class (Class2.callFunction) This Class2.callFunction has code that gets enabled but it freezes my whole application. When i test what the code does outside of the application it works but i want to be able to use the Form still without it been frozen. CheckBox: private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked == true) { Class2 class2 = new Class2(); class2.callFunction(); } } Function Called: public void callFunction() { CODE HERE I CAN NOT SHOW! } The code works but in the call function which is in a class of its own freezes the application when its put into use.
- 7 replies
-
- cs
- programming
-
(and 2 more)
Tagged with:
-
Hi! I'm looking for a thin&light with a solid state drive that doesn't cost a fortune. I want to basically be able to use MS office, youtube, gmail, and Visual Studio(which is the big kicker) with ZERO hitches. Right now, I'm using a 15.6" lenovo Y50-70, and it's just too big and heavy for my personal tastes. I have a HUGE beautiful rig at home, and don't game in class so there's no point in carrying around the extra weight. I'm looking for a good deal on a 13" ish laptop (open to others) that is light. An SSD is a pretty big deal for me, or at least the ability to add one. I've looked and I'm just so stuck on the XPS 13 It's hard to look any cheaper without getting sad. HELP ME! Thanks.
-
Im trying to input the following data to my SQL server DB using C# but i get this exception thrown saying: Named Pipes Provider, error 40 - Could not open a connection to' SQL Server'. i did a google search on this and they recommend checking the connection string or restarting sql server service. i know my sql server db is communicating fine with my visual studio as i have a login form before this one and i use the DB for comparing data. so i did not go to restart the sql server service. i have check my connection string and it is correct. i have gone through every single word in the code below but i have failed to spot any mistakes. can u find anything wrong? private void button1_Click(object sender, EventArgs e) { try { int n = 1; string name = "sk"; string pt = "test"; SqlConnection cn = new SqlConnection("Data Source = HP - Q6RS5H5; Initial Catalog = proj; Integrated Security = True"); cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p", n); cmd.Parameters.AddWithValue("@nam", name); cmd.Parameters.AddWithValue("@pat", pt); cmd.CommandText = "INSERT INTO Image(ID, Name, path) VALUES (@p, @nam, @pat)"; cn.Open(); cmd.ExecuteNonQuery(); cn.Close(); } catch(Exception ex) { string x = ex.ToString(); MessageBox.Show(x); }
- 38 replies
-
Hi. I spend quite some time in Visual Studio 2017 with Resharper installed. I have a feeling that VS is not so multi-core optimized. Does anyone know if VS would work better on 10 or 12 or 16 cores compared to 8 or 6 or 4 cores? I mean not only compiling but IDE itself, including XAML designer and plugins. 7700K still rules in the world of single-threaded performance, even compared to 1800X. Which cpu is best suited for work in VS? Assuming I already have a fast SSD and RAM? Thanks!
- 5 replies
-
- cpu
- visual studio
-
(and 2 more)
Tagged with:
-
so i want to generate a image from a video automatically from a video file path stored in the database.how can this be done using C#?
- 1 reply
-
- visual studio
- sql server
-
(and 2 more)
Tagged with:
-
programming Is it possible to add videos to a datagridview in C#?
Shammikit posted a topic in Programming
is it possible to add the vlc plugin or the windows media player plugin to a datagrid view and make it play a video from there?-
- visual studio
- vlc plugin
-
(and 1 more)
Tagged with:
-
so i have a datagridview that takes data from database and displays it.i have only two columns but for some reason the datagridview is generating extra columns.i have attached a image which shows it. i want to stop it from making those extra columns and display only the two which has data. how can i dot this?
- 8 replies
-
- microsoft
- visual studio
-
(and 2 more)
Tagged with:
-
this is what i want to achieve, i have one form that has two textboxes and on button click i want to move any text in these textboxes to two textboxes in another form. i have decided to use a class to get the data from the first form and i have been successful in doing that but i dont know how to transfer these values to the texboxes in the second form from the class. i have tried the code below but it has not worked. ------------------------------------form 1------------------------------------------ private void button1_Click(object sender, EventArgs e) { string tb1 = textBox1.Text; string tb2 = textBox2.Text; class1 c1 = new class1(); c1.edit(tb1,tb2); this.Hide(); form2 f2 = new form2(); f2.Show(); } ------------------------------------------------------------------------------------- -----------------------------class1------------------------------------------------- class class1 { string p1; string p2; public string edit(string tb1, string tb2) { p1 = tb1; p2 = tb2; return tb1; return tb2; } public void setupdate(string f) { p1 = f; } public string getupdate() { return p1; } public void setvalue(string g) { p2 = g; } public string getvalue() { return p2; } public void call() { string t1 = p1; string t2 = p2; form2 f2 = new form2(); f2.textBox1.Text = t1; f2.textBox1.Text = t2; } } -----------------------------------------------form2----------------------------------------- private void form2_Load(object sender, EventArgs e) { class1 c1 = new class1(); c1.call(); } --------------------------------------------------------------------------------------------
- 2 replies
-
- visual studio
- classes
-
(and 1 more)
Tagged with:
-
without dragging and dropping to the form from the toolbox is it possible to add the VLC Active X plugin using code?
-
#include "stdafx.h" #include <iostream> #include <string> using namespace std; class PARROT { public: void setName(string a) { a = text; } string getName( ) { return text; } private: string text; }; int main() { PARROT b; b.setName("Its fascinating!"); b.getName(); getchar(); return 0; } Here is what it is showing after building solution.
- 6 replies
-
- c++
- programming
-
(and 3 more)
Tagged with:
-
I need a laptop for college and it needs to run visual studio but I'm on a tight budget, can you help me by answering this question?
- 2 replies
-
- i3
- visual studio
-
(and 1 more)
Tagged with:
-
so when i tried to install visual studio community 2015 it requires me to install the update thats shown in the screenshot i have attached.so i searched it online and i found it on MS website but there are multiple versions of updates. the one that was in the error was also there but it says its for windows 8.1 in the file name. will it work for the server as well? this is the link: https://www.microsoft.com/en-us/download/details.aspx?id=42334
-
programming How to hide the blinking cursor(caret) in C# textbox
Shammikit posted a topic in Programming
so i did a search on this and almost all of them lead to the code shown below and everyone seem to have got it to work, except for me. i dont get any errors on run time. i have tried every option in the gui settings as well but still no good. i also have another question.should i download this user32.dll file and import it to the project or after typing it like shown below does it automatically come from a library file in visual studio? could you please suggest why the code below doesnt work.thanks using System.Runtime.InteropServices; public partial class Form1 : Form { [DllImport("user32.dll")] static extern bool HideCaret(System.IntPtr hWnd); public void HideCaret() { HideCaret(textBox1.Handle); } } -
I'm a student working on a software project but I'm stuck on getting user input, saving it to a location (preferably to the cloud) and saving that data locally so they don't have to do it again. I wanted to do a pop-up registration page on the first launch but I don't know how. The user should be able to fill in their own subjects, teachers, avatar etc. I had a look at data binding in XAML and it partially worked, I couldn't get it to save after the user hit enter; it was just binding a textbox to a textblock (updating instantly).
- 2 replies
-
- csharp
- visual studio
-
(and 2 more)
Tagged with:
-
hello, im a student and i want to know if these two software will work together without any issue when im working on my C# programs. im coming from visual studio 2012 and in that i faced some problems like visual studio being unable to communicate with the DB as sql server was a newer version.will i face such issues here?
- 1 reply
-
- visual studio
- sql server
-
(and 2 more)
Tagged with:
-
programming How to close and open forms using a class in C#?
Shammikit posted a topic in Programming
I have tried the code below and i know the value 1 is passing from my class to the form as im able to view the passed value from a message box from the form. however when i try to close the form using 'this.close' command it doesnt work. any ideas why? -------------------------------class----------------------------------------------- class testclass { public string test(string a) { int n = 1; Form1 f1 = new Form1(); f1.pageclose(n); } } ----------------------------------------------------------------------------------- ----------------------------------------------form---------------------------------- public int pageclose(int num) { if (num < 2) { this.Close(); string b = num.ToString(); MessageBox.Show(b); } else { } return num; } -
microsoft How to pass a value from a textbox to a class in C#
Shammikit posted a topic in Programming
so i have been trying this for a while now. i want to pass the user input at textbox1 to a class and i have gone through some sites like stack overflow but still couldnt find any solutions.im new to C# programming and i have tried the code shown below but it hasnt worked. --------------------Form1--------------------------------------------------- private void button1_Click(object sender, EventArgs e) { Login_class l1 = new Login_class(); l1.login(); } public string c; public string TextBox1Text { set { c = textBox1.Text; } get{ return textBox1.Text; } } -------------------------------------------------------------------------------- ----------------class----------------------------------------------------------- class Log_class { public void log() { Form1 f1 = new Form1(); string x; MessageBox.Show(f1.textBox1.Text); } } --------------------------------------------------------------------------------- -
Im creating a windows forms application and whenever i try to run my program i get this error: Error 1 Two output file names resolved to the same output path: "obj\x86\Debug\WindowsFormsApplication1.Screen_3.resources" WindowsFormsApplication1 can someone please help me fix it
-
- csharp
- programming
-
(and 1 more)
Tagged with:
-
So, I'm new to programming and I thought I'd start learning C++ in Ubuntu. I'm using the book "Programming Principles and Practice using C++ Second Edition" to get started. I want to use the Visual Studio Code to create my source files, compile them and build an executable program. I managed to create the source file with my code and now I want to compile it and build the executable program to see if it actually works. But how do I do that?!?! Any help will be highly appreciated ps. The book isn't helping on this one since it talks about a previous version of Visual Studio Code.
- 7 replies
-
- c++
- visual studio
-
(and 2 more)
Tagged with:
-
I need help for my project. I just need help with my .txt file it keep repeating the number multiple time, but with the cmd it only repeat it once. Can someone help me how to I make my text file write it once
- 13 replies
-
- c++
- visual studio
-
(and 1 more)
Tagged with: