`

open_form,call_form,new_form 的区别

阅读更多
(一) 
   open_form是一个受限的封装过程,他可以产生一个新的form但不代替原来的form,在新的form启动后可以不把控制移动到新的form里面,也可以将输入焦点移动到新的form里面,用户可以在两个form之间导航。〕

open_form的调用格式
open_form(form_name,activate_mode,session_mode,data_mode,paramlist_id)
具体意思,
1) form_name 文件名以及路径。
2) activate_mode选择activate是打开新的form并且把输入焦点移入该form,选择no_activate是不移 动焦点,还在原来的form里面
3) session_mode是打开新的form的时候的会话方式,可选session和no_session,session创建新的数据库会话,no_session不产生新的会话,和原来的form享受一个session,这个时候原来form里面的commit,都有效果,该选项为默认值.
4) data_mode表示form 之间是否可以共享数据库(libraty data) 取值 no_share_library_data 不共享(默认) share_library_data  共享
5) paramlist_id是form中唯一的参数,次项可选

(二)
call_form于open_form有较大的区别,call_form是一个非受限过程,启动一个新的form后,焦点立刻  被转意到新的form里面,原form失去输入焦点,便的不可操作,只有等到新的form退出后在可以使  用原来的form
call_form调用格式
  call_form(form_name,display,switch_nemu,query_mode,data_mode,paramlist_name)

1) display 打开新的form是否隐藏原form hide 隐藏,no_hide不隐藏
2) switch_nemu 打开新的form,是否用新的form的菜单代替原来的form菜单 取值o_replace ,no_replace
3) query_mode shi 表示是否仅以查询方式新的form,no_share_only,不是仅以查询方式打开form(默认),query_only,以查询方式启动form
4) data_mode 表示form之间是否可以共享数据库(library data)(同上)
5) paramlist_name 表示form 之间传递的参数,为可选项

(三)
   new_form:启动一个新的form,新的form将完全取代原form,但退出新的form时,输入焦点直接退出到原form的父级 form或者其他启动原form的位置,在启动新的form之前,系统首先要从原form中退出,并且释放所占内存空间,然后加载新的form,如果原 form数据有变化,则在启动新的form的时候终止原form的用户操作,提示用户提交数据,然后在启动新的form
  new_form的调用格式
new_form(form_name,rollback_mode,query_mode,data_mode,paramlist_name)
1) form_name 文件名以及路径
2) rollback_mode 取值to_savepoint,no_rollback,full_rollback
3) query_mode 表示是否仅以查询方式启动新的form
4) data_mode 表示form之间是否可以共享数据库(同上)
5) paramlist_name代表form之间传递的参数,此项为可选项目!
分享到:
评论

相关推荐

    关于Access程序,A程序调用B程序的例子!

    B.DoCmd.OpenForm "from1", acNormal, , "编号='" & Me.编号 & "' ", , acWindowNormal B.Forms("form1").SetFocus Dim lpPoint As POINTAPI Call GetCursorPos(lpPoint) Call SetWindowPos(GetParent(B....

    Access程序A调用 AccessB的功能 B

    B.DoCmd.OpenForm "from1", acNormal, , "编号='" & Me.编号 & "' ", , acWindowNormal B.Forms("form1").SetFocus Dim lpPoint As POINTAPI Call GetCursorPos(lpPoint) Call SetWindowPos(GetParent(B....

    VB电子相册

    Set conn = New ADODB.Connection conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _ & App.Path & "\data\pic.mdb" conn.Open End Sub 2、登录模块 Dim loginTimes As Integer ...

    softap_ap6212a0_tinav2.1_验证通过_旧版本的系统_20170915_1223没有外层目录.7z

    旧版本版本的全志R16平台的tinav2.1的系统打开softAP 2017/9/14 17:25 版本:V1.0 1、原始编译: ...rootroot@cm-System-Product-Name:~$ cd /home/wwt/ ...rootroot@cm-System-Product-...$(eval $(call nf_add,IPT...

    ddl语言自定义数据库字段

    1) end if Call gRsClose() '将字段相关信息添加到从表 sSql = "select * from "& tableName &" where 1=1" Call gRsClose() oRs.Open sSql,oConn,1,3 oRs.AddNew() ...

    DataGrid分页

    VB中新建工程,form中添加DataGrid控件,按钮cmdPrevious和cmdNext,文本框txtPage ''引用microsoft active data object 2.x object library Option Explicit Dim conn As ADODB.Connection Dim lCurrentPage As ...

    ehlib_vcl_src_9_3.26

    To do this, open the IDE, compile and launch a major demonstration project .\Demos\MainDemo\Project1_XE2.dpr Read next file for full instructions of working with the library components: .\Hlp\ENG\...

    TeeChart2018ActiveX_0_2_9Eval3264

    That will call the new Series method that returns the Series Interface (just as the predecesor property did). The Series property has been name changed to aSeries, retaining its DispId to ...

    VB.NET Developer's Guide(4574).pdf

    using the Call statement. It makes the code much more readable and is a new standard for VB programmers that is consistent with the standard that nearly all other languages adopted long ago. 153_VBnet...

    BCGControlBarPro.v12.00

    BCGPGridExample: added new visual managers and new 2 tabs: "Drag and Drop" and "Easy Input" BCGPIE7Demo: the tab control was fully redesigned and derived from the library MDI Tab control. ...

    vb 用MSCOMM 与 功率计 通讯例子

    Set xlBook = xlApp.Workbooks.open(mulu) '打开EXCEL工作簿 Set xlSheet = xlBook.Worksheets(1) '打开EXCEL工作表 mline = xlSheet.Cells(1, 22) + 1 End If Timer1.Enabled = True Exit Sub start2: ...

    asp连接数据库代码实例

    rs.addnew rs(\"name\")=name if content<>\"\" then rs(\"content\")=content else rs(\"content\")=null end if rs(\"date\")=date() rs.update rs.close set rs=nothing response.write \...

    文本播放器

    Dim myword As New Word.Applicationmyword.Documents.Open FileName:=CDg1.FileName myword.Selection.WholeStoryRTf1.Text = myword.Selectionmyword.Quit Set myword = NothingElseIf LCase(right(CDg1.FileName,...

    饭店点菜系统vb

    Call ShowPic cnn.Execute sql Adodc1.Refresh MsgBox ("添加成功!") End If End Sub Private Sub cmdBrowse_Click() On Error Resume Next With cmdlFilePath .Filter = "JPG Files|*.JPG|Bitmaps|*.BMP...

    四级英语真题

    partI Writing (30 minute) <br>注意:此部分试题在答题卡1上。 <br>Directions:For this part ,you are allowed 30minute to write a short essay on the topic of students selecting their fectures....

    linux全志R16的linux系统编译的资料_20170502_1655.7z

    libencode-locale-perl libfile-listing-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl ...

    Screen Cam Component

    Screen Cam Component (recording screen activity to video) I developed this screen cam component with delphi (captures the activity on a screen or delphi form and writes it into an AVI file; it ...

    RealThinClientSDK_v610_BETA

    specific (use Sessions, accept form post data, write and call remote functions, etc). The FAQ is continually being extended, as more questions come in. If you have a question for which you were ...

    Senfore_DragDrop_v4.1

    to convert all the demo form files to binary format. A batch file, convert_forms_to delphi_4_format.bat, is supplied in the demo directory which automates the conversion process. The C++ Builder ...

    用VB编写的学生学籍管理

    qy1.Open sql, cnn, adOpenStatic, adLockReadOnly, adCmdText For i = 1 To fnumber Grid1.Cell(0, i).Text = qy1.Fields(i - 1).Name Next qy1.PageSize = 20 nnum = qy1.PageCount If qy1.PageCount = 0 Then ...

Global site tag (gtag.js) - Google Analytics