Sky Software Homepage LogicNP Software Knowledge Base And FAQ

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

HOWTO: Use ByRef event parameters in VBScript in an HTML/ASP page

 
Subscribe to the RSS feed for this forum  Forum Index -> FolderView ActiveX Control
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Mon May 05, 2008 5:38 am    Post subject: HOWTO: Use ByRef event parameters in VBScript in an HTML/ASP page

VBScript does not support ByRef parameters, so those events which use ByRef parameters to pass back information to FolderView do not work. Thus, the following VBScript code to do custom sorting does not work :

<SCRIPT language="VBScript">

Sub FolderView1_OnOleStartDrag(Data,Node,effects,button,Cancel)
' 1 = DROPEFFECT_COPY (Only Copy operation allowed)
effects = 1
end sub

</SCRIPT>


Instead of using the ByRef parameter, the information should be passed to FolderView using the SelectNode method as follows :

<SCRIPT language="VBScript">

Sub FolderView1_OnOleStartDrag(Data,Node,effects,button,Cancel)
' 1 = DROPEFFECT_COPY (Only Copy operation allowed)
value = "intprop:" +cstr(1)
folderView1.SelectNode(value,0,0)
end sub

</SCRIPT>


Use the prefix "intprop:" for ByRef parameters of type 'integer' or 'long'; use "strprop:" for ByRef parameters of type 'string' (used in OnInitialize and OnGetInfoTip). Note that the prefix ("intprop:" or "strprop:") must be lowercase.
Back to top
Display posts from previous:   
Forum Index -> FolderView ActiveX Control All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group