If you start with the ideas like “don’t use form set” or “can not work without read events”, it won’t work. “Best Practices” are very good, but for me are only a good start or a place to get some ideas. I am always looking for new solutions and I like to share them.
I was expecting to find comments like why is working… I always try code from this web site because I like to learn all the time. Just try it, it takes maximum 5 minutes to create a blank form and make the settings. Use config.fpw with screen=off instead.Ĥ) I still can't see how this works w/o a read events. and doesn't prevent initial main foxpro window coming up. I like to know what do you find wrong.Ģ) For a window to be modal and yet show w/o main foxpro window it needs ShowWindow = 1ģ) Hiding main foxpro window is same as _screen.visible =. It is working fine, tested with vfp 6,7,9. It's a single line command itself.Ģ.in form WintowsType: Modeless, ShowWIindow: As top level formģ.in form "init" HIDE WINDOW "Microsoft Visual FoxPro" You don't write a new code for read events. If you know a way other than "read events" I would like to hear. Why lose resources when I can do it in so manny ways and more simple. and if I will need to use read events later for other reason, what should I do Write a new code for read events Hackers Guide to VFP 7 (still works for versions after that)Īnd also the big repository of information in the VFP Wiki.
(A.K.A., 'twould be too-nice if they were re-edited for VFP-9)Īlso, forums with compassionate fox-gurus have helped my "best practices" not a little.īesides Doxcpro777's good answer (I fully recommend those books plus many more from ), I would also recommend: 'KiloFox','MegaFox' (Akins,Kramek,Schummer), and 'HackFox7' (Tamar E Granor et al) seem "best practices" despite a few obsolete chapters. I will like to have a link or to know where to find or buy the "Best Practices by most people"
If you don't clean up properly you run the risk of leaving an invisible app running in memory (with _screen=off), that can only be killed through the Windows Task Manager. in code.Īlso you should read about, and use, ON SHUTDOWN for garbage collection and clean up code before closing. Besides Modal forms not being allowed as top form, Best Practices by most people indicate the use of simple forms, not formsets, which are more of a pain to work with.Ī config.fpw file with the line _SCREEN=OFF will take care of the flashing of the screen when issuing a _screen.visible=.f. It is working fine and you may use read events for other methods in form. You need to create a form set from menu and set the properties for form set: To use: Hide Window "Microsoft Visual FoxPro" That is all for a single form application. * A button in form click - "Close Application" button * Form.init (showwindow property is 2-toplevel) You need "read events" to start the event processing and to prevent the application's immediately ending (flashing and closing). Toplevel forms can NOT be modal (even if you set to modal it is ignored).
I set the window form properties as follows: When I click the execute, it just flash and the window form does not come out. I try Hide Window "Microsoft Visual FoxPro" and application.visible=.F. How do I make the screen form as the only window form shown on screen When I run the execute, the screen form is within the foxpro's screen. I have a project with one screen form only.
Posted: Visual FoxPro General, How to disable Foxpro screen? Index ‹ Visual FoxPro ‹ Visual FoxPro General