.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

C#Net2008 Window Application - F5 launch wrong FORM

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

Hullo Good Friend,

I encounter another interesting problem.

I need your help. Please help me.

I am writing a new C#Net2008 Window Application. The first FORM that was created is FrmSales.cs

Then I created another FORM FrmMainMenu.cs which is the Main Menu form with 6 command buttons to load other forms.

When I pressed F5 to launch the application, FrmSales.cs appears instead of FrmMainMenu .

What must I do to make FrmMainMenu the initial form to lauch. Which provide menu options for the user to select and load other specific FORM.

View Complete Post

More Related Resource Links

problem in consuming WCF service through Window application


I have a silverlight application and WCF service all made in VS 2010 , i had hosted my site to web server which contain Window 2008 and IIS 7.0

now the problem is i have another application which is a window application developed in VS2008 , when i try to add the service reference it gives me error


The document at the url was not recognized as a known document type.

The error message from each known type may help you fix the problem:

- Report from 'DISCO Document' is 'There was an error downloading 'http://dev_qa.emspa.com/HRDev3/Service.svc?disco'.'.

  - The request failed with HTTP status 400: Bad Request.

- Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from '' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

Metadata contains a reference that cannot be resolved: ''.

Content Type application/soap+xml; charset

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

click a button to print current window form

how can i click a button to print current window form? i don't know how to set and define something? anyone give me example for my reference   thanks.

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. 

Need Form Application to allow user to review spreadsheets and email

I need an application to allow a user to see a list of documents/spreadsheets in a directory, click a link to the file, have it open, then review it, close it, then from the form choose to accept or deny it, then have it emailed to a recipient contained in a db or list any good ideas how to accomplish this?  maybe a windows form?    

How to get what application is connected to the topmost window?

My VB.NET application is suposed to monitor what application currently is running in the topmost window. I have tried the following approach using a timer: Declare Function GetActiveWindow Lib "user32" () As System.IntPtr Declare Function GetForegroundWindow Lib "user32" () As System.IntPtr Public Declare Auto Function GetWindowText Lib "user32" _ (ByVal hWnd As System.IntPtr, _ ByVal lpString As System.Text.StringBuilder, _ ByVal cch As Integer) As Integer Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick    Dim Caption As New System.Text.StringBuilder(256)    Dim hWnd As IntPtr = GetForegroundWindow()    GetWindowText(hWnd, Caption, Caption.Capacity)    'Caption now holds the title of the topmost window End Sub By this I can see that for example Outlook or Internet Explorer is the topmost window as the name is in Window's title bar. However, if the user crates a new mail in Outlook the title of the window is "Untitled message" givning no hint of what application is running in the the window. How do I get what application is connected to the topmost window?p> Help is appreciated!

Javascript required to get a pop up window from new form.

Hello Team, Any help regarding this would be helpful. I have a new form. In that form when i go to the first field...it should open up a pop up window which would have a note in that. How is this possible. I think through javascript this can be possible. So please help me. Thanks in advance.

Disable redirector when Installing 32 bit application on Window 7- 64 bit

When I install my 32 bit apps on Window 7 - 64 bit, it redirects registries and data files.However, the current codes have hardcoded to read the regular location such as:"HKLM\Software\MyApps" and "\Program Files\MyApps"Is there a way that I can disable the director while install my 32 bit application to solve this situation?If yes, can someone please show me how to do so in c#?I found they mention about calling Wow64EnableWow64FsRedirection in Kernel32.dll.Thanks

How do you integrate a flex 4 application in a wpf window? (With Error)

I am trying to integrate a flex 4 application into a wpf application.   I am following an old forum post: http://social.msdn.microsoft.com/forums/en-US/wpf/thread/39d558c1-5a76-4aae-be57-6aec9b8bf319 as a guide but it doesn't work correctly. The first thing I did was create the windows form control to add the flash control, i added a com component at C:\Windows\System32\Macromed\Flash\flash10i.ocx and added the Shockware flash object to the form.  added a URL property so i could set the file it would play and saved the formcontrol as mycontrol.   Then in the wpf application, i added a reference to mycontrol and windowsformintegration. then in the mainwindow.xaml i added these two lines at the top  xmlns:ax="clr-namespace:mycontrol;assembly=mycontrol"  xmlns:wfh="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration" then in the grid i added   <wfh:WindowsFormsHost>             <ax:MyControl1 x:Name="FlexFlash" URL="fileurl.swf"></ax:MyControl1 >         </wfh:WindowsFormsHost> It compiles and runs but it doesn't actually display the application.... instread it stays blank.  Now to make sure that it's a valid url i posted it in a messagebox  and copy and pasted it into a

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.

Multithreading application to launch SSRS report muliple times

Hello, First of all, I am not a .net programmer but fortunately/unfortunately I have to create a scenario where I have to make multiple calls to SSRS report server. Is there a way to create a multithread web application whose threads will call the reports from the report server? I know how to execute a report from .net web application but I don't know how to do it when I have to launch many instances of the same report simultaneously. I believe that by creating multiple threads, I can make each thread to execute same report on report server. Moreover, I should be able to change the no. of threads (no. of threads should be the parameter) at the start of each execution. Since I am primarily a SQL developer and have no practical experience of implementing threading in .net, can anyone please help me out here? Regards.

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)

Wish to launch any program and keep it confined to my program's window

I would like to divide the screen into three columns: Left 25%, Middle 50%, Right 25%. I would then like to launch programs such as IE in the middle portion and have it stay confined to this area. Is this possible? For example: Is there a version of the exec() functions that allows such a behavior? Or is it possible to somehow "trick" programs I launch into believing the screen consists of only that middle area? 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