Program hangs at start

Simple beginning of a project. Two windows. The first has five buttons on it. The second has text controls and labels. I want the program to open the first window, then open the second when I click a particular button.
The only code so far is in the first-window button’s Action method – Window2.Show
Right now the program won’t do anything except hang. The first window does not show.
What am I missing?

What does the debugger say? :slight_smile:

Do you have Window1 set as the App.DefaultWindow? Either do that or add window1.show in the App.open event.

Yes, Window1 is the default window.

The debugger also hangs.

That’s odd. If you simply create a new project and hit run what happens?

Basically the same thing - the debugger hangs.

Describe what happens. ‘Hangs’ means different things to different folks.

What version of Xojo? What’s your OS and version?

Maybe offer the source for Download?

OK - Windows 10, Xojo 2015 R3, Project can be downloaded here, if you wish:
http://www.rolandf.info/E-News.xojo_binary_project

“Hang” means the program spins until it times out (debugger) or I reboot the system (compiled). Nothing shows up in the Task Manager.

For what it’s worth, window1 pops right up for me in OS X and Windows 7.

It works here under Win 8.1.
Does turning off “Custom Color” or changing “Placement” to “Default” have any effect? I haven’t had much experience with Win 10, but that would be the first things I would try, though it shouldn’t cause a problem.

Hmm… I’m not sure if it would make a difference, but rename your application instance back to just “App”. See if that helps…

+1

I tried it in Windows 10 (without changing the app name) and window1 opens right up at the start for me.

I had no problem running it in Window 10 (no modifications). So I’m not sure what’s causing your freezing issue.

One thing I noticed is that you have code in the Window Activate events. For the things you’re doing you should put that in the Open event. The problem with using Activate is that every time the window comes to the forefront the Activate code runs. I’ve rarely seen instances where you really need that.

New behavior - not since recent changes; I just realized it changed a while ago. Now the debugger just starts to compile and stops.
Changing application name to “app” makes no difference. Changing color and placement to defaults also do nothing.
I’m going to abandon this attempt and go another way, which seems to be working so far in a new clean project – forget Window1 and start with Window 2.
Thanks to all of you who wanted to help. Some things just need to be bypassed, I guess.

I will throw this out there since you appear to be new to Xojo. I have 62 hours of Xojo Training Video available to subscribers at http://xojo.bkeeney.com/XojoTraining/. This is over 200 individual videos and most come with source code. We have two complete start to finish desktop projects and one start to finish web application. One-on-one training is available too.

Bob, I’m not new to Xojo - been using it for years, with at least a score of well-working programs behind me, some of them pretty complex. I just posted here because it looked like a beginner’s sort of a problem I was having.

Oops. Sorry about that.

Interesting
I wonder if this is your virus checker or something blocking it from launching
There’s nothing wrong with the project otherwise
Downloaded it and ran it in Windows 7 and 10 without alteration

That the process never shows in the Task Manager makes me suspect that