如何备份或复制表格 [英] How backup or copy form

查看:65
本文介绍了如何备份或复制表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对VS.net有点新鲜。结果我很容易犯'错误。当向表单添加一些新功能时,如果我在尝试可能会搞砸的事情之前支持它,那将是很好的。另外,

有时候新表格就像旧表格那样最好的方式

来创建新报表就是简单地复制旧表格,重命名

副本并添加修改。所以问题是,如何备份或复制

表格。听起来很简单,但我的经验是它不是。


您可以复制表格,但有些内容在内部完成

原始形式不容易摆脱。也就是说,要让原始形式的内部不要指向或记住原始报告中的本地原因

,这并不容易。我可以提供所有细节但是

我不想写太久,但一个例子就是这个。在一个

表格中,我有一些代码如下:


var1.ParentSource = Me


随着原始报告中的这一行,如果你复制它,显然,副本

仍然是ME的原始报告。不知道如何到处走走

这个。


这一切的底线就是我希望我有一些简单易懂的方式

复制表格。非常方便,如果你可以,但我还没有找到一个简单的

组合。


任何人。

解决方案

你好Woody,


我认为很难实现你的目标。

因为表格可以使用许多资源,例如一个数据集,一个图片文件等。

所以只需备份form1.cs和form1.resx文件是没有意义的。


我好像你想要实现版本控制。您可以尝试使用

源安全,这将帮助您备份和恢复您的代码。


问候,

Peter黄

微软在线合作伙伴支持

安全! www.microsoft.com/security

此帖子是提供按原样没有保证,也没有赋予任何权利。

--------------------

From:" Woody Splawn" ; < wo *** @ splawns.com>
主题:如何备份或复制表格
日期:星期一,2003年11月10日09:09:42 -0800
行:29 X-Priority:3
X-MSMail-Priority:正常
X-Newsreader:Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE:由Microsoft MimeOLE制作V6.00.2800.1165 新闻组:microsoft.public.dotnet.languages.vb
NNTP -Posting-Host:168.158-60-66-fuji-dsl.static.surewest.net 66.60.158.168
路径:cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl 外部参照:cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:155581
X-Tomcat-NG:microsoft.public.dotnet.languages.vb

我有点新一般到VS.net。结果我很容易犯错误。在为表单添加一些新功能时,如果我能够在尝试可能搞砸的事情之前备份它,那将是很好的。此外,
有时新表单就像旧表单一样,创建新报表的最佳方法是简单地复制旧表单,重命名
复制和添加修改。所以问题是,如何备份或复制
表单。听起来很简单,但我的经验是它不是。

你可以复制表格,但有一些内部完成的原始表格中没有轻易摆脱。也就是说,它不是
easyto得到原始形式的内部不指向或记住
原始的orignal报告的东西。我可以提供所有细节
但我不想写太久,但一个例子就是这个。在一个
表单中,我有一些代码如下:

var1.ParentSource = Me

如果您复制原始报告中的这一行,显然,副本仍然是ME的原始报告。不知道怎么回事这个。

最重要的是,我希望我有一些简单的无聊的方式来复制表格。非常方便,如果可以,但我还没有找到一个简单的
组合。

任何人。




嗨Woody,


我没有看到很多答案,所以让我给你一个。


Fergus曾经给我发过一个form.vb,他也包括了form.resx。


这样做得很好然后我以为我知道我做了什么忘了
$每次b $ b。


也许和你的问题一样。


Cor

嗨Woody,


另一种方式是继承使用


您可以尝试右键单击该项目并选择Add /添加继承

表格,因此,您可以添加新表格继承原始表格。

您可以将项目作为单位分发。


如果您有任何疑问,请随时告诉我。


问候,

Peter Huang

Microsoft Online Par tner支持

安全! www.microsoft.com/security

此帖子是提供按原样没有保证并且没有权利。

--------------------

X-Tomcat-ID: 89510854
参考文献:< uT ************** @ TK2MSFTNGP09.phx.gbl>
MIME-Version:1.0
Content-Type:text / plain
Content-Transfer-Encoding:7bit
来自: v - ****** @ online.microsoft.com (Peter Huang)
组织:微软
日期:2003年11月11日星期二02:54:49 GMT
主题:RE:如何备份或复制表格
X-Tomcat-NG:microsoft.public.dotnet.languages.vb
消息ID:< l7 ************* @ cpmsftngxa06.phx.gbl>
新闻组:microsoft.public.dotnet.languages.vb
行:65
路径:cpmsftngxa06.phx.gbl
外部参照:cpmsftngxa06.phx.gbl microsoft.public.dotnet。 languages.vb:155733
NNTP-Posting-Host:TOMCATIMPORT2 10.201.218.182
嗨伍迪,

我认为很难实现你的目标。由于表单可能使用许多资源,例如
所以只备份form1.cs和form1.resx文件是没有意义的。

我好像你想实现版本控制。您可以尝试使用
源安全,这将帮助您备份和恢复您的代码。

问候,
Peter Huang
Microsoft在线合作伙伴支持安全! www.microsoft.com/security
此帖子提供为as as是"没有保证并且不赋予任何权利。
--------------------

From:" Woody Splawn" < wo *** @ splawns.com>
主题:如何备份或复制表格
日期:星期一,2003年11月10日09:09:42 -0800
行:29 X-Priority:3
X-MSMail-Priority:正常
X-Newsreader:Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE:由Microsoft MimeOLE制作V6.00.2800.1165 新闻组:microsoft.public.dotnet.languages.vb
NNTP -Posting-Host:168.158-60-66-fuji-dsl.static.surewest.net
66.60.158.168路径:cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl 外部参照:cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:155581
X-Tomcat-NG:microsoft.public.dotnet.languages.vb

我有点新一般到VS.net。结果我很容易犯错误。在为表单添加一些新功能时,如果我能够在尝试可能搞砸的事情之前备份它,那将是很好的。此外,
有时新表单就像旧表单一样,创建新报表的最佳
方法就是简单地复制旧表单,重命名


复制并添加修改。所以问题是,如何备份或复制
表单。听起来很简单,但我的经验是它不是。

你可以复制表格,但有一些内部完成的东西
原始形式,没有轻易摆脱。也就是说,它不是


easy

来使原始表单的内部不指向或记住


东西

是原始报告的原产地。我可以提供所有细节


我不想写太久,但一个例子就是这个。在一个
表单中,我有一些代码如下:

var1.ParentSource = Me

如果您复制原始报告中的这一行,显然,作为原始报告,ME的
copystill。不知道怎么回事这个。

最重要的是,我希望我有一些简单的无聊的方式来复制表格。非常方便,如果可以,但我还没有找到一个简单的
组合。

任何人。




I am somewhat new to VS.net in general. As a result I am prone to make
mistakes. When adding some new feature to a a form it would be nice if I
could back it up before trying something that might mess things up. Also,
there are times when a new form is enough like an old one that the best way
to create the new report is to simply make a copy of the old one, rename the
copy and add modifications. So the question is, how to backup or copy a
form. Sounds easy, but my experience has been that it is not.

You can copy the form but there are some things that are done internally in
the original form that are not gotten rid of easily. That is, it is not easy
to get the internals of the original form not to point to or remember things
that are indigenous to the orignal report. I could give all the details but
I don''t want to be too long in writing, but one example is this. In one
form I have some code that goes like this:

var1.ParentSource = Me

With this line in the original report, if you copy it, apparently, the copy
still thins of ME as the original report. Don''t know how to get around
this.

Bottom line on it all is that I wish I had some easy infalible way of
copying a form. Very handy if you can but I haven''t found an easy
combination yet.

Anyone.

解决方案

Hi Woody,

I think it is difficult to achieve your aim.
Since a form may use many resource, e.g. a dataset, a picture file and etc.
So just backup the form1.cs and form1.resx file will not make sense.

I seems that you want to implement version control. You may try to use the
source safe, which will help you backup and restore your code.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------

From: "Woody Splawn" <wo***@splawns.com>
Subject: How backup or copy form
Date: Mon, 10 Nov 2003 09:09:42 -0800
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <uT**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: 168.158-60-66-fuji-dsl.static.surewest.net 66.60.158.168
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:155581
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

I am somewhat new to VS.net in general. As a result I am prone to make
mistakes. When adding some new feature to a a form it would be nice if I
could back it up before trying something that might mess things up. Also,
there are times when a new form is enough like an old one that the best way
to create the new report is to simply make a copy of the old one, rename thecopy and add modifications. So the question is, how to backup or copy a
form. Sounds easy, but my experience has been that it is not.

You can copy the form but there are some things that are done internally in
the original form that are not gotten rid of easily. That is, it is not easyto get the internals of the original form not to point to or remember thingsthat are indigenous to the orignal report. I could give all the details butI don''t want to be too long in writing, but one example is this. In one
form I have some code that goes like this:

var1.ParentSource = Me

With this line in the original report, if you copy it, apparently, the copy
still thins of ME as the original report. Don''t know how to get around
this.

Bottom line on it all is that I wish I had some easy infalible way of
copying a form. Very handy if you can but I haven''t found an easy
combination yet.

Anyone.




Hi Woody,

I do not see many answers, so let me give you also one.

Fergus did once send me a form.vb and he included also the form.resx.

That did work fine and then I thought that I knew what I did forget
everytime.

Maybe it is the same as your problem.

Cor


Hi Woody,

Another way is using the inherited from

You may try to right click on the project and select Add/Add inherited
form, thus, you can add a new form inherits the original form.
And you can distribute the project as the unit.

If you have any question, please feel free to let me know.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------

X-Tomcat-ID: 89510854
References: <uT**************@TK2MSFTNGP09.phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
From: v-******@online.microsoft.com (Peter Huang)
Organization: Microsoft
Date: Tue, 11 Nov 2003 02:54:49 GMT
Subject: RE: How backup or copy form
X-Tomcat-NG: microsoft.public.dotnet.languages.vb
Message-ID: <l7*************@cpmsftngxa06.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
Lines: 65
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:155733
NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182

Hi Woody,

I think it is difficult to achieve your aim.
Since a form may use many resource, e.g. a dataset, a picture file and etc.
So just backup the form1.cs and form1.resx file will not make sense.

I seems that you want to implement version control. You may try to use the
source safe, which will help you backup and restore your code.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------

From: "Woody Splawn" <wo***@splawns.com>
Subject: How backup or copy form
Date: Mon, 10 Nov 2003 09:09:42 -0800
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <uT**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: 168.158-60-66-fuji-dsl.static.surewest.net 66.60.158.168Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:155581
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

I am somewhat new to VS.net in general. As a result I am prone to make
mistakes. When adding some new feature to a a form it would be nice if I
could back it up before trying something that might mess things up. Also,
there are times when a new form is enough like an old one that the best wayto create the new report is to simply make a copy of the old one, rename


the

copy and add modifications. So the question is, how to backup or copy a
form. Sounds easy, but my experience has been that it is not.

You can copy the form but there are some things that are done internally inthe original form that are not gotten rid of easily. That is, it is not


easy

to get the internals of the original form not to point to or remember


things

that are indigenous to the orignal report. I could give all the details


but

I don''t want to be too long in writing, but one example is this. In one
form I have some code that goes like this:

var1.ParentSource = Me

With this line in the original report, if you copy it, apparently, the copystill thins of ME as the original report. Don''t know how to get around
this.

Bottom line on it all is that I wish I had some easy infalible way of
copying a form. Very handy if you can but I haven''t found an easy
combination yet.

Anyone.





这篇关于如何备份或复制表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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