当前位置:网站首页>Thirty lines of code prevent VFP forms from running repeatedly, and the function supports parameter transfer
Thirty lines of code prevent VFP forms from running repeatedly, and the function supports parameter transfer
2022-06-25 11:43:00 【VFP of Garfield】
VFP most 26 Parameters , You can't stop writing
Procedure runform
Parameters cformname,mformname,Parameter1,Parameter2,Parameter3,Parameter4,Parameter5,Parameter6,Parameter7,Parameter8,Parameter9,Parameter10
For nCount=10 To 1 STEP -1
cName=“Parameter”+Alltrim(Str(nCount))
IF VARTYPE(&cName)“L” AND &cName.f.
else
EXIT
ENDIF
ENDFOR
*– Create a parameter
LOCAL strPara
strPara=""
FOR nPcount=1 TO nCount
cName=“Parameter”+Alltrim(Str(nPcount))
strPara =strPara +","+ cName
ENDFOR
strPara= RIGHT(strPara,LEN(strPara)-1)
cpublic = “Public “+mformname
&cpublic
If !(Type(”&mFormName.”)=“O” And !Isnull(&mformname.))
lccmd=“Do Form &cformname Name &mformname”
lcCmd = lcCmd + IIF(EMPTY(strPara),""," WITH "+strPara )
&lccmd
Else
If &mformname…WindowState=1
&mformname…WindowState=0
Endif
&mformname…Show
Endif
Endproc
Calling method
runform( Form file name , Form definition variables , Parameters 1,[- Parameters 10])
With no arguments
runform(“ Forms 2”,“ Forms 2”)
Run with parameters ( Support 10 Parameters )
runform(“ Forms 2”,“ Forms 2”,“123”,“456”,“12345”)
More information http://www.sn58.cn
边栏推荐
- Tool usage summary
- Application of analytic hierarchy process in college teaching evaluation system (principle + example + tool)
- Big Endian 和 Little Endian
- Ladder side tuning: the "wall ladder" of the pre training model
- Semaphore source code analysis
- Openfeign uses
- Spark runs wordcount (case 1)
- Source code analysis of AQS & reentrantlock
- Redis6笔记02 配置文件,发布和订阅,新数据类型,Jedis操作
- Spannable and editable, spannablestring and spannablestring
猜你喜欢

Manually rollback abnormal data

Detailed explanation of Flink checkpoint specific operation process and summary of error reporting and debugging methods

Comment TCP gère - t - il les exceptions lors de trois poignées de main et de quatre vagues?

Share 7 immortal wallpaper websites, let the new wallpaper give you a little joy, and don't fall into the repetition year after year.

Explain websocket protocol in detail

Redis6 note02 configuration file, publish and subscribe, new data type, jedis operation

Idea local launch Flink task

杭州/北京内推 | 阿里达摩院招聘视觉生成方向学术实习生(人才计划)

What is the development history, specific uses and structure of the chip

時創能源沖刺科創板:擬募資11億 年營收7億淨利反降36%
随机推荐
Xishan technology rushes to the scientific innovation board: it plans to raise 660million yuan. Guoyijun and his wife have 60% of the voting rights
GC
Is it safe to open a stock account on your mobile phone? Who can I open an account with?
客从何处来
Capacity expansion mechanism of Dict Of redis (rehash)
Tool usage summary
2022 PMP project management examination agile knowledge points (2)
How to realize the rich text editor function of mobile terminal
Where do the guests come from
Database Series: MySQL index optimization summary (comprehensive version)
quarkus saas动态数据源切换实现,简单完美
Double tampon transparent cryptage et décryptage basé sur le cadre minifilter
过拟合原因及解决
Detailed explanation of Spark's support source code for Yan priority
2022 mathematical modeling competition time and registration fee
Is industrial securities a state-owned enterprise? Is it safe to open an account in industrial securities?
redis的dict的扩容机制(rehash)
Wait (), notify (), notifyAll (), sleep (), condition, await (), signal()
CFCA Anxin sign access
手机上股票开户安全吗?找谁可以开户啊?