Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / FoxPro, Visual FoxPro [игнор отключен] [закрыт для гостей] / Помогите с создаением окон FOXPRO 2.6 / 8 сообщений из 8, страница 1 из 1
17.03.2004, 12:29
    #32445177
.reset
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Помогите с создаением окон FOXPRO 2.6
Работал с фокспро лет 6-7 назад потому совершненно сбит с толку.
В общем идея примерно как в стандартном примере фокс 2.6 accnts.app (../foxpro26/sample/accnts.app)
Есть две таблицы. Первая - заголовок, вторая - позиции. Нужно делать движение по первой и в соотв окне выводить все что попадает под определенное условие.
я третий день не могу окно с browse виесеть постояянно и отображать данные из второй таблицы.
Навигация по первой таблице в другом окне.
...
Рейтинг: 0 / 0
17.03.2004, 12:47
    #32445221
Urri
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Помогите с создаением окон FOXPRO 2.6
Первая таблица отображается как форма с read-ом?

Тогда тебе поможет вот это.

--------------------------------------------------------------------
The information in this article applies to:

- Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a
- Microsoft FoxPro for Windows, versions 2.5 and 2.5a
--------------------------------------------------------------------

SUMMARY
=======

Although the FoxPro Screen Builder allows a data input screen to be
combined with a separate Browse window, the GET fields of the data input
screen and the information in the Browse window cannot be combined in a
single window. However, the screen can be programmed so that the GET fields
and the browse information appear to be in a single window, as explained
below.

MORE INFORMATION
================

This example is designed to get fields from a parent file and browse fields
from a child file. To use this example for a single database, remove all
lines of code referring to the child database. The steps below create a
total of three windows:

- The first window, WBIG, is a large window with a border that acts as a
visual frame around the GET screen and the Browse window.

- The second window, WGETS, contains the GET and SAY fields for the data
entry window. It does not have a border.

- The third window, WBROWSE, contains the browse information.

NOTE: The actual screen coordinates of the windows matter only insofar as
WGETS and WBROWSE are contained within WBIG.

To create these windows, do the following:

1. Use the Screen Builder to create a screen.

2. From the Screen menu, choose Screen Layout and type "WGETS"(without the
quotation marks) as the screen name.

3. Use the following snippet as the screen's Setup code:

SELECT 0
USE parent

* Remove next 4 lines for a single database example
SELECT 0
USE child
SELECT parent
SET RELATION TO keyfield INTO child
****************************************************

DEFINE WINDOW wbig FROM 1,1 TO 22,80 DOUBLE
DEFINE WINDOW wgets FROM 0,5 TO 8,75;
IN WINDOW wbig NONE
DEFINE WINDOW wbrowse FROM 9,0 TO 20,80;
IN WINDOW wbig NONE

ACTIVATE WINDOW wbig

**********************************************
* To have the browse window come up as the active
* window, place the next three lines in the
* READ WHEN code snippet and remove the NOWAIT
* clause from the BROWSE statement
***********************************************

SELECT child
ACTIVATE WINDOW wbrowse
BROWSE IN WINDOW wbrowse SAVE NOWAIT
*****************************************

SELECT parent
ACTIVATE WINDOW wgets

4. Use the following snippet as the screen's Cleanup code:

RELEASE WINDOW wbig, wbrowse

5. Define some fields in the screen. Because the WGETS window has been
defined as eight lines high, these fields should be located in the first
eight rows of the screen. If fields are defined beyond this point, a
"Position off screen" error will be generated when the .SPR program is
run.

6. When you are generating the screen, make sure that the Define Windows
check box in the generator options is not selected. In FoxPro for MS-
DOS, this check box is located on the right side of the Generate dialog
box under Code Options. In FoxPro for Windows, this check box is
displayed when you choose the More button in the Generate dialog box.

Switching Between the Screens
-----------------------------

Two keyboard methods can be used to switch between the Browse window and
the GET screen:

- CTRL+F1 can be used to cycle through any open windows. To use this
keyboard shortcut, the FoxPro System menu, or a menu using the system
menu bar _MWI_ROTAT with a shortcut key of CTRL+F1, must be currently
defined in memory. The menu must be accessible by setting SYSMENU to ON
or AUTOMATIC. If other windows are currently open, pressing CTRL+F1 may
cycle through these unrelated windows.

-or-

- An ON KEY LABEL command can be defined to switch between the two
windows. To do so, add the following code to the following code
snippets:

- In the Setup code, add the following code as the first two lines of
code:

SET SYSMENU ON && Enables CTRL+F1 to switch
ON KEY LABEL f2 DO switchwin && Enables F2 to switch

- In the Cleanup code, add the following code as the last lines of
code:

PROCEDURE switchwin
IF WONTOP('wgets')
SELECT parent
ACTIVATE WINDOW wbrowse
ELSE
SELECT child
ACTIVATE WINDOW wgets
ENDIF

In this example, the F2 key is used to switch between windows using the
procedure SWITCHWIN. This procedure determines which window is currently
the active output window and activates the other window. This method does
not require access to the menu bar, and will cycle only between the GET
screen and the Browse window.

Additional reference words: 2.00 2.50 2.50a one read GETS
...
Рейтинг: 0 / 0
17.03.2004, 12:50
    #32445230
Urri
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Помогите с создаением окон FOXPRO 2.6
Остальное предоставляю додумать самому.
...
Рейтинг: 0 / 0
17.03.2004, 13:04
    #32445269
andrew_Pr
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Помогите с создаением окон FOXPRO 2.6
Минимальный набор джентельмена для этой задачки:
Код: plaintext
1.
2.
3.
4.
5.
6.
select  0 
use Detail order tag MasterID
browse nowait
select  0 
use Master
set relation to ID into detail
Browse nowait

а дальше должен быть Read, чтобы процедура не продолжалась дальше,
а ждала пока юзер не поработает в brows-ах и не нажмет кнопку
(или пунк меню) [Закрыть]
...
Рейтинг: 0 / 0
17.03.2004, 13:20
    #32445321
.reset
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Помогите с создаением окон FOXPRO 2.6
Спасибо буду разбираться ...
...
Рейтинг: 0 / 0
17.03.2004, 23:36
    #32446310
Sergey Ch
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Помогите с создаением окон FOXPRO 2.6
Но если есть возможность, то лучше сделать подобные вещи на VFP 6.0...8.0 - гораздо проще. Сэкономите время и нервы...

Извините, если что не так.
...
Рейтинг: 0 / 0
18.03.2004, 13:00
    #32447102
.reset
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Помогите с создаением окон FOXPRO 2.6
Я бы с удовольствием писал это на чем-нить другом, но выбор фокспры обьясняется х386 машиной, да и казалось что знаний от прошлого опыта программирования будет больше ;)
...
Рейтинг: 0 / 0
19.03.2004, 00:03
    #32448290
Sergey Ch
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Помогите с создаением окон FOXPRO 2.6
To: .reset

Так это не проблема! Возьмите VFP 3.0а (под Win 3.1) - он работает на 386 вполне сносно а возможности уже довольно обширные... Я так поступаю с бедными клиентами, хотя 486 будет пошустрее... А так с окнами на 2.6 "геморой" говоря по русски... Пожалейте себя хоть немного...
Удачи!
...
Рейтинг: 0 / 0
Форумы / FoxPro, Visual FoxPro [игнор отключен] [закрыт для гостей] / Помогите с создаением окон FOXPRO 2.6 / 8 сообщений из 8, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]