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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Display

Status
Not open for further replies.

FreddyHo

IS-IT--Management
Jul 2, 2001
20
0
0
HK
Hello,everyone

I'd tried to create a welcome form with a login box before entering the main program. The form is rather small (about 200x200) but when it is run, there is always a bigger window on the background occupying the whole screen area with "the login form" on top. It looks a bit arkward. Don't know to get rid of the background window/form (just show the small login form)! Helps are appreciated !
 
HI
**********************************************
** Method 1: To get rid of Main VFP(FoxPro) Window.
** In the Main.Prg include the code along with ....
SET SYSMENU OFF && to drop/hide the system menu
SET TALK OFF
** etc... Then add this code also..

WITH _screen
.WindowState=2 && you can decide what you want ..
.TitleBar=0
.BackColor=RGB(0,128,128)
.FillStyle=1
.Caption = "MyCaption"
ENDWITH
**********************************************
** Method 2: To get rid of Main VFP(FoxPro) Window.
**
MyForm.InitEvent
_SCREEN.VISIBLE = .F.
THIS.SHOW()
READ EVENTS
** set in the forms property sheet...(not thro code)
.ShowWindow = 2
.MDIform = .f.
.ALwaysOnTop=.t.


** For All other forms called from this form,
.ShowWindow = 1

2. Again, if the _screen is OFF, then when you do a PrintPreview, remeber to set _screenVisible = .t. before and reset it to false after the rpeview. Otherwise, the native PrintPreview by VFP which is always to SCREEN will not show up.
*********************************************************
** Method 3: In the login Forms.Init Event...

DODEFAULT()
WITH _SCREEN
.Height = ThisForm.Height
.Width = ThisForm.Width
.AutoCentre = .t.
.Top = 0
.Left = 0
ENDWITH
ThisForm.Refresh()
********************************************************
Hope this helps. ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Thanks for your prompt help, Ramani, it works fine!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top