.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

Windows form.Handle

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :ASP.Net
I need to know the equivalent code for ASP.Net as like:In my windows application I write :Form frm = new Form();IntPtr hwndp = frm.Handle;Now my question is how can I achieve this value through ASP.Net code?

View Complete Post

More Related Resource Links

Windows authentication login form issue


Hi guys,

I have an application that requires windows authentication to login, the problem is that every time an user logs in under IE and win XP, the username is pre filled with the IP address of the server as instance and the username. I need to replace the server ip with  XXXX instance name instead of doing this manually.

Could anyone pleas help me out with this one?

Thanks in advance,


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

Possible to truly "scale" a Windows Form?

Hi all! I'm trying to think of a way to truly "scale" a Windows Form. I don't just mean resize the form and rearrange the controls accordingly; I mean really "Honey I shrunk the form!" type of shrink, including all text and graphics, as if they had been drawn on a Graphics object with a scale transform less than 1. Aero does this when it shows a shrunken window preview icon... that's exactly what I want, except I want it to happen to the window itself as the user resizes it. I know WPF can do this, but I need a way that'll work on a standard Windows Form without rewriting or massively re-engineering the UI. Any creative ideas? Thanks in advance! :-D

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

Unexplained Crash on .NET Windows Form, Potentially a Common Crash?

Hi, I have a continuous problem with a .NET Framework 3.5 Windows Form application crashing with the "...this application has performed an illegal error..." error message.  No errors are being caught through a Try-Catch (using a generic Exception, so to my knowledge it should catch any exception?) block throughout the application, so it appears to be something external.  At first we thought it may have been the users computer, but even after a replacement computer the same error continues.   I was just wondering if there are any common crashes which have any hotfixes etc. for .NET Framework 3.5? Or if anyone else has experienced anything similar?   Thanks

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. 

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

Windows Form Resolution Setting

HI I created one application in my laptop its working correctly but when i m trying to use that one in Desktop some part of application got hide in right side of screen. I faced this problem today when i was giving the Demo on my application in college. I dont know how to make the application which will run in any system without any resolution problem.       Please help me. My project is windows based. please help me............ Thanku......... 

time out stored procedure windows form

I have a form that runs kicks bulk copies data to a data base and then runs a stored procedure.  the problem I have is the stored procedure takes a long time and users have no way to know what is going on.  the app window freezes says not responding and then after a while it completes and moves on. is there a way to prevent the application from freezing and being marked as not responding?

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?

Reconhecer checkBox dentro de DataGridView em Windows Form com um evento checkedChange...

Então ... eu to com um grid e dentro tenho o checkBox... quando a pessoa selecionar ele vai deixar a linha amarela... quando tirar a seleção ele muda a linha... e caso fique selecionado ao apertar um botao de insert... o sistema vai cadastrar o que esta selecionado... mas nao consigo pegar os valores dentro do grid...

Integrate SSIS project in Windows Form

I have a windows form project in which I would like call a SSIS project passing 2 variables simlutaneously...How do I accomplish this?

Delphi Win32 MDI Parent with C# Windows Forms child form

I have created an assembly containing a form that i want created as a MDI child form in a Delphi Win32 application's MDI parent control. I can create the .NET form fine from my Delphi code. I can even use the Delphi window handle to let my .NET form be a child in the Win32 application by using the SetParent API. However minimizing the child form makes it disappear (instead of the regular minimize action for MDI children), and it also doesn't cause the MDI container to get scroll bars when you drag the child form under the edge of the MDI container. I have the feeling that the child form is not yet correctly aware that it is a MDI child. For instance, its MdiParent property is null. And i read somewhere that i might need to call some more Win32 API"s to hook everything up correctly. I can't, however, for the life of me not find which ones to call, and where to do it. Is there anyone here that is well versed in hooking up managed Windows Forms with native Win32 applications that can lend a helping hand?

windows form is not visible in windows service????

i am trying to open an windows form in my windows service OnStart() method but it is not opened can anybody help me my code is: protected override void OnStart(string[] args)         {             // TODO: Add code here to start your service.                         Thread t = new Thread(new ThreadStart(delegate             {                 Form1 f = new Form1();                 Application.Run(f);             }));             t.SetApartmentState(ApartmentState.STA);             t.Start();         }

How do I trap the minimize and maximize and restore events in a windows form?

Please help!   I can't figure out what event is fired when a user presses the minimize button on a windows form.  It doesn't appear to be in the list of event  in the events pane for the form.  Using VS2005 c#.   Thanks

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

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.
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