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

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

How to enable own shortcut within WebBrowser control in Windows form application

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :Windows Application



I am developing a windows form application with C#, where I have placed WebBrowser control... I load some web page in this webbrowser and I need to know, that after I press my own certain shortcut that it will allow me to call my handler...

It should work something like this => I have certain textbox on web page and after pressing my own shortcut, it will call my handler which will automatically type certain text (which will be prepared in that handler) into that textbox... 

Could you advice me, how to make this happen or if it is even possible?


Thanks a lot in advance

View Complete Post

More Related Resource Links

Problem hosting a WPF user control in a windows form application

I have a windows forms application and want to to use WPF inside this application. So I have add a WPF user control into my project. Then I take a ElementHost from the toolbox and put it on my windows forms. The problem is now, when I want to add the WPF control with "Edit Host Content" I get the message "This ElementHost is currently not hosting any editable content....." What's wrong? How can I embed my implemented WPF control into the ElementHost ?

Unbound .NET WebBrowser control deactivates Windows Form


In a project of mine, I need to work with unbound WebBrowser controls. The goal is to navigate simultaneously to several web pages, using several WebBrowser controls, and showing the individual pages when the user requests them pressing a button, binding the needed WebBrowser control to a container control in the form to display them.

Problem: Whenever one of the WebBrowser controls loads a page that focuses a control on the page by means of scripting, my Form gets deactivated after document complete if the WebBrowser control is not showing. This only happens with pages that focus an element on load (for example, using onload attribute in body tag but not only).

Reproduce code (using www.msn.com since this site focusses the search textbox after document complete):

In a standard new VB Windows Forms Application (with Form1), drop a button (Button1) in the Form1 designer and this code in the code editor:
Public Class Form1

    Private wb As New WebBrowser

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click


    End Sub
End Class

Expected result from running the Application and pressing Button1:
The unbound and invisible WebBrowser control loads the msn page, the form Form1 stays activated.

Open a windows application form names in another

Hi, Now i am in a horrible situation. I want to create an application for open another application(exe) and display all the form names in newly opened application in a compobox.If we selected a compobox item,ie;a form name in new application opened,i want to display all the control names in that form... is it possible? we can do it in same application.but how can i do it in another application? thanks in advance   Anoop

Transfering Data from Windows form application to a website

Hello Friends I have a windows form application and i have to transfer the data from my forms that have been retrieved from SQL server database to a website. So that i can automate the data entry on the website. Can anybody please tell how should i go about doing this. Thanks & Regards, Syed

how do i create a windows form application login for to validate username and password from sql serv

 I would like to know how I can create a login form for my windows form application. The login form must be linked to a SQL server 2005 express edition database (in which the username and passwords are stored). The login form must validate the user using the database and allow them to access the program. 

Possible bug in WebBrowser Control realization in WPF and Windows Phone 7

Hello, I'm tried to make authentication component for russian social network Vkontakte.ru (vk.com). In russian forum nobody answered me. The proplem: When authentication is complete WebBrowser component must be redirected to page like: http://vkontakte.ru/login_success.html#session={%22expire%22%3A%221272008089%22%2C%22mid%22%3A%22100172%22%2C%22secret%22%3A%229c8d8f0305%22%2C%22sid%22%3A%221131703552161ae352a1256402e3140d7cbde41b1602a93d15472c82%22} In Windows Form application all works normal. But in WPF browser was redirected to http://vkontakte.ru/login_success.html Without #session.... It happened not only in WPF Applications, but even in Windows Phone 7. It is a bug? Or this parameter can be accessed from another place?

Windows form application, Visual basic 9

please give me vb 9 ( visual studio 2008 ) language example, to create shortcut on the desktop, from file notepad.exe which stored in c:\windows\notepad.exe

how to change the web application Database connection form Windows authentication to SQL Server acco

Hi, I have a web application created and Database connection authentication was given as Windows authentication. how can i change it to a SQL server account in MOSS 2007. Thanks in advance.

SelfHosted WCF Service in a Windows Form Application

Hey,   I have a simple console app that is a self hosted service and a second console app that acts as the client.  I can pass a message between the client and service.  Obviously for this to work the service has to stay up and running, so I put a Console.ReadLine(); command as the last line in the service console app to prevent the service from closing until the user presses enter. My problem is, I would like to (self)host the service in a windows form.  If, for example, I put the ServiceHost decleration in the form load method, the service does not stay open once the form load method is complete. Does anyone have any tips on how I can self host the service in a windows form application and keep the service alive?   Thanks ;o)

windows form control library error in asp.net

Can some tell me what is this problem?my windows form control library have the drag and drop.when i open in web, the below error pop out.

adding windows user control in asp.net application


hi fri i had created one user control in c# and i want to add this user control in asp.net application pl tel me how to do this

thanks in advance

A possible bug with redirecting RedirectStandardInput to console application from windows form (Win7


More info can be found on this post:



Basically when I attempt to redirect the standard input of a console application from windows form the console application crashes immediately.


When I use the exact same code from a console application everything works fine (this is what leads me to believe it might be a bug).


Here's the shortest code you need to reproduce the problem:


Process myProcess = new
myProcess.StartInfo.FileName = @"cmd.exe"
myProcess.StartInfo.UseShellExecute = false
myProcess.StartInfo.RedirectStandardInput = true


Please note the following:

1. When I change "cmd.exe" to "sort.exe" it works find on both console and windows form applications.

2. When compiling to windows application for 64 bit platform (or AnyCPU) the "myProcess.MainModule" throws an exception: {"Only part of a ReadProcessMemory or

WriteProcessMemory request was completed"}

3. Whe

Adding a SQL Server Table to Windows Form Application (c#)



I have created forms in the past that have connected to a SQL Server database and done a variety of manipulations.

This time I have a static table in SQL server that I want to add to the project and load into an array without having to connect to SQL Server i.e. the windows form application will have this datatable embedded within it so any user can use it. How do I add the table to the project in this way?

I know how to load the data into the array.




WebBrowser control, svg and WIndows 7


Hi, I have a problem with a WebBrowser control using C# 2.0 showing svg content.

The problem is the following:

I have a simple Form with a WebBrowser control in it. the link that i try to load is this: http://www.croczilla.com/bits_and_pieces/svg/samples/arcs1/arcs1.svg (just an example)

If I execute it on Windows XP, the control displays the svg correctly, while on Vista and Windows 7 it shows a blank page... anyone can tell me why?

To show svg I have installed the adobe svg viewer and I have IE8 installed too

Of course if I navigate to that page using directly IE8 everything works.

Thanks in advance for your help


Refresh datagridview in windows form application


I am having a main which will have 2 controls namely treeview and datagridview . I will have a form to be opened when user selects an option from treeview. My treeview will be as follows





If i click on the text file that was child to the root i will show the content of that file. But what i need is if right click on child i will have an option as NEW and i will get a new form. If i enter some values and click on save i will save them to the text file which was provided in the treeview at the same time i would like to show the user in the datagridview when the second form gets hide. Like that i can have multiple child forms what ever data i give there in the forms that should be shown to datagridview when the child form gets closed or hide

How should an SQL statement refer to a Text field value on a Windows Form Application?


In a WindowsFormApplication, I have a form that contains an MS Office Spreadsheet (an Office Web component).  The data source of the spreadsheet is  an Oracle table which is referenced in an SQL statement  - for example, the following works fine: 


I've now added a Text field (TextBox1) to the form and would like to have the SQL statement refer to the value of this field.  I've tried various syntaxes, including the following::


This generates an error (ORA00904: "HOST: invalid identifier)

I've also tried the following: 


This generates an error (ORA00904: "FORM1"."TEXTBOX1"."VALUE": invalid identifier)

I'd appreciate any ideas on what the correct syntax should be in referring to the Text field or whether or not this is even possible.


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?


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