New Form Wont Load C# THrowing exeption

       private void button1_Click(object sender, EventArgs e)
            MainTool form = new MainTool();
            this.Hide();
            form.Show();
this is what i have on a button on a blank form....i have done this beccause VS willnot open my "MainTool".... when i press this button i get an exception:
A first chance exception of type 'System.TypeInitializationException' occurred in WindowsFormsApplication10.exe
Additional information: The type initializer for 'WindowsFormsApplication10.MainTool' threw an exception.
If there is a handler for this exception, the program may be safely continued.
            Please help as this was working earlier and out of nowhere stopped......i have NO errors and wtill this crap please help ASAP

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication10
public partial class Form1 : Form
public MainTool mainToolFrm;
public Form1()
InitializeComponent();
private void button1_Click(object sender, EventArgs e)
this.Hide();
mainToolFrm = new MainTool(this);
mainToolFrm.Show();
MainTool form with only ar closed event.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication10
public partial class MainTool : Form
private Form1 form1;
public MainTool(Form1 form1)
InitializeComponent();
this.form1 = form1;
private void MainTool_FormClosed(object sender, FormClosedEventArgs e)
form1.mainToolFrm = null;
form1.Show();
You will be able to go back and forth as much as you want.
Good Luck

Similar Messages

  • New version wont load..Message Error 7 - Windows error 126

    new version wont load..Message Error 7 - Windows error 126

    Any update on this???? Still having the same problem.

  • I cant transfer my songs from old iphone to new iphone wont load into library

    I cant transfer my songs from my iphone 3gs to my new 4s they wont load into the library ive tried everything and im stumped

    All your media should be in your library. If for some reason this is not the case you should be able to:
    Backup the device to the new installation
    Transfer your purchases into a newly authorized library
    Recover any other media using third party tools as suggested in this post from forum regular Zevoneer
    Restore the new device from the old backup
    This process should switch set up your new device with the data and settings in your apps, assuming that is waht you wanted to achieve.
    Might be prudent to attempt a backup to iCloud directly from the device before you start... Settings > iCloud > Storage & Backup > iCloud Backup > On. It won't save any media but it would preserve the general account settings and documents in case anything goes wrong while you are trying to extract your other data.
    When you get it all sorted, make a backup!
    tt2

  • New system wont load WIN XP Pro

    Hi all,
    Thanks for all of your help (see last post). I finally got my box together. The problem I have is that I cant get WIN XP Pro to install. It starts the set up and then loads a but load of drivers... then says starting Windows Setup at the bottom right of the screen. Is there something special I need to do?
    I am going to get a new Case and PSU on Monday as I found my power switch is broken on my new case...
    Athlon XP 2400+
    K7n2 D-ILSR
    BFG Asylum GF4 Ti4200
    60 GB Maxtor Diamondmax
    Liteon DVD
    Liteon CDRW
    Fudin Aluminum Case w/ 400 w Raidmax PSU
    Mushkin Level 2 Dual Pack (256x2)
    Also, my cpu fsb is set at 100 mhz, when I set it to 133 the system wont post. The sys gives me a mem error on the D bracket and beeping. Could it be my PSU? will be buying an Antec or Enermax on Monday....

    Hi,
    I have a K7N420D Pro Mobo and I had a similar problem. There were two issues:
    1. I have a PCI RAID controller (add-in card).
    2. I plugged my cable modem into my board's ethernet
       controller (I was hoping for XP to auto detect).
    I tried to install XP on a number of occasions but it failed each time - I removed both of the above and it installed first time.
    I suppose it would be a good idea to keep your Mobo peripherals to a bare minimum whilst installing XP. Install your cards/peripherals once you have XP installed.
    As to your Mem and FSB problem - I've no doubt spomeone'll be along in a minute......
    Axel

  • Stolen laptop. new one wont load the music cause the itunes is on the old 1

    someone stole my laptop that itunes was on bought a new one but itunes wont recognize the ipod as belonging to this new pc so it wont sinc the purchased songs or the podcasts how do I fix this
    < Edited by Host >

    Have you authorized the new computer? From the Store menu, chose Authorize computer. Once the computer is authorized, you should be able to transfer all of your purchases to the new computer from your iPod.
    And, you may want to have your new computer looked at as none of your punctuation keys seem to work, making it very hard to understand what you're trying to say.
    Best of luck.

  • New 301 wont load YT videos

    Hi. my brand new 301 will not load youtube videos. video loads to 60% and then say: no answer, try later. this happens to every singel video. any taughs how to fix this? tanks for all help.

    Have you tried youtube with default or opera mini? It is a 3gp streaming and it doesn't require fast internet.
    -------------------If this post helped you, click on accept as solution.------------------
    -----------------------------Appreciate by clicking on white star.----------------------------

  • When I click something that opens a new window, the new window wont load??

    can anyone help? It's usually when I click on like a "chat live" link for a website like zappos, or my cable company.

    Thanks
    My system is Windows 7 SP1 fully updated with Norton 360 a/v
    My problem is as follows:
    Installed Firefox with no difficulty
    It opened normally
    Used and setup Google News UK as default page with no difficuly and page opened normally.
    But then trried to open individual items in Google News and every time got message Internet Explorer cannot open this site
    Set up a bare Windows 7 SP1 drive and installed Firefox and continued with same message when opening items on the page
    I also use both MSN and Yahoo browsers and neither have any problems
    I have repeated the process in Windows 8 beta with the same result
    Daniel

  • I transfered music from my ipod to a new itunes library (new PC).  The music plays in itunes but when I sync my ipod and try to drag songs from the itunes library to the ipod it wont load.  It shows a circle with aline through it.

    I transfered music from my ipod to a new itunes library (new PC).  The music plays in itunes but when I sync my ipod and try to drag songs from the itunes library to the ipod it wont load.  It shows a circle with aline through it.

    Have you selected manually manage music?

  • I downloaded songs to my phone at xmas and when i plugged in to my laptop it wiped the phone of new purchases when i try and download them to my computer in itunes via previous purchesses it wont load the list and i keep getting error 10053 can any1 help

    i downloaded songs to my phone at xmas and when i plugged in to my laptop it wiped the phone of new purchases when i try and download them to my computer in itunes via previous purchesses it wont load the list and i keep getting error 10053 can any1 help

    Syncing shouldn't trouch you photos unless you have photos in a Photo Library album.  These would be photos that were synced to your phone from your computer.  If you do have any, you'll need to use an app like PhotoSync to transfer them to your computer prior to syncing.
    If you prefer to backup your camera roll photos prior to syncing, open iTunes and go to Preferences>Devices and check "Prevent...from syncing automatically".  Then connect your phone to your computer and import them as explained here: http://support.apple.com/kb/HT4083.
    Then, to minimize data loss, follow the steps in this user tip: https://discussions.apple.com/docs/DOC-3141.  To follow the steps, first open iTunes and go to View>Show Sidebar.  Also, Transfer Purchases is now located in File>Devices.

  • Quicktime wont load because the installer thinks I have a newer level quicktime installed already.

    quicktime wont load because the installer thinks I have a newer level quicktime installed already.  Thus the newest level of iTunes and quicktime will not install, help... Thanks.

    Unfortunately, this sort of trouble has gotten more complicated to deal with ever since Microsoft pulled the Windows Installer CleanUp utility from their Download Center on June 25. First we have to find a copy of the utility.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for at least version 3.0 of the Windows Installer CleanUp utility. (The results from mydigitallife and Major Geeks are worth checking.)
    After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any QuickTime entries and click "Remove".
    Restart the PC, and try another install. Does it go through properly this time?

  • Itunes wont load new music to touch. have updated restarted and reset. what now?

    i bought new music from itunes. it show in my itunes list. it wont load to my touch. i have updated and redownloaded itunes. i have restarted and rest my touch. restarted my computer. but it will sync but the new stuff isnt going into touch. help

    Do you have the right boxes checked?
    iTunes 11 for Windows: Syncing overview
    iTunes 11 for Windows: Set up syncing for iPod, iPhone, or iPad
    Have you successfully synced from this computer/iTunes library before?

  • Throw new MessagingException("Cannot load header.");

    I often see this error thrown for one mail provider
    if (is == null)
    throw new MessagingException("Cannot load header.");
    Doing a refresh of teh inbox solves it. What/how/why does this happen?

    I am using Javamail 1.4.3
    Below is what I get when it is working...it happens sporadically, so I'll need to wait if it looks any different when that error is thrown:
    04-23 19:16:32.315: INFO/System.out(17273): A0 CAPABILITY
    04-23 19:16:32.502: INFO/System.out(17273): IMAP DEBUG: AUTH: XYMCOOKIE
    04-23 19:16:32.502: INFO/System.out(17273): IMAP DEBUG: AUTH: XYMCOOKIEB64
    04-23 19:16:32.502: INFO/System.out(17273): IMAP DEBUG: AUTH: XYMPKI
    04-23 19:16:32.502: INFO/System.out(17273): IMAP DEBUG: AUTH: XYMECOOKIE
    04-23 19:16:32.510: INFO/System.out(17273): DEBUG: protocolConnect login, host=imap.mail.yahoo.com, user=myusername, password=<non-null>
    04-23 19:16:32.510: INFO/System.out(17273): A1 ID ("GUID" "1")
    04-23 19:16:32.744: INFO/System.out(17273): A2 LOGIN myusername mypassword
    04-23 19:16:33.044: INFO/System.out(17273): A3 CAPABILITY
    04-23 19:16:33.276: INFO/System.out(17273): IMAP DEBUG: AUTH: XYMCOOKIE
    04-23 19:16:33.276: INFO/System.out(17273): IMAP DEBUG: AUTH: XYMCOOKIEB64
    04-23 19:16:33.276: INFO/System.out(17273): IMAP DEBUG: AUTH: XYMPKI
    04-23 19:16:33.283: INFO/System.out(17273): IMAP DEBUG: AUTH: XYMECOOKIE
    04-23 19:16:33.283: INFO/System.out(17273): A4 LIST "" INBOX
    04-23 19:16:33.544: INFO/System.out(17273): DEBUG: connection available -- size: 1
    04-23 19:16:33.549: INFO/System.out(17273): A5 SELECT Inbox
    04-23 19:16:33.799: INFO/System.out(17273): A6 FETCH 7 (UID)
    04-23 19:16:34.041: INFO/System.out(17273): A7 FETCH 7 (ENVELOPE INTERNALDATE RFC822.SIZE)
    04-23 19:16:34.377: INFO/System.out(17273): A8 UID FETCH 16,14,4,3,2,1 (UID)
    04-23 19:16:34.608: INFO/System.out(17273): A9 FETCH 7,6,5,4,3,2,1 (FLAGS)

  • Reader is stuck on one file and wont load a new file why?

    reader is stuck on one file wont load a new file why?

    Hey george,
    Could you please let me know if you are using the latest version of Adobe Reader i.e. 11.0.10
    What OS version are you using?
    Have you opened the file on the web or within Reader itself?
    You might close the file, launch Reader and go to Edit> Preferences> Security(Enhanced) and uncheck 'Enable Protected Mode at startup' option.
    Let me know if this sorts your problem.
    Regards,
    Anubha

  • Flashed new bios V1.10 , now Pc wont load past windows loading sceen.HELP

    hi i have a neo-f p965, i flashed the bios today to the new update v.1.10. now my pc wont load past the windows loading screen, it just reboots every time.
    i want to go back to a older bios version if posible. can anybody help me, this is a disaster if i cannot get it to work.
    many thanks
    Noel.

    Get this.
    Select your motherboard. Then click BIOS, download previous version.
    Rest is simple.
    Or you can stick with the 1.1 BIOS and reinstall Windows.

  • Have Vista, loaded new version of iTunesn now have DEP issue and iTunes wont load. Is there a way to download on old compatable 9.0 version or is there a Dep fix

    Have old PC with Vista, loaded new version of iTune now I have DEP issue and iTunes wont load. Is there a way to download on old compatable 9.0 version of iTunes or is there a workable Dep fix?

    You'll get a variety of earlier versions of iTunes here: Old iTunes for Mac

Maybe you are looking for

  • Question on drill-in navigation

    Hi, I have a ViewStack in my main mxml. One of its child containers (a Search 'page') has a DataGrid. When I click a record in the DataGrid, I want to display another container (a CRUD 'page' for the selected record). How can I use the click event to

  • Why is windows 7 and iTunes such a pain

    Sync with windows 7 is just not working ! Any help will be much welcome

  • Price Diffrence for Clearing Charges

    Hi Expert, WE defined clearing charges 1400 @ 12000 kg material in PO and we received GR for 11930 , accordingly clearing charges credited by almost 140011930 , in between ,we consumbed almost. 1174 quantity but whenever bill passed for the same , cl

  • Influxis to Host Collaboration Service

    Dear LCCS Customer, I’m pleased to announce Adobe and its partner Influxis have reached an agreement resulting in a hosted collaboration service offering based on Adobe’s LiveCycle Collaboration Service (LCCS) code. The new service will be known as I

  • Require Solution Manager Key

    Dear all, I am trying to install the ECC on window 2003 server and now installation require the solution manager key while i have not solution manager system so Please create key of this system. sap system ID           :       DEV central instance ho