Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

HOWTO : Manipulate FolderView, FileView or ShComboBox before the Form.Load event

 
Subscribe to the RSS feed for this forum  Forum Index -> Shell MegaPack.Net/WPF
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Thu Sep 22, 2005 4:06 am    Post subject: HOWTO : Manipulate FolderView, FileView or ShComboBox before the Form.Load event

Manipulating FolderView, FileView and ShComboBox (such as setting the root node of FolderView or the current folder of FileView) has no effect if the operations are performed before the host form is loaded (before the Form.Load event). This occurs because the window handle corresponding to the control is not created before the Form.Load event.

The solution to this is to access the Handle property of the control to force the creation of the windows handle. Once this occurs, you can manipulate the controls normally.

[C#]
IntPtr dummy;
dummy = fileView1.Handle; // Forces creation of the window handle


[VB.Net]
Dim dummy as IntPtr
dummy = fileView1.handle; ' Forces creation of the window handle
Back to top
Display posts from previous:   
Forum Index -> Shell MegaPack.Net/WPF All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group