VS 2010 Load Another Form When The User Closes The Current Form

Feb 26, 2012

I am after some code to load another form when the user closes the current form. I have tried this

[Code]...

View 14 Replies


ADVERTISEMENT

VS 2008 Make Main Form Inaccessible Until User Closes Dialog Box?

Apr 11, 2010

A program I'm developing launches dialog boxes to get information from the user. Right now, the user can still click on and manipulate the main form while the dialog box is open. How can I make the main form inaccessible until the user closes the dialog box?

View 2 Replies

DB/Reporting :: Cant Set Current Cell On Form Load

Jul 17, 2009

I am using this code at the last line of my form load. I want the position 5,5 to have the cursor set at it. It works when then datagrid is already open:[code]However, when I use it on the form load, you can see that it was selected on the datagrid, but the cursor is set at textbox1...which happens to have the first tab order on the form, even though I have acceptstabs off. Can anyone tell me why this would happen? Basically, it is setting the cursor at the cell I want, but after the form loads, it jumps to textbox1 and highlights the text.

View 1 Replies

Irregular Shaped Form With No Borders Moving Across The Screen Until From Within The Loop The Form Closes?

May 26, 2012

I tried it every way I can think off, but nothing can stop it .

View 7 Replies

VS 2010 : Load A Child Form By Default In MDI Parent Form?

Jan 23, 2011

I want to load a child form which is a login form by default when the parent form is loaded.Right now when I click new file on the toolbar of the parent form, then only the login form is loaded but i want it be loaded by default without clicking anything.

View 10 Replies

Create New Instance Of A Form That Does Not Close Then The Parent Form Closes?

Oct 28, 2009

I have been making a webbrowser for a while now, everything works well, except i am unable to make the 'open in a new window' button work right. So far i have managed to get a new instance of my form to open with the right url, but i am unable to keep that new form open when the orginal parent form closes.

Code:

Private Sub WebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow
e.Cancel = True
Dim Href As String

[code]....

View 2 Replies

VS 2010 Load The Splash And Login Form Twice And Mdi Form

Aug 1, 2011

I have a code which when used, firstly application will run the Splash Screen application. Splash Screen will be active for several second, and then the main of application will show in full screen. Before the user use the application, user must Log in first. This works but the problem is that it loads the splash and login form twice. To worsen the situation, the second login form that appears gives access to the system even when the cancel button is clicked while the first login form just works fine. My codes for the three forms are as listed below:

[Code]...

View 6 Replies

Load A Form After User Is Validated?

Feb 28, 2011

I need to load a form call formok after the user is validated by the Computername that is stored on a table. I have all the code for that just need the part to load the form call formok. I have the code running in a module called modUserName

Function fOSUserName() As String
' Returns the network login name
Dim stDocName As String

[code].....

View 3 Replies

On Form Load Want To Provide User With 3 Options?

Nov 12, 2011

creating a simple pong type game. want to provide human user option to choose from "rookie , Veteran, Allstar" as CPU AI skill.

Q1 - currently on form load game starts (I do not want) I want to present list of options first. Player Skill Level *See above.

Q2 - Want to provide an option for who gets the ball first CPU or Human

Q3 - Want to choose "Game to #" the user can set as the first to score x points wins.

View 6 Replies

Resize A Form On Load To Fit To The User's Screen

Apr 7, 2009

I'm trying to figure out how to resize a form on load to fit to the user's screen. Many of my users are on laptops, or split screens between laptop and monitor..I remember in VB6, it was something like form.height = screen.height (or something of the sort)... but I can't find this functionality in VB.NET 2008. I'm also trying to wrap everything (multiple screens/forms) into one app, so I wanted to know if anyone was aware of any tutorials on form parent/child relationships... I don't want to keep opening and hiding forms individually without having them packaged in one work area....

View 9 Replies

VS 2005 - Form Load - Retains The Previous Values During The Form Load

Jul 27, 2009

Imports System.Data
Imports System.Data.OleDb
Public Class Form1
Dim con As OleDbConnection
Dim cmd As OleDbCommand


[CODE]...............

The insertion part of the form works great. But my problem is in the form load part......If i leave a field blank(Null),then perform Save operation,close the form after successful insertion and then reopen the form,then it retains the previous values during the form load......This is only in case where i leave a field blank in the previous data entry in the database.......But if i enter values in all fields then form load is working great.

View 2 Replies

Create A Form That Allows A User To Load An Input File?

Dec 8, 2009

how to create a form that allows a user to load an input file? I'm assuming a form like a windows explorer window will be too difficult, or not? If it is then I guess I could just put a textbox on the form and ask the user to input the directory with file name.

View 5 Replies

Forms :: Dynamically Load User Control In A Form?

Apr 26, 2011

I dynamically load a user control in a form (Form 1).

In my user control there are two things :

a Textbox (TxtBox1) and a Command Button

WHen the button is clicked, it opens a new form (Form 2) Form2.ShowDialog()

My question is, in Form 2, how can i set a value to TxtBox1 of the user control?

View 2 Replies

When Form Loads It Load The Current Date And Time But The Time Does Not Change It Should Run?

Aug 24, 2010

I am using this line of code on form load event it is working very fine but i have to problems

1. It replaces the form name and display the date and time but i want to keep both date and time and forms caption separated by some space.

2. When form loads it load the current date and time but the time does not change it should run.

What should i do please please help me code is as follows

Me.Text = Date.Now.ToLongDateString & " - " & TimeOfDay

View 11 Replies

VS 2010 Open One Form And Close The Current?

Jun 1, 2011

I have this button to open one form, and close the current form. When i click the button, the opened form closes and the program closes. In the button code, i open the one form, and in the one form's FormLoad is to close the first form.

View 2 Replies

VS 2005 : Load A Form And Allow It To Run It's Code In The Form Load But Keep It Not Visible?

Dec 14, 2009

How can I load a form and allow it to run it's code in the form load but keep it not visible. I want it to do what it needs to but but not display.

View 3 Replies

VS 2010 When The Client Closes Sockets The Server Closes As Well

Apr 9, 2012

I have a small problem with sockets (I'm new to sockets). Below is the code I'm using. The problem is that when the client closes, the server closes aswell. How do I stop it from doing that?

[Code]...

View 1 Replies

As The New Form Opens Up Everything Closes?

Jan 23, 2010

when you login it is the meaning that another form opens. But as soon as the new form opens up everything closes. The code i used is this:

Public Class Form1
Public Goldhave As Integer
Public UserName2, Password As String

[Code].....

View 4 Replies

Detect That A Form Closes?

Jun 10, 2012

I have one form which stays open, and lots of other forms which can are opened and closed regularly how can i detect that a form has closed on the main form?

View 6 Replies

Form Closes And Update Other

Feb 9, 2011

Iīm new here, so excuse me if this is the wrong area. I've already read about this in this forum, but it didnīt kill my doubts. I have an form, called AddInstrPadr, wich is created by the MdiParent:

[Code]...

View 9 Replies

Form Closes Down As Soon As It Opens

Jun 22, 2010

When opening a button and opening a new form as soon as it opens it close for some reason but its not giving any errors as to why its doing this now I've checked the linked linking it to the next form that's fine.

Private Sub PrintPerscription_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Login.con.Open()
sql = "SELECT Patient.* FROM Patient where Patient.Wardno = " & Login.WardNo.ToString
da = New OleDb.OleDbDataAdapter(sql, Login.con)
noOfRows = da.Fill(dsPatient, "Patient")
[Code] .....

View 6 Replies

Form Closes From ResultDialog?

May 2, 2009

I have the following code so the user must confirm cancel action, however the form closes on both yes/no action.why the form does not remain active when the result = no?

Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
Dim resultDialogue As System.Windows.Forms.DialogResult
resultDialogue = MessageBox.Show(

"Do you want to cancel the Add Worker function?", "Confirm Cancel", MessageBoxButtons.YesNo, MessageBoxIcon.Question)

If resultDialogue = Windows.Forms.DialogResult.Yes Then

ClearDtls()
Me.Close()
End If
End Sub

View 8 Replies

When Using 'exit Sub' Whole Form Closes

Jun 13, 2009

i'm using exit sub when a certain condition does not meet. but the problem is that the form closes. it should not close the form, instead, it should only exit from a click event. I'm using VB2008Express Edition and MS Access at the back end.[code]

View 4 Replies

VB 2010 Form Load And A TimeMaskedTextBox?

Apr 17, 2011

I have a form in design view and when the form loads, I want the TimeMaskedTextBox to show the time now. But allow the user to change the time for later time in the day.

Let's say the time now is: 09:00 and the user wishes to change time to: 22:00 and when the form is saved, And a new form is loaded then the TimeMaskedTextBox will go back to the time now. How would the code be written.

View 5 Replies

VS 2010 Event Before Form Load?

Apr 30, 2011

so I have the following

Try
Dim username as String = My.Application.CommandLineArgs(0)
Dim password as String = My.Application.CommandLineArgs(1)
Catch
Msgbox("Cannot launch")
Application.Exit
Exit Sub
End Try

I placed this in the form's load event. What I want is for this check to run before the form even loads.If an error occurs, the msgbox comes up and the form is never seen. When I try the code now, the form comes up the msgbox shows. When the user clicks OK the form closes. I tried placing it in the form's designer but the designer tries loading the form any way. How do I get this check to run before the form shows?

View 2 Replies

VS 2010 Form Load Event In .Net?

May 2, 2010

I am making the Transition to VB.Net (using VB.NET 2010 express) and I have a simple problem that is driving me crazy. I wish for my Form when it Loads, initialise and then call a sub and do some stuff eg perform a plot. If i place a button on the form and click it the sub works fine.This task was simple to do in VB6 but for the life of me I cannot get it to work in VB.NET. Has the Form-Load event changed in some way with .Net?

View 4 Replies

VS 2010 Form Load Event?

Mar 6, 2012

I have a calculation project with 6 forms. The last form shows all the input and output data from the previous forms. This is accomplished in form6 load event. Form6 contains about 40 controls (mostly textboxes, labels and few pictureboxes), populated in this way:Textbox1.Text = Form2.Textbox3.Text, etc.I am not sure if this is a good practice. I know I can use the DGV, but it does not suit me because of the graphical reasons.

View 1 Replies

VS 2010 Load Form But Don't Display It

Jun 12, 2012

I have an app where there's an edit form and it loads a bunch of stuff into comboboxes which takes half a minute to load the first time. Once it's loaded I keep the instance of the form and just hide it instead of disposing it until the app exits. What I would like to do is in the Sub Main of the app (there is no startup form) I would like to launch a new thread and load that form into memory, but I don't want the form to be displayed at that time, what's the best way to do this?

View 10 Replies

VS 2008 Close Current Form And Show Different Form?

Sep 4, 2009

When I use

Me.Close()
Form1.Show()
It closes the whole app.

How would I change it so that it only closes the current form while opening a new one? EDIT: I put [Not Resolved] Because I accidently pressed the resolved thing

View 8 Replies

Application Closes When Close A Form?

Apr 6, 2009

I have a problem here I hope someone can help me out. I have this application in which I show information about workplans. It has a Main Form which show the general information and the activites that are going to take place during the execution.

The application has the ability to "attach" documents to the activities. I have created another form (and MDI form) that I use to show the documents (pdfs) when a user clicks on one of the documents attached. The problem is that when I close the form that shows the documents, it ends the application and I don't know why. It should just close and leave me again with the Main Form. Can someone tell me why is this form terminating the app. Is it because is MDI or what?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved