Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Smooth transitioning between forms

Status
Not open for further replies.

RebLazer

Programmer
Jun 7, 2002
438
0
0
US
I am writing a VB.NET Windows app. So far, I have two Windows Forms: [tt]MainMenu[/tt] and [tt]Edit_select[/tt]. Not surprisingly, MainMenu is the name of the startup form. In class MainMenu (but outside of any of its subroutines), I have the following:[tt]
Public Shared menu_form As New MainMenu[/tt]

In the [tt]Menu_Load[/tt] ("Handles MyBase.Load") of MainMenu, I have the following:[tt]
menu_form = Me
Edit_select.es_form.Hide()[/tt]

Then in class Edit_Select, I have this:
[tt]Public Shared es_form As New Edit_select[/tt]

Here's my question: When that Hide() line executes, it's a very choppy transition between the two forms; the user can see one disappear, [pause], and the second form appear. Is there a smoother way to move from one form to the other?

Thanks very much,
Lazer
 
Maybe I worded it wrong and it didn't read quite right, but what i'm saying is, I had the problem of getting forms to switch, (i'm a bit new to VB), and I came across this URL and I know in my experience at least that this method does not exhibit the problems you are suffering, so although the URL comes at the topic from the angle of needing to do it in the first place and not solving problems with it once its done, it still may help you get what you want.
 
Bigfoot,

There is, in fact, database "action" going on after the SHOW command:
- add 2 parameters
- open connection if it is not already open
- fill a dataset from a sqldataadapter (the delay occurs even if the search is an exact match (i.e. select * from table where name = "John Doe" and there are only 8500 records)
- display the results in a listbox

Perhaps I am being overly demanding - is a 0.5 - 1.0 second delay (between forms) for the above events reasonable for a 1.8 ghz P4?

Thanks,
Lazer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top