1,381 Topics

Member Avatar for
Member Avatar for tgreer

Windows Form Application, C#, in VS2010 Express. I get the "Object reference not set to an instance of an object." error with the line of code below, when I attempt to close the Form. [CODE]Int32 myID = Convert.ToInt32(((DataRowView)projectBindingSource.Current).Row.ItemArray[0]);[/CODE] This is a simple form with two data-bound controls. The record has …

Member Avatar for tgreer
0
180
Member Avatar for hurkagurk

Thank you very much for reading this. I've been programming for 15 years (VB, a lot of PHP, etc), but I've never considered myself a 'real' programmer. Mainly I'll build things that I need that are too specialized to be made by anyone else - simple programs and scripts to …

Member Avatar for Kimpl
0
217
Member Avatar for Duane Stockwell

I have been all over the web (and through several books) in an attempt to get an answer to my problem. Briefly, I am trying to get the contents of a string array expressed as the header text for datagridview columns by the calling that array from a listbox. There …

Member Avatar for Duane Stockwell
0
123
Member Avatar for tet3828

I'm looking for some suggestions on how to approach this windows form based application I'm in the very beginning stages of writing. Bare in mind Im still at the Hello World level of C#. How should I populate a listbox with mock names for all jpegs in a folder whlie …

Member Avatar for agrothe
0
146
Member Avatar for arya6000

Hello I posted this in another forum but got no answer so hopefully someone here will be able to help. I'm trying to use a reportviewer in my windows form application and I can't find a way to add items to the reportviewer object. Can someone tell me how this …

Member Avatar for arya6000
0
93
Member Avatar for jlivvers

Hi, I'm looking to find out how to force a refresh on a datagrid in a windows app. On a mainForm the user clicks a button to add a new record. This opens a new window. When the user has entered the data they click save and close which should …

Member Avatar for kvprajapati
0
103
Member Avatar for SoftwareGuy

Hello. I have a little trivial problem in my application. I have a dialog (d1) that inherits from Form. And in Main, if I call [CODE]d1.ShowDialog()[/CODE] ,it works fine. But calling [CODE]d1.Show()[/CODE] opens a bad form with pale labels and textboxes, and when I try to drag that window form …

Member Avatar for SoftwareGuy
0
135
Member Avatar for beginerC#

Hello everyone! I have a form with a datagridview and another form with textboxes. First I load the form with datagridview. This one has a button which open the form with textboxes to be fill. If all textboxes are filled and I clik a button of this form, I want …

Member Avatar for beginerC#
0
105
Member Avatar for ja0

I want to pass some variables from the child form to the parent form. So at the Main form or Parent form I added the variables as a constructor: [CODE] private SampleFunction() { int a, b; //Here is where I want to use the x,y and z from the Second …

Member Avatar for ashishkumar008
0
200
Member Avatar for destruct0

Hi !!! I have two Windows Forms. In First Windows Form i have one Text Box and one Button. In the Second Windows Form i wish to call First Windows Form and get the value of Text Box. Is this is possible? When i create a object of the First …

Member Avatar for ashishkumar008
0
453
Member Avatar for hirenpatel53

hello all i am developing win application into it i am using datagridview with one dynamically created datagridviewcomboboxcolumn the problem is all things working fine but while i change the value of that combo box and click on another cell the value of combocolumn gets cleared dont know whats wron …

Member Avatar for prvnkmr194
0
75
Member Avatar for rcanter

I am trying to get a text value from NameForm and pull it in Welcome as a label value. What I have so far, when the Welcome page comes up, it does not give the value of the text but if you click on the label field, it pops up …

Member Avatar for kumar169
0
194
Member Avatar for Klaurac

Hey Say I have a login and the main form. If the login window is closed then the other form shouldn't load. I tried using a if condition to suppress initializeComponent but it still shows the main form, but empty. How would you do that?

Member Avatar for Momerath
0
129
Member Avatar for ja0

Hi, I want to clear the content of the DataTable Main, after an error as ocurred. The problem is that I want to try to load the data again [B]without[/B] closing the program. The problem is that for the 2nd time loading, it just do not show up the data …

0
67
Member Avatar for ja0

Hi, Maybe this is a simple question... I want to open a 2nd form using a load click button. I already did it: [CODE]private void loadbtt_Click(object sender, EventArgs e) { ScndForm.Show(); ScndForm.Update(); // Rest of the instructions for load button }[/CODE] The problem is that it is only showing the …

Member Avatar for ja0
0
80
Member Avatar for destruct0

Hi !!! I have problem with Refreshing or Redrawing my Window Form. I have one Rich Text Box on my Form and i have a list of title of books on it. I wish when I add a new title book to Rich Text Box to Refresh/Redraw the all Windows …

Member Avatar for hassan12345
0
3K
Member Avatar for Mahsa_C++

Hi dear all ! I am programming a windows form application using C++.net(CLR). In my program I am to draw a flow chart or such shapes with undetermined length, so I must scroll the form to enable user to see all parts of the shape. I enabled AutoScroll method of …

Member Avatar for Mahsa_C++
0
566
Member Avatar for whitetigerclaws

I have the same assignment someone else ask help with. The assignment calls for a test score calculator that calculates and displays the score total, score count, and average score. If the user clicks the Display scores button, the application sorts the scores and displays them in a message box. …

Member Avatar for sean_king
0
357
Member Avatar for destruct0

Hi !!! I have two Windows Forms. First Windows Form contain one Panel Control. This Panel Control contain other 5 child Label Controls. I wish from Second Windows Form get the number of child controls in Panel Control in First Windows Form and there Location? [CODE] // First Windows Form …

Member Avatar for destruct0
0
1K
Member Avatar for deepak_1706

In my Forms application i tried to resize a pictureBox control during runtime and it seems to give some trouble. There is scale factor scalex , scaley which i applied to the width and height property of the control. [CODE] tempw = 980.0f; temph = 130.0f; tempw = float.Parse(pictureBox1.Width.ToString()); temph …

Member Avatar for deepak_1706
0
152
Member Avatar for emongev

I have a question about a C# windows forms application.... Im aware of the mouseEnter event and the Click events, but i cant seem to combine them, maybe i could get some insight on this problem =) What i want is to be able to have a matrix of components …

Member Avatar for hyperion
0
142
Member Avatar for Steve_Jones

I have a program that displays a website using system.windows.forms.webbrowser. It runs off files located on the computer, just html files that are not on the web. All i would need to do is link to the index page and then you can access everything. The purpose of it is …

Member Avatar for Steve_Jones
0
114
Member Avatar for Rhuntsman21

This may be a simple question and it may be a complex question. I am not sure. Lets assume I have a windows form app that has three different areas: Area 1, Area 2. If there a way to tell the program when I am assigning tabbing order that I …

Member Avatar for nick.crane
0
114
Member Avatar for destruct0

Hi ! I have one Windows Form. On it i put 4 labels and every label it have Click event. I need to understand who of labels is Clicked ? Example: [CODE]label1.Click += new EventHandler(label_Click); label2.Click += new EventHandler(label_Click); label3.Click += new EventHandler(label_Click); label4.Click += new EventHandler(label_Click); private void label_Click(object …

Member Avatar for destruct0
0
123
Member Avatar for vinayak.v

Good morning everybody... the following code works well in .aspx page that is in web application.. now the same thing i want to do in windows form application.. can anybody help me.. The code is for without saving the pdf file take a print.. it works well in .aspx page …

Member Avatar for kvprajapati
0
189
Member Avatar for htetnaing

Hi everyone, I am thinking of doing something like this but I am not sure it can be done or not. Normally, if i write a program (Windows Form) I drag and drop what button and textboxes are necessary on the form then do necessary procedures and actions. What I …

Member Avatar for htetnaing
0
169
Member Avatar for zyaday

Hi everyone, I'm trying to write this code. Whenever a user types a letter that matches what is already displayed, it should clean up the list box..the problem here is it is not detecting the keyDown event. What is wrong? Thanks for the help. [CODE]namespace TypingGame { public partial class …

Member Avatar for Momerath
0
129
Member Avatar for RayvenHawk

I'm creating a compression program for one of my classes and I'm getting stumped on one aspect of it which is more cosmetic than anything but I'm going for gold here I suppose. Anyway I have a windows form that has a textbox with a button that executes FolderBrowserDiaglog (which …

Member Avatar for RayvenHawk
0
267
Member Avatar for hirenpatel53

hello all i am developing windows application and in a form i have 2 panel one with datagridview1 named dg1 and second with datagrideview2 named dg2 and dg1 is databound so while i click on any cell of dg1 that row will transfer to gd2 and get removed from dg1 …

0
58
Member Avatar for poorchap
Member Avatar for ecoloney

Friends, My main form is located toward the right side of my screen so as not to cover up other open programs. I wish to locate MessageBoxes in relation to my main form (typically centered over my main form) instead of a relation to the screen. How do I do …

Member Avatar for Nemo_NIIT
0
110
Member Avatar for discovery-power

Hi All, Hope everyone is well, it has been a while since I last posted. I am creating a Yahtzee game, the first thing I want my game to do when it loads is ask for the player/players name/names, so that there scores can be saved to a high scores …

Member Avatar for codeorder
0
97
Member Avatar for charqus

Hello guys. Let's say i have a unidimensional array: string[] names = {"John","Merlin","XMan","Kelvin",...,"Flash"}; How can i see how much elements i have ? I tryed with sizeof(names) but it doesn't works ... Next Question: I have a RichTextBox, and i select a text ... i change it's color, but when …

Member Avatar for charqus
0
150
Member Avatar for camelCase

Hello Daniwebber's, I am developing a web browser. When the user clicks "Go" or "Enter" it will navigate to the website, however if it doesn't contain popular website keywords such as "http://" then I know they didn't actually want to go to a website. Then I would have it perform …

Member Avatar for mshauny
0
1K
Member Avatar for muzikhera

Hey guys can someone help me with this one? I have 4 forms namely Splash screen, Main, Login and Main1. In the first run the program will view the Splash screen then the Main form then the Login form and after the Main1. The problem is i cant close the …

Member Avatar for prvnkmr449
0
86
Member Avatar for Seapoe

I have a Datagridview bound to a DataTable. After doing the data binding I populate each rowheader cell in the datagridview with text. Issue is that when I perform a filter on the DataTable the text in the row header cells disappear. Anyway to make it so it that it …

0
56
Member Avatar for shelly1234

Hi all, Need a little help!!! I want to create an windows application such that there are 2 forms: form1 and form2 i want the form2 to be in background of form1 and form2 should be never seen(even when form1 is minimised,maximised,resized and if some other application is opened). code …

Member Avatar for Yamachi
0
155
Member Avatar for fadime

Hi , I use richtextbox at my windows form. I set the scrollbar property is "both" and wordwrap is "true" . At some computer because of "wordwrap=true" propery , horizantal scrollbar is not visible but at others it is visible so that wordwrap is not enable. Why is richbox behave …

0
63
Member Avatar for chathuD

I NEED TO have a trance parent back ground in my windows form application,but when i try to set the background color to transe parent,it says "invalid property". so how do i set my back ground to tranceparent in VS2008

Member Avatar for nick.crane
0
137
Member Avatar for pashaa

hi my freind im wanat to insert data in data grid view from text box for example when the mouse leave the text box then data transmit into dbgrid view from text box could you help me to do this, thank you ;-)

Member Avatar for sbglobal
0
175
Member Avatar for shelly1234

Hi all, I am new to C#,i just need your help in figuring out the issues. I have two windows forms :"background form " and "foreground form". 1)minimise the background form when foreground form is minimised. 2)move the "background form" when "foreground form is moved" Please tell me how to …

Member Avatar for shelly1234
0
160
Member Avatar for sommer_queen

Hello everyone , Have a small problem which i dont know how to deal with . at the same time not sure if i need delegate or event handlers . here it goes . I have two classes with two forms : Form A and Progress Form . Form A …

Member Avatar for edepperson
0
134
Member Avatar for franchico

Hi, I'm mechanical engineering graduate student in Portugal. I'm familiarized with c++ but I've been having problems with the windows forms. I'm trying to make a form that would compile diferent data with inviscid fluid flow formulas but I've got one major problem. I've done hundreds of google searches and …

Member Avatar for franchico
0
5K
Member Avatar for sharensla

I am working on a windows form application c#.How is it possible that a user name and password is already store in a database and when user load a specific website through text box it automatically sign in to that website.

0
71
Member Avatar for emc22

Hi,I'm trying to make my own simple paint application but I'm having trouble with the "openfiledialog and paint" thing. The code below draws lines when the mouse is down and moving. The problem is whenever I press the button that opens the dialogbox everything I painted on the form disappears …

Member Avatar for emc22
0
100
Member Avatar for tatarao25

hi every one,i have one problem with DateTimePicker, i am displaying only years in dtp by setting custom Format property to yyyy and dtp format to custom and showupdown property to true. the problem is when i click once down arrow or up arrow the years in dtp continuously changing …

Member Avatar for tatarao25
0
124
Member Avatar for cgcgames

I am having some trouble in this one area. What I am trying to do is get a treeview that loads from the database. which I have done and it loads all the way to the final data. but what I want it to do is make a conection to …

0
68
Member Avatar for judithSampathwa

hi there, i have a datagridview and i am validating the datagridview cell in the cell validating event, but when i type the data and prss tab the error message comes and the next cell is being selected. my code is [CODE] dgvSubContractor.Rows[e.RowIndex].Cells[e.ColumnIndex].Selected = true; [/CODE] why does it go …

Member Avatar for judithSampathwa
0
89
Member Avatar for IDC_Sharp

I made this code: [CODE] private int a; private int b; private void Form1_Resize(object sender, EventArgs e) { adrBarTextBox.Width = b + this.Size.Width - a; } private void Form1_ResizeBegin(object sender, EventArgs e) { a = ((Form)sender).Size.Width; b = adrBarTextBox.Size.Width; } [/CODE] when i open the program and i maximize the …

Member Avatar for Geekitygeek
0
180
Member Avatar for drake10k

Hello, I'm receiving an error message (ArgumentException was unhandled - Parameter is not valid) when I'm trying to capture a portion of the screen with a rectangle. It works great when drawing the rectangle with clickPoint.X < lastPoint.X and clickPoint.Y < lastPoint.Y, but when lastPoint.X or/and lastPoint.Y is lower than …

Member Avatar for Geekitygeek
0
147

The End.