如标题:
运行程序而不显示主窗体。。即主窗体visable=false,问题是主窗体没这个属性
运行程序而不显示主窗体。。即主窗体visable=false,问题是主窗体没这个属性
解决方案 »
- winfrom怎么去操作excel
- c# 的代码段 Visual Studio Code Snippet怎么定义光标的位置
- 问个Popup问题 WPF
- 需要一种在.net平台下的RSA加解密办法,需要能与java,php互通
- 一个多线程的问题?高手帮下忙
- 求教 C#读虚拟串口出现“由于线程退出或应用程序请求,已放弃IO操作”怎么解决
- 如何根据一个System.Type示例化一个对象
- 菜鸟提问:求余
- SNMP V3 依然不安全么?
- 如何把两个关联的DataTable 合并成一个DataTable 或者DataView 象数据库中的视图
- CurrentCell.RowNumber抱错!
- 如何实现窗体中打开新窗体类似Word一样
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;namespace 值传递 {
static class Program {
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new Form1());
Application.Run(new MyClass);
}
}
}
Application.Run(new MyClass()); // 少了
using System.Collections.Generic;
using System.Windows.Forms;namespace WindowsApplication1
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form1 f = new Form1();
f.Visible = false;
Application.Run();
f.Close();
}
}
}
5楼的你试了吗? 把那段代码放到 Program.cs下.Form1.cs :
using System;
using System.Windows.Forms;
using AgentObjects;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
axAgent1.Characters.Load("Merlin", (object)@"E:\WindowsApplication1\bin\Debug\Merlin.acs"); //加载Agent形象
IAgentCtlCharacterEx Character = axAgent1.Characters["Merlin"];
Character.Show(null);//显示精灵
Character.Speak("是我!!!!!!!!!!!!!!!", null);
} }
}运行,屏幕上就是只显示精灵啊 .(修改一下加载精灵的文件路进)
感谢5楼提供方法。。