我有两种形式,using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace Crawler
{
public sealed partial class DungeonRoom : UserControl
{
public static readonly DependencyProperty HasWestDoorProperty =
DependencyProperty.Register("HasWestDoor", typeof(Boolean), typeof(DungeonRoom), new PropertyMetadata(false));
public static readonly DependencyProperty HasNorthDoorProperty =
DependencyProperty.Register("HasNorthDoor", typeof(Boolean), typeof(DungeonRoom), new PropertyMetadata(false));
public static readonly DependencyProperty HasEastDoorProperty =
DependencyProperty.Register("HasEastDoor", typeof(Boolean), typeof(DungeonRoom), new PropertyMetadata(false));
public static readonly DependencyProperty HasSouthDoorProperty =
DependencyProperty.Register("HasSouthDoor", typeof(Boolean), typeof(DungeonRoom), new PropertyMetadata(false));
public static readonly DependencyProperty TypeProperty =
DependencyProperty.Register("Type", typeof(RoomType), typeof(DungeonRoom), new PropertyMetadata(0));
public bool HasWestDoor
{
get { return (bool)GetValue(HasWestDoorProperty); }
set { SetValue(HasWestDoorProperty, value); }
}
public bool HasNorthDoor
{
get { return (bool)GetValue(HasNorthDoorProperty); }
set { SetValue(HasNorthDoorProperty, value); }
}
public bool HasEastDoor
{
get { return (bool)GetValue(HasEastDoorProperty); }
set { SetValue(HasEastDoorProperty, value); }
}
public bool HasSouthDoor
{
get { return (bool)GetValue(HasSouthDoorProperty); }
set { SetValue(HasSouthDoorProperty, value); }
}
public RoomType Type
{
get { return (RoomType)GetValue(TypeProperty); }
set { SetValue(TypeProperty, value); }
}
public DungeonRoom()
{
this.InitializeComponent();
}
}
}
和frmOwnership
。在frmContactDetails
上,您可以单击一个按钮以打开frmOwnership
到特定记录。
我遇到的问题frmContactDetails
是从几个不同的来源打开的,并且没有指定(也不能真正?)关闭表单时要打开的表单。 frmContactDetails
无法从frmOwnership
打开,这意味着当您在“联系人详细信息”中编辑记录时,“所有权”表单保持打开状态。但是,我希望在frmContactDetails
关闭时刷新lstItem
上的控件(frmOwnership
)。我试图向Got_Focus过程添加一个重新查询调用(frmContactDetails
),但是它没有刷新。
谢谢!
答案 0 :(得分:1)
最简单的方法是用frmContactDetails
打开acDialog
(作为打开它的其他任何形式的弹出窗口)。然后,无论用什么VBA代码在原始表单上打开它,都只有在frmContactDetails
关闭后才能继续,您可以在此处刷新。