.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Closing all hidden forms - A error !

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :Windows Application
 

I have two forms - Form1 and Form2

 

Form 1 :

======

Form1 has one button and form closing event.

 

on clicking on button a method  will call form 2 and hides form 1

on closing the form1 the form1 closing event will do application.exit();

 

Form 2:

=====

Form2 has one context menu with return to main form item - on clicking on this item a method will hide the form 2 and shows the form 1

Form2 also has a form closing event which also hides form 2 and shows form 1.


 

What am i doing:

============

I'm opening form 1 and then by clicking on the button i'm calling form 2. Form 2 shows up and Form 1 hides.

I'm right clicking on Form 2. The context menu shows Return to Main Form. I'm clicking on Return to Main Form item in the context menu. This is hiding the form 2 and showing the form 1. Now, i'm just closing the form 1. I'm getting exception error.

Note: This is not the case when i simply close form 2 and return to form 1 and then close form 1. No error.

 

Form1:

 

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 Testingtheerror
{
 publ


View Complete Post


More Related Resource Links

Infopath form and forms library error

  
I've created an InfoPath 2010 form and associated it with a forms library on a SharePoint site. When I go to the library and choose "Add document" the form opens up to be filled out by the user. When the form is filled out, and the user tries to submit, they get an error saying that I need to configure SharePoint to allow cross-domain data access for user form templates that use connection settings in a data connection file and store a UDC file in the same site collection as the form. So I've enabled cross-domain data access and I've already created a Data Collection Library for Forms in the Site that is approved. What am I missing?  Why am I still getting the error?  

Error reading .config file in Windows Forms app - Access is denied

  
I'm attempting to read a connection string from a .config file in a Windows Forms app on a test laptop. A previous version of the application worked just fine, but now I get a configuration exception thrown - "Configuration system failed to initialize." The inner exception message says - "An error occurred loading a configuration file: Access is denied". The user I'm logged in as is in the Administrators group and there's no obvious problems with the config file. The same config file works just fine on my dev machine so it's not an issue with ordering of the XML. Any ideas would be greatly appreciated.If a response to your question is helpful or answers it please mark it as such!

Error reading .config file in Windows Forms app - Access is denied

  
I'm attempting to read a connection string from a .config file in a Windows Forms app on a test laptop. A previous version of the application worked just fine, but now I get a configuration exception thrown - "Configuration system failed to initialize." The inner exception message says - "An error occurred loading a configuration file: Access is denied". The user I'm logged in as is in the Administrators group and there's no obvious problems with the config file. The same config file works just fine on my dev machine so it's not an issue with ordering of the XML. Any ideas would be greatly appreciated.If a response to your question is helpful or answers it please mark it as such!

Error Publishing Workflow - : Activation could not be completed because the InfoPath Forms Services

  
Recently our when trying to publish a new workflow we are getting the following error: Activation could not be completed because the InfoPath Forms Services support feature is not present. Another symptom is any existing custom workflows are not running. There are several older posts from SharePoint 2007 that indicate to disable and re-enable the SharePoint Server Enterprise Site features. I have tried that and I still get the error.  Looking through the ULS I see the following when I try and publish a workflow: 09/16/2010 15:04:29.48 w3wp.exe (0x2070) 0x0718 SharePoint Foundation General 8e2s Medium Unknown SPRequest error occurred. More information: 0x80070002 c700de1a-5756-4f45-915e-3b229e56f049 09/16/2010 15:04:29.48 w3wp.exe (0x2070) 0x0718 InfoPath Forms Services Conversion and Deployment ey0w Verbose VerifyListPresence: FTL not found on site:http://uchintranet due to expected FileNotFound exception:The system cannot find the file specified. (Exception from HRESULT: 0x80070002) c700de1a-5756-4f45-915e-3b229e56f049 09/16/2010 15:04:29.48 w3wp.exe (0x2070) 0x0718 InfoPath Forms Services Runtime 82mv Exception Activate NonAdminSolution failed with unhandled exception Microsoft.Office.InfoPath.Server.Util.InfoPathLocalizedException: Activation could not be completed because the InfoPath Forms Services support feature is not present.     at Mic

SSRS forms authentication error:An error occurred while attempting to get the ReportServer Url. The

  
I have managed to get the Forms Authentication sample to work bu there is a hitch. I am running Report Server and Report Manager on the same(test) PC. I can logon to the Report Server without a problem but when I try logon from the UILogon.aspx page for Report Manager I receive the following error:

An error occurred while attempting to get the ReportServer Url. The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
An error occurred while attempting to get the ReportServer Url. The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
An error occured while attempting to get the ReportServer Url. The RPC server is unavailable.(Exception from HRESULT: 0x800706BA).

I can register users which suggests that the page can connect to the database.

Any help???


asp.net forms authentication with route handling - error, routes not recognized, returns to login

  


 I just created a small site with form authentication with route handling.  Without forms authentication, the pages route just fine.  With forms, it returns back to the login page as it is not one of my allowed locations specified in my web.config file.

 

I know I probably need to write a custom route handler.  Does anyone have an example I can follow for this?  Thanks.


Browser based InfoPath forms in Sharepoint error

  

Hello,

I have a form that we built in InfoPath2010 and I am trying to publish it to SharePoint2010 using the "broswer-based" capability. The form works in preview mode in InfoPath, but when I publish it to SharePoint, I get the follwing error:

"You do not have permissions to access a database that contains data required for this form to function correctly.
An entry has been added to the Windows event log of the server.

Log ID:5566

Correlation ID:9161ac7c-7b8f-4164-907a-14426c54b24f"
The form has two main data connections, both are tables in a sql database server. They display data from the tables, and the users are also able to input data into the database. The form right now is configured as "full" trust, as we have custom code in the form that will only work with that setting. I have also uploaded the two UDC connection to a data connection library in SharePoint, but no luck.
Here is part of the  the custom code in our form that may be causing issues:
SqlConnection con =

Digitally Signing Infopath Forms Error after installing SP2

  

Hi,

I have a Infopath form with Digital Signatures implemented for some sections. Everything worked well in Moss 2007 SP1. Forms are opening in Web browser.

After installing SP2 When I try to sign some section I've got Infopath error dialog that just says "Error occured", no other errors, no errors in event viewer. If I click Continue everything works fine and I can sign my section.

Any clues or ideas?

Thanks in advance.


Drasko Popovic

Browser Enabled Forms - "Unknown Error" when trying to open

  

Hi All,

I'm running SharePoint 2007 SP2 Enterprise on Server 2008 R2, and a SQL 2008 back end, Everything has been running perfectly up until recently.

This morning I got a call that users are unable to open existing forms in the browser.  The Infopath "Loading Form" dialog appears, but a SharePoint "Unknown Error" appears in the background and I get nowhere?

I've checked in the 12hive logs and do not see anything helpful.

 

Any ideas?

 

Josh


error CS0570: 'System.Windows.Forms.MessageBoxButtons.OK' is not supported by the language

  

Hi all,

I have a following code in C#:

using

 

 

System;

using

 

 

Mulitple forms, hidden panels, add and remove usercontrols or...?

  
Need to build a touchscreen app whose menus take up half the screen.  As you make choices the menu area changes to the next set of menus, and so on.  Would you recommend using panels with the menus and turning them visible/not visible.  Using numerous forms, or use usercontrols and add and remove them as needed?
-MBowles

I was getting an error on deployment/install about crystaldecisions.window.forms

  

I was building a Crystal Report viewer, and followed the 1 step setup, and when i put it on a target computer and tried to install, i would get an error that say:

CrystalDecisions.Window.Form Version 13._____  to be installed in Global Assembly Cache (GAC)

I was first thinking there would need to be references to it.  I was thinking that this element was a driver which is uninstalled on the computers.  I figured that the install wouldve taken care of that and installed everything as needed.

What do i do to go about fixing this so i can deploy this to computers without having to install VisualStudios to do it.  (as it seems that on 2 test computers, it was shown that it will run fine, given a previous installation of VisualStudios 2010).

 

Running on 64bit Windows 7 machine.

[edit: fixed spelling of topic name]

SSRS 2008R2 Forms Authentication - service won't start: rshost ERROR: Error in managed ServiceMain,

  

I implemented a forms authentication solution based on the MSDN sample. However, when I attempt to start the reporting services service either via Services or the RS Config tool, I get the following error in the reporting services logfile:

 

rshost!rshost!b04!04/12/2011-22:37:21:: e ERROR: Error in managed ServiceMain, error=0x8007000b

I have not been able to find any information around this error. Please help!!


Routing for Web Forms in ASP.NET 4.0

  
posted a prototype demonstrating how one could use Routing within Web Forms. This is something you can do today with ASP.NET 3.5 SP1, because of the work we did to separate Routing from ASP.NET MVC. I would have liked to include Web Form Routing as part of the Routing feature when we were working on SP1, but we didn't have the time to do so in a robust manner before SP1 was locked down.

Application Architecture in Windows Forms 2.0

  
Applications have special support in Windows Forms. For starters, you can manage and tailor your application's lifetime, and, when the work flow is disrupted by an unhandled exception, you can choose from several methods of response. Then, there are several application models that you can employ, including Single Document Interface (SDI) and Multiple Document Interface (MDI) applications, each of which can support either multiple-instance or single-instance mode, the former the VS05 default and the latter requiring special consideration. All applications, however, can discover and use a wide variety of information about the system and environment they execute in.

Application Architecture in Windows Forms 2.0-Single-MDI Applications

  
Consider an MDI application like Microsoft Excel; files opened from the file system (by double-clicking) are all opened as separate child windows within the parent Excel window.7 For the first instance of an MDI application to open a new child window to display the file that was passed to the second instance of the application, the second instance must be able to communicate with the initial instance.

Explained: Forms Authentication in ASP.NET

  
This module explains how forms authentication works in ASP.NET version 2.0. It explains how IIS and ASP.NET authentication work together, and it explains the role and operation of the FormsAuthenticationModule class.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend