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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

opening a web browser without opening form on windows form load event

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :Windows Application
Hello All, I have a main frame which has a display button. after clicking on display button I usually open a windows forms. Now I have a requirement to open a web page after clicking on display button. I should not show windows form to the user. for that I had written following code in the Form_int (override) event of windows form. System.Diagnostics.Process.Start(http://www.google.com); and I commented out ShowDisplay(); code.  Everything looks good till now and when I run the project and clicked on display button web browser has been opened, but if I click again another web browser is being opening. but I don't want another browser to be opened. can anybody please help me in that. Thanks in advance.

View Complete Post

More Related Resource Links

Some times FormEvents_Loading() is not firing when opening infopath form in browser.


Hi All,

I am facing problem in infopath form published in form library. There are 5 different view depending on the user.

Sometimes the FormEvents_Loading() is not getting invoked. As i check using log function on every setp inside formevent_loading().

But when i click refresh button on browser,it works fine.

This is creating problem with users as they see wrong views.

Pls Advise how can i resolve this..



-- Regards Sandeep

Browser Based Infopath form Opening Problem



 I am having some problem regarding infopath form.Actually i m using Browser based infopath form.

 I created the browser based infopath form and then i choosed full trused and added the certificate and then published with admin approved and then installed and activated from the central admin.

if client machine is having the Infopath Installed on that machine, I m facing some prob to open that infopath form on the client machine(asking windows crediantial again and again and at last the form was opended but the webservice was not retrieving the data on the infopath form) .

But if the client machine is not having the infopath installed then the infopath form is opening in single click.there is no issue in this case.

 so can u confirm me that if we are creating browser based infopath from then the client machine should not have infopath installed on that machine. Is this right?

Actually i m working on client site and lot of..... 1000 machines is here and every machine is having infopath form installed. So will every machine need uninstall of infopath?

Pls try to give me the solution.


Regards- Sharad

Error when opening Infopath Form


Background: Created an Infopath 2003 form with 2 views (1 as Read-Only View and another 1 for Submitting content) and published to a Sharepoint 2007 Library.

Working: When a user opens a new form it opens in submit view; once the form has been submitted, when the user tries to open again, the form opens in read-only view.

Error: 99% of the users do not face any issues, however when the the rest 1% of the users try to open a new form; they receive the following error and are unable to open the form.

Form template: _http://server/sites/subsite/library/forms/template.xsn
InfoPath cannot open the following view: Edit_View
The following view file is not valid: view1.xsl
The file is not a valid XML document.

An invalid character was found in text content.

Line 673, Position 12

I am not sure what is wrong here (or) from where this error is being generated!

Balaji Baskar [Please mark the post as answer if it answers your question]

Switch views when opening a form depending on submit locations?



I would like to know it was possible to switch views when opening a form depending on where the form has been submitted.

I am submitting my form to library A and library B and want to be able to open it in view 1 in library A and in view 2 in library B.

Is there a way to set some url conditions in the open behavior rules?

Thanks a lot!

Getting User_Name when opening a form


Hi Everyone:

Scenario on  MOSS with Infopath Form Services:

  1. Two libraries - Library 1 is a list and Library 2 is Infopath form library (browser base form)
  2. A workflow in Library 1 creates a item in Library 2 and pre-populates the form with some data from the list (this works perfectly)
  3. Also a  user can create a form directly in Library 2 (the form library)using the New button
  4. The form has a hidden field which captures UserName() and if User Name = another field in the form, the User can make a change, if it doens't match User can't change the data)


  1. When a user creates a new form in the library, the hidden field is correcty filled in with the logged on User.
  2. If they save, close and open the form, the field still shows logged in user
  3. BUT, if the form is created and saved in the form library by the workflow, and a user then opens the form from Library 2, the Username() blank.
  4. So, one a form is created by the worklflow and a user opens it after the fact, how do I capture the Logged in user who is opening it for the first or subsequent times?

Thanks for your help!


OK button click on Windows dialogue form not triggering click event

I have created an Add-In for Outlook 2003 in Visual Studio 2005. When a new message is sent and a toggle button is selected, a form that I have created will be displayed as a dialogue box, where further information can be entered. Once this information has been entered you can click the OK button and the message is sent. If you were to click the OK button with invalid data in the form, there would be a message box with an error message. This all works perfectly on my development machine but when I have packaged the Add-In and installed it on other machines it does not work. Clicking on the OK button does nothing, there is not even an error message. All the prerequsits are successfully installed and this is the only part of the Add-In that does not work. All help greatly appreciated. Thanks Nick

Error opening an Infopath form

I am trying to open an Infopath xsn form and I get the following error - "infopath cannot load this form. Either the signature is corrupted, or the certificate used to sign this form is expired or revoked. Contact the author of the form." I am the author of the form. I tried calling my cellphone number but there was not answer. Anyway, I've encountered this error before and I ended up redoing the form from scratch. I don't want to do that obviously. Is there a way to open the form somehow?Thanks,Dave

Windows Keyup event is routed to next form even if the current form is closed

In a form (say FormA) i have 2 events "Keyup" for the form and button_click event for the button. I call FormA from the main form with a showDialog, after this i call another form (say FormB), it also has the 2 events. In both the form the button_click event has the logic to close the form (this.close()). Now when the FormA is opened the focus is on button, if the user presses "enter" button the button_click event is called which closes the form, the logic returns to the main form and the next line i.e. to open the FormB is executed. Now here is the wierd part, in FormB because there is a KeyUp event handler; just after instantiation of the form directly this event handler is called. I guess this is being routed from FormA. Shouldnt the FormA's keyup event be closed as soon as the form is closed?

database schema for online account opening form

what should be the database schema for online account opening form with joint account holders and every participants (in a joint account) have seperate contact and personal detials.Please suggest.

Form opening in infopath client despite Content Type settings "Display as a Web Page"

Hi all,   I have a strange behavior with my forms. The infopath template is defined as Content Type for my Form library, in the advanced settings I have checked "Display as a Web page" for the "Opening browser-enabled documents" setting. Despite that when the client is availble on the computer which is browsing the Form Library, I'm asked to "Open", "Save" or "Cancel" instead of opening the form in the browser.   Any idea why this is happening ?

Web form page load event


I have  Web page that uses LinkButton control inside Template Fields of Gridview.

I am trying to work on LinkButton Click event and trying to preserve the Value of LinkButton that user click, and based on that value, i want to refresh tha page data.

I used CommandName and CommandArgument property of Linkbutton, but i can use that property only in GridView_RowCommand method by checking e.CommandName expression. But the problem with that Gridview_RowCommand event fire after all other page_load activity. So the value never used in the page_load event to refresh the data in all other control.

I also tried to use OnClick Method, Session variable and Hidden variable. but when i run Response.Redirect method from Gridview_RowCommand, it clear all the Session and Hidden variable values. also tried (Response.Redirect(,false)) method but never got success.

Any suggestion will be appricated in advance.

Avoid Opening two instance of Infopath Form which is published to Sharepoint Library


Hi Everyone,

              It would be great if anyone of you answer my question.I have an info path form built in 2007 and published it to share point as a document library.My requirement is i should not allow two instance of the same Form to be opened at the same Time.I mean if you open a form from Share point and If you try to open the next one without closing the previous Form,it should give an alert to user saying that the "Form is already Opened".

I tried like having a Boolean variable which is by default false.If i try to open for the 1st time it should make it as true and for the next time if we refer to that variable and make an alert.But it dint work.Please let me know by anyway i can do this task.Your help will be greatly appreciated!!!!





How to pass value from browser into embedded windows form control library


Hi all,

i have one project which i embed the windows form control library inside the web form.

now i wanna pass a url from aspx into my windows form control library.

May i know how to do this?


how can i load a window1.xaml form from click event fuction of a button

how can i load a window1.xaml form from click event fuction of a button

TIP: Opening an IP Form via a link and supressing the page refresh.


Just a tip I came up with to allow a form to be opened using a link while suppressing the refresh of the page containing the link. 

Below is an example link.  Note the onclick of the link starts with a call to the WSS function DisableRefreshOnFocus(); (from core.css).  The next function in the onclick is the DispEx call that opens the form. 

Another benfit of using the DispEx is that you can suppress the "Open/Save/Cancel" prompt.


<a onclick="DisableRefreshOnFocus();return DispEx(this,event,'TRUE','FALSE','FALSE','','0','SharePoint.OpenXMLDocuments.2','InfoPath.Document.2','1http://my.wsssite.com/myforms/someform.xml?Action=GroupMaint&OpenIn=PreferClient','','2','0','0','0x400001f06fbf1bff')" onfocus="OnLink(this)" href="http://my.wsssite.com/myforms/someform.xm?Action=GroupMaint&OpenIn=PreferClient"><img alt="Click to edit the Personnel record for this person"  border=0  src="http://my.wsssite.com/_layouts/images/icxddoc.gif"/></A>


Opening model form specific to the tab



I have the tabcontrol, in which i have two tabpages. I embed the form in "TAbPage1" and i want to open the model popup specific to that form embeded in the "TabPage1". Meanwhile, i should be able to access the tab.

Basically, i want to open the model popup which is specific to that tabpage and it should not be model to the undelying form which has the tab control.

I tried with the below code, but it doesnt work


private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)




Catastrophic failure while opening DIP form in Infopath



while opening my content type's DIP in infopath, it shows 'Catastrophic failure'.

while searching, i have found the reason for this,

While doing this so, you may be facing an ugly error Catastrophic failure error. Dont worry about this error... this is because of the columns in your content type. While creating a column in content type, that column should not contain any space(s). For example, you created a content type named "Test Document" and the site column you use is "Test Column". Then this content type will face the catastrophic failure error.

the columns are already being used.please guide me to solve this issue.

Thanks in advance.

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