1,381 Topics
I have two listboxes titled lstResult and lstResult2. lstResult clears with no problem using lstResult.Items.Clear() but when i use that for lstResult2 it dissapears but when i put in another value, the value(s) that i deleted come back. Also how do i fix the total to reflect the changes. Thank …
Hello guys, I hope you are all well! I am creating a game in Visual Studio using picture box's, but I cannot for the life of me figure out how I can have a nice picture in the background, as when I do put one in there it is constantly …
Hello there, I've been having a hard time lately with implementing the drag and drop functionality outside the windows forms. I have no problem doing drag and drop within and between windows forms and from the desktop to the windows form. I have created an application where you can drag …
I have 2 forms, I want 'form2' to open when I click a button on 'form1'. Any ideas?
This short C# code will calculate the fibonacci number of an integer and display the result in a Windows GUI label.
Hey i have created a few voice controlled codes...e.g one for opening and interacting with wikipedia..other for opening webtv...etc...and the third that gets rss feeds from various website....all this work on voice ...i used speech API for that..now i want create an interface that works like this 1. A MAIN …
I am working on a C# Windows Form project and I need to access the controls on a form from a separate class within the project. can anyone help me with this?
Hey again ...:P Now i have problem with save & load from/to text file. [CODE]private: System::Void zaĆadujPlaylisteToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { OpenFileDialog^ dig = gcnew OpenFileDialog(); dig->Filter = "PlayList(*.PLS)|*.PLS"; if(dig->ShowDialog() == System::Windows::Forms::DialogResult::OK) { listBox1->Items->Add(IO::File::ReadAllText(dig->FileName)); } } private: System::Void zapiszPlaylisteToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { SaveFileDialog^ dig = gcnew SaveFileDialog(); dig->Filter = …
i have a datagridview in that i have two combo box columns, i want to make one of the combo box to be a text box as well as a combox but the other combo box i want to leave it as it is? how can i do this??? i …
I'm trying to make a program to download a file from the internet. it compiles fine. but when i press the button to start the download comes up with this [QUOTE]An exception occurred during a WebClient request.[/QUOTE] heres the source code to it [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using …
Hi everyone...just going from console apps to windows forms apps....This is extremely basic and is annoying me now... [CODE] public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { MessageBox.Show("{0}",hello2(2)); } public int hello2(int hello) { hello = 10 / 5; …
Dear Friend, I have one Window From it will open on clicking on ToolStrip button, UserControl1.cs contain ToolStrip (ToolStrip used as IE ToolBar). Form contain One TextBox and One close Button, I need to open a Form on every new IE window open and keep that Form on IE Only …
Hey All. I'm needing a fully transparent label to rest over a picture field that gets resized from calculations. The picture field is simple a background image in a PictureBox that represents a percentage of a whole. The label stores the actual percentage text. Here's the issues I've come across: …
Hi, I'm pretty new to c# and I have developed a Windows Form application that has a bunch of checkboxes. when the user clicks on them they hide() and once the game is over they reappear using show() but i cannot find a way to uncheck them once they reappear. …
Hello! I am new to programming and c# and im trying to create a application that will guide you through a school with pictures. So you would be able to press forward, backward, left and right and it will lead you to a new picture. What I dont understand is …
Hello I need to stretch a bitmap image, i currently have a BMP file displaying in the form but it is only a few pixels big, i need to stretch the image to fit the form. this is my current code [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using …
First of all, sorry for my bad english, that doesn't make any sence at all. So, please correct me. I made a programm to use SendKeys, but I want a delay between the word. I was able to split the string in words, but I wasn't be able to send …
Hi, I have a form with tab control in it and in on of the tabs I got a datagrid. On runtime, whenever I try to display data on the datagrid from a database, the datagrid "jumps" from the tab to the form itself so the tab hides most of …
hi I have been trying to draw a grid to a picture box. I have the grid drawn on the windows form itself but when I try to draw to the picture box it doesn`t work. instead the grid draws around the area of the picturebox rather than within the …
Hello, I am trying to develop a program that will not show untill a boolian is set to [ICODE]false[/ICODE], but I am having trouble making the code work. Here is the code I am using to start the program; [CODE]#include "stdafx.h" #include "Form1.h" using namespace Program; [STAThreadAttribute] int main(array<System::String ^> …
Hi, i am new to c# and i am trying to develop a form to display the calander which works fine. I am trying to make it so that when the user selects any date from my MonthCalander control, it is then displayed in a messasge box. The trouble i'm …
I'd like to control menus on a apps created by myself. Apps A.exe: Windows Form apps (C#) It has menus Menu1-MenuItem1(MenuItem of Menu1) MenuItem1 calls a EventHandler that shows a message box Apps B.exe: Windows Form apps (C#) It has a button If I click the button, I'd like to …
When i drag and drop a file into my form it should give: textBox1.text = the file name (i dont have it, i need it can you help me get it) textBox2.text = file location (already know how to acquire it from a drag/drop) I want the actual file name, …
Hi there How can i get the checkbox's value from sql server 2005 and display it in my windows application? The checkbox column in my database either has two values, checked or unchecked. Now what I want to do is I have a form where I can view data. That …
This may seems noobish but 3 questions I absolutely cannot figure out. I'm not sure how relevant it is but I'm using Microsoft Visual C# 2010 Express. 1) How do I have a button, within a form, load another form within the same program. 2) How do you do the …
Hello guys. I have 2 Windows Forms. Let's say, the first form is like a intro ... ( you know, when you enter in C#, a green window appears for some seconds ). Ok, i use a timer, and after 10 seconds from starting the application, i try to close …
I've searched around, and I'm not finding a solution to this one so I figured I'd ask you bright people: Trying to pull form size information out of a database and pass it to a form upon instance. The relevant code in the parent form is: [code] childForm.Size = (string)row["size"]; …
[code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Diagnostics; using System.Xml; namespace Shortcuts { public partial class Form1 : Form { public Form1() { InitializeComponent(); } public string FileLocationToRun; private void button1_Click(object sender, EventArgs e) { OpenFileDialog fdlg = new …
I have a parent form (Form1) that holds four childForms (childForm1, childForm2, childForm3, childForm4). The childForms can get pretty big, and I'd like the user to be able to use the scrollwheel on their mouse to zoom the screen in and out so that they can get a 'big picture' …
Hi everyone, I'm trying to understand how things work, more than simply solving a task. So before I post any code, here is an overview of the question. Maybe someone has some thoughts as to the ways to accomplish this. I understand the basics of a datagridview and it works …
How do i add a row to a data source (datagridview)? dataGridView1.Rows.Add(textBox2.Text, textBox1.Text); that gives me an error saying: Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound. my datasource: [code] XmlDataDocument xmlDatadoc = new XmlDataDocument(); xmlDatadoc.DataSet.ReadXml("Filepath"); DataSet ds = new DataSet("Books DataSet"); ds …
I am designing an instant messanger and I am using tabs to allow for multiple chats to be taking place in the same windows form. When a new chat is opened, a new tab is added, using a User Control to make the new tab contain all of the required …
Hi there I want to know how I can save a checkbox value into sql server 2005? The check box is in my windows forms application... Thanks
i am trying to draw a line between two points like this: [CODE=syntax]private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { Graphics MyGraphics = e.Graphics; Pen NewPen = new Pen(Color.Red,5); MyGraphics.DrawLine(NewPen,StartDraw,EndDraw); }[/CODE] it gives me an error: Object reference not set to an instance of an object. what have i done wrong …
I am trying to save a form location to a database whenever the LocationChanged event is triggered on that form. [code] private void DisplayForm_LocationChanged(object sender, EventArgs e) { DSLocation = this.Location; ((Form1)this.MdiParent).NotifyChanges(this); // notify parent form that there are changes on this child } childForm.Location = StringToPoint((string)row["location"]); [/code] DSLocation is …
I want to set my textbox to be able to only accept numeric values as well as a '.', I typed this code in [CODE] private void ipAddTextBox_KeyPress(object sender, KeyPressEventArgs e) { int isNum = 0; if (e.KeyChar == ".") e.Handled = false; else if (!int.TryParse(e.KeyChar.ToString(), out isNum)) e.Handled = …
Hi I have written a windows forms application that connects tosql server compact3.5 database. I store my usernames and passwords in the database. If I delete a username in the database via the application it does delete it, but I have to close the application and restart it, otherwise you …
I have a small 'rolodex' program that opens a form for each person in my database at runtime (each person is a row in the db). I have that part working (thanks to some help from the lovely people here!), but I have a new problem. I am no longer …
Hello, I have a very strange issue and am not sure why it is happening or how to prevent it. Envionment: .NET Framework 3.5 WinForm application C# VS2008 Pro Issue: I have a WinForm containing a TabControl which has a custom usercontrol on two of its TabPage. The usercontrol i …
Hi Friends..... I want to add the new control like button to the C# Windows form title bar control box as u can see in IDM (Internet Download Manager)...
working on a project for school and can't seem to figure out the for loop for making a polygon in a windows form. We have a set code that we have to follow but the teacher hasn't covered anything for window forms. And I don't understand what is meant by …
Hello everyone I have 2 forms frmEmployee and frmSearch. frmSearch is called from frmEmployee i m not hiding frmEmployee. when i get the focus back of frmEmployee, it seems that textboxes are getting the values from frmSetup but not displaying. Following is the code on frmEmployee [CODE] private void btnBrowse_Click(object …
Hi there, I am using some windows form controls available in the Infragistics Windows Form Controls. Everything works OK on my PC but when I save my project and try to run my form on another PC it doesn't work. I get a lot of missing references if I try …
Hi! I'm working on an application that only sits in the notification area and keeps track of time. At certain intervals, it will notify the user. It also has a form, with which the user can configure and see the time etc. When the form is closed with the little …
Hi I'm totally new and this is my first post. If i do any wrong pls forgive me :D My problem is: First i made form2 in form1: Form2 form2 = new Form2(); form2.show(); After that i have a checkboxlist in form2. Now i want to get which i check …
(MOUSE CURSOR) Hello I'm wondering is it possible to set a condition if the mouse cursor's position changes or moves to a certain point , then it will execute a code like drag drop. Doing it on a windows form application
I am trying to make a macro engine for a personal project, and it would work fine, except that the form won't show when I debug it. Take it for granted that I am using the LuaInterface DLL please. Code: [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; …
Hi all! I'm creating a program that opens a small form for each row in a database (each form is an instance of Notebox). The user can create a new Notebox by clicking on a button (noteboxSibling) at the bottom of each existing Notebox. All Noteboxes exist inside Form1 which …
Hi, how can I read value of dynamic MaskedTextBox created in GroupBox? [CODE] private void add_groupbox(int x, int y, int id) { GroupBox gb1 = new GroupBox(); MaskedTextBox mtb1 = new MaskedTextBox(); MaskedTextBox mtb2 = new MaskedTextBox(); MaskedTextBox mtb3 = new MaskedTextBox(); mtb1.Location = new Point(46, 18); mtb1.Size = new …
i am currently work on mp3 player application, but every time the song ended, this error always pops out.. Value of '282' is not valid for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'. Parameter name: Value here's my code: [CODE] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using …
The End.