如何使用Vb 6保存物品(在运行时) [英] How Do I Save Things With Vb 6 (At Runtime)

查看:76
本文介绍了如何使用Vb 6保存物品(在运行时)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我已经做了一个简单的小消息框创建者。它的作用是让你更改标题按钮的标题和消息框的警告类型。我现在想要这样做,如果你想,你可以保存你刚刚创建的消息框。我不知道如何做到这一点,请记住我仍然是一个菜鸟这里是我的代码的样本,所以你可以看到我的水平。 (如果你能告诉我如何理解我会更喜欢它。)

展开 | < span class =codeLinkonclick =selectAll(this);>选择 | 换行 | 行号

解决方案

嗨。


只需几个指针,这可能会有所帮助。
  • 您可以通过执行以下操作轻松地重命名变量替换,与Word,Excel或其他相同。在代码窗口中,只需按 Ctrl-H 或选择 E dit | R e 地点
  • 在非常简单的级别,您可以将值写入文本文件,并在每次启动程序时将其读回。例如,像

    展开 | 选择 | Wrap | 行号


所以,我会让它记录设置然后如何打开它,当它打开时它会显示上一个消息框。


编辑:我试过,它说类型不匹配变量是全局的,你的变量与我声明的相同。


< blockquote>


所以,我会让它记录设置然后如何打开它,当它打开时它会显示上一个消息框。


编辑:我尝试并且它说Type Mismatch变量是全局的,你的变量和我声明的变量相同。



好​​吧,我的想法是我写的proc(示例中的Form_Load)将设置你的变量,就像你之前设置的一样。然后,由你自己决定显示你的消息框,就像你现在一样。


Ok, well ive made a simple little message box creator. What it does it lets you change the caption the header the buttons and the warning type of a message box. I now want to make it so if you want, you can save the message box youve just created. I have no idea how to do this, keep in mind im still a noob here is a sample of my code so you can see what level im at. (I would prefer it if you could show me how in terms that i would be able to understand.)

Expand|Select|Wrap|Line Numbers

解决方案

Hi.

Just a couple of pointers, that might be some help.
  • You can easily rename the variables by doing a Replace, the same as in Word, Excel or whatever. While in the code window, just press Ctrl-H or select Edit|Replace.
  • At a very simple level, you can write out your values to a text file and read them back in each time you start the program. For instance, something like

    Expand|Select|Wrap|Line Numbers


So, I would make it log the settings then how would i make it so when it opens it will show the previous message box.

Edit: I tried and it says Type Mismatch the variables are global and your variables are the same as i declared them.


So, I would make it log the settings then how would i make it so when it opens it will show the previous message box.

Edit: I tried and it says Type Mismatch the variables are global and your variables are the same as i declared them.

Well, the idea was that the proc I wrote (Form_Load in the example) would set up your variables the same way you had them set before. Then it''s up to you to show your message box, the same way you are doing now, I suppose.


这篇关于如何使用Vb 6保存物品(在运行时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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