如何在c#中以窗口形式加载页面后调用函数 [英] how to call a function after page load in window form in c#
本文介绍了如何在c#中以窗口形式加载页面后调用函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
先生,
我想在页面加载事件完成后调用一个函数,因为我从数据库中检索larz数据,以便在一段时间后加载它。但我想立即加载页面,所以在页面加载后调用该函数。
sir,
i want to call a function after page load event is complete because i retrieve larz data from database so its load after some time. but i want that page load immediately so call the function after page load.
推荐答案
尝试显示事件。 Shown事件仅在第一次显示表单时引发;随后最小化,最大化,恢复,隐藏,显示或无效和重新绘制将不会引发此事件。
看看这个链接:
http://msdn.microsoft.com/en-us/ library / system.windows.forms.form.shown.aspx [ ^ ]
问候,
Praneet
Hi,
Try Shown event. The Shown event is only raised the first time a form is displayed; subsequently minimizing, maximizing, restoring, hiding, showing, or invalidating and repainting will not raise this event.
have a look at this link:
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.shown.aspx[^]
Regards,
Praneet
hi
尝试激活事件。此事件的形式在加载事件之后运行。
hi Try " Activated " event.This event of form is run exactly after "Load" event.
这篇关于如何在c#中以窗口形式加载页面后调用函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文