PC SOFT

WINDEV的在线文档

  • Overview
  • Use example
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Overview
In this example, the application must manage a video conference between two computers. This application allows you to:
  • view the video currently broadcasted by the web camera installed on the current computer.
  • view the video currently broadcasted by the web camera installed on the connected computer.
  • transmit the voice of the current user to the connected user.
  • hear the voice of the connected user.
Caution: The Conference controls are no longer supported from Windows Vista.
20版本和更高版本
From version 20, the Conference controls are supported in Windows Vista and later. If you want to use the Conference control with an earlier Windows version:
  1. Display the description window of the control.
  2. In the "GUI" tab, check "Use the TAPI 3.x API / Windows XP (for compatibility)".
  3. Validate.
20新版本
From version 20, the Conference controls are supported in Windows Vista and later. If you want to use the Conference control with an earlier Windows version:
  1. Display the description window of the control.
  2. In the "GUI" tab, check "Use the TAPI 3.x API / Windows XP (for compatibility)".
  3. Validate.
From version 20, the Conference controls are supported in Windows Vista and later. If you want to use the Conference control with an earlier Windows version:
  1. Display the description window of the control.
  2. In the "GUI" tab, check "Use the TAPI 3.x API / Windows XP (for compatibility)".
  3. Validate.

Use example
To develop this application:
  1. Create a blank window ("File .. New .. Window ").Create a blank window:
    • Clickamong the quick access buttons.
    • Click "Window" in the wheel that is displayed.The window for creating a new element is displayed: click "Window" then "Window".
  2. Create two Conference controls in this window ("Insert .. Control .. Conference control"). In our example, the first control is named "CONF_Reception" and the second control is named "CONF_Transmission".
    Note: WinDev automatically associates these two controls with the same stream. By default, the first created control is used to view the incoming video while the second created control is used to view the outgoing video.
    Create two Conference controls in this window: on the "创建" pane, in the "显示控件" group, expand "视频和拍摄" and click "Conference". In our example, the first control is named "CONF_Reception" and the second control is named "CONF_Transmission".
    Note: WinDev automatically associates these two controls with the same stream. By default, the first created control is used to view the incoming video while the second created control is used to view the outgoing video.
  3. Display the processes associated with the stream ("Code of associated stream" from the popup menu of one of the Conference controls).
    Reminder: The "Connection request from new stream" process is run when a new stream attempts to connect with the current application. This process accepts one parameter. To manage this parameter, a procedure is automatically declared in the "Connection request from new stream" process.
  4. Add the following code lines into the "Connection request from new stream" process:
    // Procedure used to detect a new stream
    // nStreamID is an integer variable containing  
    // the identifier of the detected stream
    过程NewStreamnStreamID
    // Find out the name of the caller
    CallerName字符串型数据库信息nStreamID.发送者名称
    // Accept the incoming stream?
    如果是否对话框CallerName+"would like to start a conference with you",...
    "Do you accept?")=是,那么
    数据流接受连接nStreamIDReception
    否则
    数据拒绝连接nStreamID
    结束
  5. In the window:
    • create a button named "BTN_Call" ("Insert .. Control .. Button"). This button will be used to connect the stream to a recipient.
    • create an edit control named "EDT_RecipientAddress" ("Insert .. Control .. Edit control"). This control will be used to enter the name of the person called.
    • create a button named "BTN_Done" ("Insert .. Control .. Button"). This button will be used to end the reception or the broadcast of a stream.
    • create an edit control named "EDT_UserName" ("Insert .. Control .. Edit control"). This control will be used to enter the name of the current user.
    In the window:
    • create a button named "BTN_Call": on the "创建" pane, in the "常用控件" group, click. This button will be used to connect the stream to a recipient.
    • create an edit control named "EDT_RecipientAddress": on the "创建" pane, in the "常用控件" group, click. This control will be used to enter the name of the person called.
    • create a button named "BTN_Done": on the "创建" pane, in the "常用控件" group, click. This button will be used to end the reception or the broadcast of a stream.
    • create an edit control named "EDT_UserName": on the "创建" pane, in the "常用控件" group, click. This control will be used to enter the name of the current user.
  6. Enter the following code in the click process of the "BTN_Call" button:
    // Specify the name of the caller
    Stream1..识别码=EDT_UserName
    // Connect the stream
    数据流连接Stream1RecipientAddress
    // equivalent to:
    // Stream1..Address = RecipientAddress
  7. Enter the following code lines in the click process of the "BTN_Done" button:
    // Disconnect the stream
    数据流断开连接Stream1

Note: To operate, this application must run on two different computers.