简体   繁体   English

相同的代码在两个不同的应用程序上做两个不同的事情?

[英]Same code doing two different things on two different apps?

If I have this code: 如果我有此代码:

class TestBrowser : WebBrowser
{
    public TestBrowser()
    {
        Panel panel = new Panel();
        panel.Dock = DockStyle.Fill;
        Controls.Add(panel);
    }
}

Should the panel cover the WebBrowser and make it invisible or not? 面板是否应该覆盖WebBrowser并使它不可见? What would it be the expected behavior? 预期的行为是什么? I ask this because this same code is giving me two different results on two different apps and can't find why (the panel covers it on one and is invisible in the other). 我之所以这样问,是因为相同的代码在两个不同的应用程序上给了我两个不同的结果,并且找不到原因(面板将其覆盖在一个应用程序上,而在另一个显示窗口中则看不见)。

如果将新控件添加到面板-将ID添加到面板-定义一个函数,该函数将在将控件添加到TestBrowser实例中包含的面板本身后更改Dock属性值

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 同时在同一个 Regex 上添加两个 Replace - 做两件不同的事情 - Add two Replace on the same Regex at the same time - Do two different things C# 订单列表由两个不同的东西 - C# order list by two different things CLR 是 C# 编译器还是这两个不同的东西? - Is the CLR a C# compiler or are these two different things? httpnotificationchannel来自模拟器中两个不同应用的同一个ChannelUri - httpnotificationchannel same ChannelUri from two different apps in emulator 在一个项目中使用同一个 nuget 的两个不同版本来构建两个不同的应用程序? - Use two different versions of the same nuget in one project to build two different apps? ApplicationData.GetPublisherCacheFolder在两个不同的应用程序中返回两个不同的文件夹 - ApplicationData.GetPublisherCacheFolder returns two different folders in two different apps 实体框架代码优先 - 两个具有相同名称但位于不同名称空间的实体 - Entity Framework Code First - two entities with same name but in different namespaces 针对两个不同的程序集引用编译相同的代码? - Compile same code against two different assembly references? 在两个不同的代码块使用相同的锁对象? - use the same lock object at two different code block? 在两个不同的Azure服务器上使用相同的代码,但是其中一个存在路由问题? - Same code on two different Azure Servers, but one is having routing problems?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM