在表单内打开表单而不关闭以前的表单 [英] Open form inside form without closing previous form

查看:89
本文介绍了在表单内打开表单而不关闭以前的表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所说。

我找不到办法做到这一点。

如果我使用form1.show并点击一个按钮。它会打开那个表单,但是一旦我再次点击它就会重新打开并关闭之前打开的表单。

那么有没有办法避免它?

即时通讯使用2表格,主要和次要,我需要根据需要多次打开辅助表格(没有为此制作大量新的子表格)。


想法是:我有一个主要形式与按钮。我点击它然后打开新表格,ican写笔记等,我再次点击它打开另一个。


并在不同的地方打开这些表格我用循环时间延迟。


唯一问题是打开相同的表格2次以上。

as title says.
I cant find a way to do this.
if i use form1.show and click on a button. it opens that form, but as soon as i click again it just reopens it and closes previously opened form.
So is there a way to avoid it?
im using 2 forms, main and secondary, i need to open secondary form as many times as needed (without making tons of new sub forms for that).

Idea is: i have main form with a button. i click on it and it opens new form where ican write note etc, i click again and it opens another one.

and to open those forms in a different place i use loop with time delay.

only problem is opening same form 2+ times.

推荐答案

哦,我忘了添加它可以还有这样的方式:

i有2个可执行文件,一个是主应用程序,另一个只是一个简单的注释表,就像2个表单一样,但是:

1)如何我链接第二个.exe与第一个,我可以使用shel lcommand然后我需要重新编译每次文件夹名称或路径更改或有一种方法来链接exe,如果这些是在同一个文件夹,无论该文件夹在哪里,重要的只是这两个文件在同一目录中。

2)id也喜欢为每个打开的笔记本使用随机位置。窗口,但我不知道如何使用shell命令。
我使用的形式


Form2.Left = RND()*像素

Form2.Top = RND()*像素

其中像素是随机位置范围/区域的某个数字。
oh and i forgot to add that it could also wrk like this:
i have 2 executables, one is main application and other is just a bare "notesheet", just like 2 forms, but:
1)how do i link 2nd .exe with first one, i can use shel lcommand but then i need to recompile every time folder name or path changes or is there a way to link exe if those are in the same folder no matter where that folder is, important is only that these 2 files are in the same directory.
2)id also like to use random location for each opened "notebook" window, but i dont know how to do it when i use shell command.
for form i used:
Form2.Left = RND() *pixels
Form2.Top = RND() *pixels
where pixels are some number for range/area of random location.


sry单独发布但是再次忘记我使用visual basic 6
sry for posting alone but forgot again that im using visual basic 6


up没人知道怎么做?
up noone knows how do do it?


这篇关于在表单内打开表单而不关闭以前的表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆