窗体Showmedol 遇到的奇怪异常: cannot make a visible window model
//窗体Showmedol 遇到的奇怪异常: cannot make a visible window model
//背景:ShowModal A窗体,A窗体再ShowModal B窗体;A是透明背景窗体,B是提示窗体; //第一次使用该全局变量,使用完毕后,FreeAndNil,目的是不影响第二次使用(和重新初始化属性)
if not Assigned(frmAd) then
frmAd := TfrmAd.Create(nil);
frmAd.SetUrl(r46002.Data.URL);
if not Assigned(FrmChangePWTransparent) then
FrmChangePWTransparent:=TFrmChangePWTransparent.Create(nil);
FrmChangePWTransparent.fPopupForm :=frmAd;
//FrmChangePWTransparent.FormStyle := fsNormal;
//FrmChangePWTransparent.Visible := False;
FrmChangePWTransparent.ShowModal;
FreeAndNil(FrmChangePWTransparent); //第二次使用
if not Assigned(frmRemind) then
frmRemind := TfrmRemind.Create(nil);
if not Assigned(FrmChangePWTransparent) then
FrmChangePWTransparent:=TFrmChangePWTransparent.Create(nil);
FrmChangePWTransparent.fPopupForm :=frmRemind;
//FrmChangePWTransparent.FormStyle := fsNormal;
//FrmChangePWTransparent.Visible := False;
FrmChangePWTransparent.ShowModal; //弹出透明窗体
FreeAndNil(FrmChangePWTransparent);
//但是会弹出异常 cannot make a visible window model ,
//百度了解:http://blog.sina.com.cn/s/blog_4b5f4fbc0100kt5p.html
//修改:加多两句,如上面去掉注释。
FrmChangePWTransparent.FormStyle := fsNormal;
FrmChangePWTransparent.Visible := False;
//还是无法解决问题。 //解决:后来想既然是 make a visible window model,猜想第一次使用完后 FrmChangePWTransparent 全局变量没有完全释放【很奇怪】,
//别人就 另立 一个变量,解决问题。经验呀。 var FrmTransparent: TFrmChangePWTransparent; if not Assigned(frmRemind) then
frmRemind := TfrmRemind.Create(nil);
if not Assigned(FrmTransparent) then
FrmTransparent:=TFrmChangePWTransparent.Create(nil);
FrmTransparent.fPopupForm :=frmRemind; //
FrmTransparent.FormStyle := fsNormal;
FrmTransparent.Visible := False;
FrmTransparent.ShowModal; //弹出透明窗体
FreeAndNil(FrmTransparent);
窗体Showmedol 遇到的奇怪异常: cannot make a visible window model的更多相关文章
- 窗体Showmedol 遇到的奇怪异常-->进阶问题
procedure SetTransparentForm (popupFrm:TForm;Color:TColor;AlphaBlendValue:Integer); var FrmTranspare ...
- 从GridView中直接导出数据到Excel文件 处理导出乱码 类型“GridView”的控件“XXXX”必须放在具有 runat=server 的窗体标记内。”的异常
导出到Excel方法: <span style="color: rgb(0, 0, 255);">public</span> <span style= ...
- PyQt通过resize改变窗体大小时ListWidget显示异常
前几天开始的pygame音乐播放器Doco,做的差不多了,上午做到了歌词显示和搜索页面.遇到bug,即通过resize改变ui大小时ListWidget显示异常 #目的: 增加一部分窗口用来显示歌词和 ...
- [转]Eclipse下开发Struts奇怪异常:org.apache.struts.taglib.bean.CookieTei
今天早上开始在Eclipse下学习struts,于是按照李兴华老师的<struts入门视频教程>一步一步地充满快乐的学习,等把登陆程序写完,打开浏览器准备运行的时候,奇怪的异常产生了,异常 ...
- C#解决关闭多线程的form主窗体时抛出ObjectDisposedException 异常
一.现象: 我在主窗体新建线程,使用子线程来处理接收到的数据,并且更新窗体显示内容,但关闭主窗体程序之后就程序就报错,如下所示: 二.分析问题: 由于新建线程的处理函数里边是一直死循环处理数据,虽然窗 ...
- ArcGIS Server SOE开发之奇怪异常:
添加之后结果显示如下:fjsontokenezkBvir0Tj5q31UEst7pTFPwrwocmHklCajKeh-xXM91qWdBXDuQMmtGcaHaaXCJ 具体如下: 该SOE扩展在另 ...
- ArcEngine奇怪异常:HRESULT:0x80040351
错误如图 根据该博客,http://blog.csdn.net/u011609113/article/details/51155116, 显示该错误为Duplicate Field Names wit ...
- awk 的一个奇怪异常
awk: cmd. line:1: (FILENAME=- FNR=192) fatal: print to "standard output" failed (No space ...
- spring奇怪异常记录(会逐渐记录)
1 严重: Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error cr ...
随机推荐
- nio
1.I/O 输入输出流 (1) 指的是计算机与外界,或者程序与计算机之间数据交换的接口. (2) 在java编程中,使用 流(Stream) 的方式完成I/O , 所有的I/O都被视为单个字节的移动. ...
- Sality.m分析
Sality.m分析 0x1.样本概述 FILE_A MD5:1C9A0E01C6033801AFC5A12DE1CC5BDC FILE_B MD5:4B6B70F4A199CF3EAC1554B08 ...
- 2>&1
经常关注linux脚本的人,一定看到过 2>&1 这样的用法,最初一定不明白其中的含义以及为什么是这样的一种组合.昨天偶然间再次看到了这个 2>&1 的写法,遂下决心搞明白 ...
- pg gem 安装(postgresql94)
使用下面命令安装报错 gem install pg 错误: [root@AS-test middle_database]# gem install pgBuilding native extensio ...
- python 端口扫描
#!/usr/bin/env python #-*- coding:utf-8 -*- import socket #iptable=[] nmapport=[21, 22, 23, 80, 110] ...
- python address already in use
1)找到使用端口的进程pid netstat -lp 2)kill掉pid kill -9 1234
- 【webGL】插件的使用的,实现一个鼠标动画的盒子
准备工作: 1.stat.js stat.js是Three.js的作者Mr. Doob的另一个有用的JavaScript库.很多情况下,我们希望知道实时的FPS信息,从而更好地监测动画效果.这时候,s ...
- Position属性四个值:static、fixed、absolute和relative的区别和用法
Position属性四个值:static.fixed.absolute和relative的区别和用法 在用CSS+DIV进行布局的时候,一直对position的四个属性值relative,absolu ...
- in (1,2)and in('1,2')解决
select wm_concat(org_name) from mstorg where instr((select pass_dists from licrequests where req_no= ...
- [Project Name] was compiled with optimization - stepping may behave oddly; variables may not be available.
控制台输出的时候显示一串这样的信息:[Project Name] was compiled with optimization - stepping may behave oddly; variabl ...