Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Edit Window - automatic maximize
Message
From
20/10/2005 10:59:31
 
 
To
20/10/2005 10:22:53
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01060411
Message ID:
01060725
Views:
12
This message has been marked as a message which has helped to the initial question of the thread.
I changed whole EditFile method to this:
PARAMETER llistboxclick

LOCAL i,j
DECLARE INTEGER LockWindowUpdate IN Win32API INTEGER nHandle
LockWindowUpdate(_VFP.hwnd)

IF TYPE("THIS.oFiler")#"O" OR ISNULL(THIS.oFiler) OR;
   THIS.lstFiles.ListCount=0 OR THIS.lstFiles.ListItemID=0
   LockWindowUpdate(0)
   CLEAR DLLS LockWindowUpdate
   RETURN
ENDIF

IF !llistboxclick
   * User clicked Edit button, check for multi-selects
   FOR i = 1 TO THIS.lstFiles.Listcount
       IF THIS.lstFiles.Selected(m.i)
	  FOR j = m.i TO THIS.oFiler.Count
	      IF THIS.oFiler.Item[m.j].Path+THIS.oFiler.Item[m.j].Name = ;
		 THIS.lstFiles.List(m.i) AND FILE(THIS.lstFiles.List(m.i))
                 THIS.oFiler.Item[m.j].Edit
                 ZOOM WINDOW (WONTOP()) MAX
	      ENDIF
          ENDFOR
       ENDIF
   ENDFOR
ENDIF

IF THIS.oFiler.Count = THIS.lstFiles.ListCount AND ;
   FILE(THIS.lstFiles.List(THIS.lstFiles.ListItemID))
   THIS.oFiler.Item[THIS.lstFiles.ListItemID].Edit
   ZOOM WINDOW (WONTOP()) MAX
ELSE
   FOR i = 1 TO THIS.oFiler.Count
       IF THIS.oFiler.Item[m.i].Path+THIS.oFiler.Item[m.i].Name = ;
	  THIS.lstFiles.List(THIS.lstFiles.ListItemID) AND ;
	  FILE(THIS.lstFiles.List(THIS.lstFiles.ListItemID))
	  THIS.oFiler.Item[m.i].Edit
          ZOOM WINDOW (WONTOP()) MAX
          EXIT
       ENDIF
    ENDFOR
ENDIF
LockWindowUpdate(0)
CLEAR DLLS LockWindowUpdate
And it works here. Only caption of the screen flickers.

>Thanks for the idea Borislav, I tested it but received the same results.
>
>
>>Did you tryed to lock whole windows update?
>>I saw this code here in UT. Unfortunately I can't remember who posted it, I just remember the function:
>>
>>   IF THIS.oFiler.Item[m.j].Path+THIS.oFiler.Item[m.j].Name = ;
>>      THIS.lstFiles.List(m.i) AND FILE(THIS.lstFiles.List(m.i))
>>      THIS.oFiler.Item[m.j].Edit  && I want this window maximized automatically
>>      DECLARE INTEGER LockWindowUpdate IN Win32API INTEGER nHandle
>>      LockWindowUpdate(_VFP.hWnd)
>>      ZOOM WINDOW (WONTOP()) MAX
>>      LockWindowUpdate(0)
>>      CLEAR DLLS LockWindowUpdate
>>   ENDIF
>>
>>
>>
>>>Fabio,
>>>
>>>Have you tried this in the editfile method of filer.scx? It works, but there is an aggravating screen flash while the first smaller window appears and then a flicker when it zooms to max. Since I only use this myself inhouse, not a big deal, but getting rid of the flicker and flash would be nice. I am running this hundreds of times a day while I make program modifications. For quick locating of text in prgs (and reviewing the prg and editing if necessary) I prefer this to code reference. I tried using lockscreen before and after the .edit and zoom lines to no avail.
>>>
>>>
>>>>>In the code below (from editfile of filer.scx), when edit is called, I would like the edit window automatically maximized. What is the best way to do that? I tried KEYBOARD '{CTRL+F10}' and SET MEMOWIDTH, etc to no avail.
>>>>>
>>>>>
>>>>>IF THIS.oFiler.Item[m.j].Path+THIS.oFiler.Item[m.j].Name = ;
>>>>>    THIS.lstFiles.List(m.i) AND FILE(THIS.lstFiles.List(m.i))
>>>>>    THIS.oFiler.Item[m.j].Edit  && I want this window maximized automatically
>>>>     ZOOM WINDOW (WONTOP()) MAX
>>>>>ENDIF
>>>>>
>>>>>
>>>>>TIA,
>>>>>Tracy
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform