这里以我的软件“文章管理系统”为例解释一下ole拖放在vb中的应用: 在窗体中添加一个image控件,在它的imgdrop_oledragdrop过程中添加如下代码: private sub imgdrop_oledragdrop(data as dataobject, effect as long, button as integer, shift as integer, x as single, y as single) dim strtmp
if data.getformat(15) then dim strfilename as string strfilename = getfilename(data.files(1)) ............ end if
if data.getformat(1) then dim strcontent as string strcontent=data.getdata(1) ................. end if end sub