窗体showModal
unit Unit1; interface uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons; type
TForm1 = class(TForm)
btn1: TBitBtn;
procedure btn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end; var
Form1: TForm1; implementation
uses Unit2;
{$R *.dfm} procedure TForm1.btn1Click(Sender: TObject);
begin
form2.ShowModal;
end; end.
Delphi 窗体1的代码,按钮 点击Form showmodal
转换后
Unit2.cs 的代码为
using System;
using System.Windows.Forms;
using Unit2;
namespace Unit1
{
public partial class TForm1: Form
{
public TForm1()
{
InitializeComponent();
} public void btn1Click(System.Object Sender, System.EventArgs _e1)
{
Unit2.Units.Unit2.Form2.ShowDialog();//ShowDialog
} } // end TForm1 } namespace Unit1.Units
{
public class Unit1
{
public static TForm1 Form1 = null;
} // end Unit1 }
窗体showModal的更多相关文章
- Delphi 使窗体Showmodal后可以操作其他窗体
对话框ShowModal之后不能操作其它窗口,实际上是因为Windows Disable了其它窗口.所以当你需要在模态对话框中访问其它已经可见的窗口时,需要用EnableWindow API来激活对应 ...
- DELPHI Showmodal 模式窗体
Showmodal 是个函数, Show 是个过程 1. Showmodal: 概念 : 当你调用一个窗口用 SHOWMODAL 时 , 当这个窗口显示出来后 , 程序不会继续自己执行 , 而 ...
- 窗体Showmedol 遇到的奇怪异常-->进阶问题
procedure SetTransparentForm (popupFrm:TForm;Color:TColor;AlphaBlendValue:Integer); var FrmTranspare ...
- 窗体Showmedol 遇到的奇怪异常: cannot make a visible window model
//窗体Showmedol 遇到的奇怪异常: cannot make a visible window model //背景:ShowModal A窗体,A窗体再ShowModal B窗体:A是透明背 ...
- 主窗体里面打开子窗体&&打印饼图《Delphi 6数据库开发典型实例》--图表的绘制
\Delphi 6数据库开发典型实例\图表的绘制 1.在主窗体里面打开子窗体:ShowForm(Tfrm_Print); procedure Tfrm_Main.ShowForm(AFormClass ...
- 调用Dll里面的窗体
将窗体资源分装到DLL中并且调用 用Delphi生成DLL并封装窗体的示例 调用Dll里面的窗体 DLL文件 library Project2;{ Important note about DLL m ...
- if form1.showmodal:=mrok then 什么意思
if form1.showmodal:=mrok then 这句话什么意思? 最佳答案 这个问题说来话长,且听我慢慢道来... 首先,你仔细看一看,所有的命令按钮(不论是Button还是BitBtn) ...
- Delphi窗体创建释放过程及单元文件小结(转)
Delphi窗体创建释放过程及单元文件小结 Delphi中的窗体,有模式窗体与非模式窗体两种.两种窗体的调用方式不同,模式窗体使用ShowModal显示,非模式窗体使用Show显示.当显示模式窗体的时 ...
- 自定义事件实现不同窗体间的通讯Delphi篇
要实现子窗体与父窗体之间的通讯,有多种方法(比如:重载子窗体的构造函数,将父窗体的引用作为参数传递给子窗体).下面我要介绍的是利用自定义事件的方法,它能够最大程度的避免模块之间的耦合,充分体现面向对象 ...
随机推荐
- pair correlation ggpair ggmatrix
https://zhuanlan.zhihu.com/p/23400450 首发于 R语言数据分析与可视化 关注专栏 登录 写文章 R 语言矩阵散点图 EasyCharts· 15 天前 散点 ...
- wcf第4步之原生调用简单封装
public interface IDemoServiceChannel : IDemoService, System.ServiceModel.IClientChannel { } public p ...
- ElasticSearch-5.0.0安装中文分词插件IK
Install IK 源码地址:https://github.com/medcl/elasticsearch-analysis-ik,git clone下来. 1.compile mvn packag ...
- Yii2.0 用户登录详解(上)
一.准备 在开始编写代码之前,我们需要思考一下:用户登陆模块,实现的是什么功能?很明显,是登陆功能,那么,登陆需要用户名和密码,我们在数据库的一张表中就应该准备好用户名和密码的字段,再思考一下,如果要 ...
- .Net 中的反射(反射特性) - Part.3
反射特性(Attribute) 可能很多人还不了解特性,所以我们先了解一下什么是特性.想想看如果有一个消息系统,它存在这样一个方法,用来将一则短消息发送给某人: // title: 标题:author ...
- entity1
- 初识Docker和Windows Server容器
概览 伴随着Windows Server 2016 Technical Preview 3 (TP3)版本的发布,微软首次提供了Windows平台下地原生容器.它集成了Docker对Windows S ...
- C# 4.0 之线程安全集合篇
资料:http://www.cnblogs.com/chengxiaohui/articles/5672768.html
- VTK初学一,vtkDelaunay2D创建球冠曲面
#ifndef INITIAL_OPENGL #define INITIAL_OPENGL #include <vtkAutoInit.h> VTK_MODULE_INIT(vtkRend ...
- glusterFS系统中文管理手册(转载)
GlusterFS系统中文管理手册 1文档说明 该文档主要内容出自 www.gluster.org 官方提供的英文系统管理手册<Gluster File System 3.3.0 A ...