***** BEGIN ShowWindow API Test ***** #Define SW_HIDE 0 #Define SW_MAXIMIZE 3 #Define SW_MINIMIZE 6 #Define SW_RESTORE 9 #Define SW_SHOW 5 #Define SW_SHOWDEFAULT 10 #Define SW_SHOWMAXIMIZED 3 #Define SW_SHOWMINIMIZED 2 #Define SW_SHOWMINNOACTIVE 7 #Define SW_SHOWNA 8 #Define SW_SHOWNOACTIVATE 4 #Define SW_SHOWNORMAL 1 *#beautify keyword_nochange Declare Integer ShowWindow In user32 As ShowWindowA; INTEGER nHWnd,; INTEGER nCmdShow *#beautify Public oForm1,oForm2 oForm1 = Createobject("MyForm1") oForm1.AddObject("Command1","Mycmd1") oForm1.AddObject("Command2","Mycmd2") oForm1.AddObject("Command3","Mycmd3") oForm1.Show oForm2 = Createobject("MyForm2") Read Events Define Class Mycmd1 As CommandButton Caption = 'ShowWindow' Left = 60 Top = 150 Height = 25 Width = 100 Procedure Click oForm2 = Createobject("MyForm2") oForm2.AddObject("Command4","Mycmd4") ShowWindowA(oForm2.HWnd, SW_SHOWNORMAL) Enddefine Define Class Mycmd2 As CommandButton Caption = 'Form.Show' Left = 180 Top = 150 Height = 25 Width = 100 Procedure Click oForm2 = Createobject("MyForm2") oForm2.AddObject("Command4","Mycmd4") * Mostrar formulario "normalmente" oForm2.Show Enddefine Define Class Mycmd3 As CommandButton Caption = 'Exit' Left = 300 Top = 150 Height = 25 Width = 100 Procedure Click Clear Events RELEASE oForm1, oForm2 Enddefine Define Class Mycmd4 As CommandButton Caption = 'Close' Left = 300 Top = 150 Height = 25 Width = 100 Procedure Click ThisForm.Release Enddefine Define Class MyForm1 As Form Caption = "Test of ShowWindow API" Left = 10 Top = 10 Height = 200 Width = 420 Procedure QueryUnload Clear Events PROCEDURE Activate ThisForm.SetAll("Visible",.T.) Enddefine Define Class MyForm2 As Form Caption = "MyForm" AutoCenter = .T. Height = 200 Width = 420 Procedure QueryUnload Clear Events PROCEDURE Activate ThisForm.SetAll("Visible",.T.) Enddefine ***** END ShowWindow API Test *****