What am I doing wrong and how can I do it better
Nothing is being sent over. It just sends a "".
private void newToolStripMenuItem_Click(object sender, EventArgs e)
DialogResult result = new New().ShowDialog();
New newForm = new New();
Person person = new Person();
switch (result)
case DialogResult.Abort:
break;
case DialogResult.Cancel:
quit = true;
break;
case DialogResult.Ignore:
break;
case DialogResult.No:
break;
case DialogResult.None:
break;
case DialogResult.OK:
person.forename = newForm.Forname;
person.surname = newForm.Surname;
person.dateJoined = newForm.DateJoined;
utilities.neutralList.Add(person.FullName);
RefreshList();
break;
case DialogResult.Retry:
break;
case DialogResult.Yes:
break;
default:
break;
private void RefreshList()
foreach (var item in utilities.neutralList)
listBox2.Items.Add(item);
}
It looks like you are trying to retrieve data from 2nd form. You are not returning any value from the 2nd form. See two form project below. I have a helper method GetData.
Form 1
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;
namespace WindowsFormsApplication1
public partial class Form1 : Form
Form2 form2;
public Form1()
InitializeComponent();
form2 = new Form2(this);
private void button1_Click(object sender, EventArgs e)
form2.Show();
string results = form2.GetData();
Form 2
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;
namespace WindowsFormsApplication1
public partial class Form2 : Form
Form1 form1;
public Form2(Form1 nform1)
InitializeComponent();
this.FormClosing += new FormClosingEventHandler(Form2_FormClosing);
form1 = nform1;
form1.Hide();
private void Form2_FormClosing(object sender, FormClosingEventArgs e)
//stops for from closing
e.Cancel = true;
this.Hide();
public string GetData()
return "The quick brown fox jumped over the lazy dog";
jdweng
Similar Messages
-
Passbook not working how do I fix .?
There is a fix coming out soon for this. In the mean time go to settings and put the date forward one year. then try. once you have access then put the date back.
hope it helps
Ryan -
I am trying to use siri, Siri keeps saying( SORRY SOMETHINGS GONE WRONG CAN YOU TRY AGAIN)
I HAVE TRIED SEVERAL NAMES AND NUMBERS IN MY CONTACTS.
What am I doing wrong or how can I correct it.Siri Fix
Turn OFF Siri
Reset Network Settings
Turn ON Siri
Done
Steps:
Tap Settings App>General>Siri>Turn OFF
General>Reset, near bottom>Reset Network Settings
Tap Settings App>General>Siri>Turn ON
Done -
When creating a multi page document, some of my thumbnails become linked and therefore impossible to rearrange. What am I doing wrong and how do I correct this?
The pages in sections stick together because the text flows between the pages.
Insert a section break to isolate pages between sections.
Now this all works in Pages '09, unfortunately Pages 5 doesn't let you.
Peter -
Every time I sync my iCal on my computer through iTunes with my iPhone 4 or iPad, duplicate entries are generated on both systems. What am I doing wrong or how can I avoid the duplications? I have been doing this for several years and this problem is a more recent issue, like in the last 6 months. I have been deleting the duplicate entries, on both systems, but some duplicates reappear through "general" entries that are connected to the correct color for a Calendar, but not the name. I am going nuts and wasting tons of hours trying to get the 3 calendars to sync without generating duplicate entries.
Choose one of the Calenders on ONE of the computers OR the MobileMe as the Master / correct account.
The REINITAILISE the data of MobileMe within preferences on the computer defining the datatransfer correctly (in the advanced box of preferences). The synchronise iphone contacts and calender directly on-line to MobileMe.
I posted a question on this today, and gave my own reply !
Regards,
Kevin -
I just updated my iPad to OS5 and all of my apps are gone. What did I do wrong and how can I get them back? Several were paid for. Thanks
If you have failed to make sure that any apps purchased on the iphone were transferred to your computer before updating, then you will have to redownload.
Open itunes store, click Purchased, under Quick Links. -
I downloaded adobe flashplayer as i coulnt access video content on Facebook. now all the videos i watch jerk around. what have i done wrong and how can i fix it? I tried deleted the program to trash then emptyied trash but its still happening
Try emptying your browser cache more often. If you are using Safari, from the menu bar top of your screen click Safari > Empty Cache
Try a video on FB. If can't stream Flash content, back to the menu bar click Safari > Reset Safari. Select the top 5 boxes, click Reset.
If that doesn't help, try deleing Flash cookies > Flush.app – Flash Cookie Removal Tool For OS X | MacHacks.TV -
When I delete an e-mail, it automatically puts another e-mail in my inbox which reads "No Sender", thus I have numerous e-mails that have not really been deleted. How can I delete all these e-mails and how to correct the issue of deleting e-mails?
Here is one way of doing it. Left click on picture, list opens click on save as. In next window box apears save as type PNG(*.png). Then go to my pictures and print picture from there. I am not sure what print target is? That is in the list also. That may be how it is directly printed. Never used that short cut. Try it and see. I know for sure saving it to file works.
-
HELP!!!!
No, it's just that adobe makes it really hard to find the actual editor in the mac version. It's in applications>adobe photoshop elements 11>Support Files, not the logical file at the top level of the folder:
-
I am trying to add the Youtube widget, but I get a black box saying blocked plugin. I have even tried to embed it from Youtube as well and it does the same thing. But when I drag the Vimeo widget over, it connects like it should. What am I doing wrong and how can I fix this problem?
Make sure that both the web browser you're using and its Flash plug-in are up to date. Google Chrome has its own Flash plug-in it updates on its own. Firefox, IE and other have separate plug-ins.
-
So I just bought a new iPhone 4S and I have to share my data with four other people so to avoid using it up I use wifi whenever possible. I use iMessage to talk to iPhones but when I'm not around wifi or when I don't have any more data, I don't receive any of their regular SMS messages but I can send them. I checked my friend's iPhone and he receives my message as an SMS but when he replied it was still in iMessage. Is it not detecting that my iMessage is off ?What's wrong and
how can I fix it ?I think I fixed the apps, though.
*Turn off your wifi and only turn it on when you want to use it
*Lower your brightness
*Turn off "Push" on notifications and mail and turn on "Manual"
*Return to your home screen and then double click twice and tap and hold one of the apps you've previously opened, when they jiggle tap the red on each app until fully erased.
*Don't use your ipod while it is charging, allow at least a 10 minute charge (fully charged) before using it again.
See if this helps(: ... I still have no answer bout the camera issue. I might be going to apple soon so we will see then. -
My iMessages freezes when it gets through about 90% of the loading bar. Then the message doesn't send at all. My iPod's only about 2 week old, what's wrong and how can I fix it?
Maybe:
iOS: Troubleshooting Messages -
Mac OS X 10.6.8 statup problem: desktop goes black 10 secs after booting, can remain apparently asleep for 15 mins. I can't prompt it to wake, until recently it would wake when peripheral were added (earphones). What is wrong, and how can this be fixed?
You need to fresh install 10.6, programs fresh form original sources and return only vetted files (no TM migrations) from a regular storage drive
But this when erasing the drive use the Security Option: Zero All Data before installing 10.6
What has happened your data got corrupted and it's corrupted on the TM drive too.
So the Zero will map off bad sectors on your drive, the 10.6 install will be fresh, the programs will be fresh and only files will be returned, you'll find out in short order which ones they are.
Reducing bad sectors effect on hard drives
How to erase and install Snow Leopard 10.6
Once you are back up, then consider making a option key bootable clone.
Most commonly used backup methods explained -
My battery drains really fast and my macbook shuts off without warning basically everytime it is disconnected from power, what is wrong and how can I fix it? also whenever an application is opened the computer freezes and the application will either shut down or make the macbook run really loud.
Charge Information:
Charge remaining (mAh): 1450
Fully charged: No
Charging: Yes
Full charge capacity (mAh): 1739
Health Information:
Cycle count: 379
Condition: Poor
Battery Installed: Yes
Amperage (mA): 196
Voltage (mV): 12573
I have the 13inch macbook and it is 2 years old (bought august 2009) -
A prompt that says "Could not use the clone stamp because the are to clone has not been defined (option-click to define a source point), appears EVERY time I try to use the clone stamp. What is wrong and how can I fix this?
If a tool is acting up, one suggestion is to reset the tool.
Ctrl-click on the clone tool icon in the Options bar and select Reset Tool.
Maybe you are looking for
-
Problem while creating contact person using SD_CUSTOMER_MAINTAIN_ALL
Hi All, I am trying to create a contact person to a customer using FM SD_CUSTOMER_MAINTAIN_ALL.Following is the simple code that I am using.FM is not giving any exception.But the contact person is not getting created.can anyone help me regarding this
-
ARD, screen share and a second monitor
I have a 2008 20 inch iMac and 13" aluminium macbook. I wanted to use the iMacs screen with my macbook and decided to get ard (as it was kind of cheap on the app store). I was a bit disheartened when I found that, when controlling the macbbok from th
-
Invoking system's default browser
Hi While developing a swing application, in event handling, I would like to open a HTML file in the system's default browser like IE or netscape. Can I know how to do that?
-
I have one table (user_projects) that lists user_id and project_id, a user table to get the user name and a project table to get the project name. These items are all contained in a single 'admin' database. Each individual project has a separate data
-
What can be done in Java?
I wonder what is relistic to do in java? Im thinking mainly in terms of games... As I understand it, Java aplications are not the fastest due to the "runtime translation" the JVC does... (hope I've got that right, otherwise: please correct me!) By st