Windows Comman Taks in VB.NET
-
Hi Everybody, I need your help regarding Subclassing in VB.NET. I am developing a project in which I am using Web Browser Control as Winodws Explorer. Means I am providing most of the functionalities of Windows Explorer in my Web Browser control through my application. :) I would like to SubClass the Web Browser Control and want to get the DELETE notification when user clicks on a button provided by interface. Or when user Right Click and chooses the "Delete" option from popup menu provided by Windows. Or, in Windows XP, user clicks the left panel entry "Delete this file" option. I try to Subclass the Web Browser Control and try to get the DELETE notification. But application is not stable and also I am not able to trap the notification. :confused: While debuging or EXE of the application crashes as soon as I try to enter the mouse in the Web Browser Control. :wtf: Please, could you help me in this context? I shall be very thankful to you for the same. Waiting for you early reply. Best regards, Vilas Shewale :)
-
Hi Everybody, I need your help regarding Subclassing in VB.NET. I am developing a project in which I am using Web Browser Control as Winodws Explorer. Means I am providing most of the functionalities of Windows Explorer in my Web Browser control through my application. :) I would like to SubClass the Web Browser Control and want to get the DELETE notification when user clicks on a button provided by interface. Or when user Right Click and chooses the "Delete" option from popup menu provided by Windows. Or, in Windows XP, user clicks the left panel entry "Delete this file" option. I try to Subclass the Web Browser Control and try to get the DELETE notification. But application is not stable and also I am not able to trap the notification. :confused: While debuging or EXE of the application crashes as soon as I try to enter the mouse in the Web Browser Control. :wtf: Please, could you help me in this context? I shall be very thankful to you for the same. Waiting for you early reply. Best regards, Vilas Shewale :)
Subclassing in VB Classic is notoriously unforgiving. One time I had a program with a subclass that brought down the whole computer whenever it was run. :(( :(( I've had a lot of experience with subclassing in both VB Classic and C# so I might be able to help you. Could you post your code? I might be able to spot a bug in it for you. By the way, subclassing is much more stable when using an already-compiled dll like the SubClassing and Timer Assistant available at vbAccelerator[^].
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi -
Subclassing in VB Classic is notoriously unforgiving. One time I had a program with a subclass that brought down the whole computer whenever it was run. :(( :(( I've had a lot of experience with subclassing in both VB Classic and C# so I might be able to help you. Could you post your code? I might be able to spot a bug in it for you. By the way, subclassing is much more stable when using an already-compiled dll like the SubClassing and Timer Assistant available at vbAccelerator[^].
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi -
Subclassing in VB Classic is notoriously unforgiving. One time I had a program with a subclass that brought down the whole computer whenever it was run. :(( :(( I've had a lot of experience with subclassing in both VB Classic and C# so I might be able to help you. Could you post your code? I might be able to spot a bug in it for you. By the way, subclassing is much more stable when using an already-compiled dll like the SubClassing and Timer Assistant available at vbAccelerator[^].
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi -
Hi, Did you get anything regarding my problem? I'm waiting for your reply. Best regards, Vilas Shewale ;)
villly wrote: Did you get anything regarding my problem? I'm waiting for your reply. Strange - I sent an email to you both direct and through CP the same night you posted here first. CP had an error, but the direct email wasn't returned, so I thought I had gotten through. Anyway, here it is. **********EMAIL*************** Your problem probably has to do with the fact that the listview control that shows the files/folders is the one getting the delete message rather than the WebBrowser window which is its parent. Fix: Get the child window's handle and the enumerate the windows to find a window with the classname "SHELLDLL_DefView". If this window doesn't recieve the delete messages, enumerate its child windows to find a window with the classname "SysListView32" and subclass it. Hefty fix, huh?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi -
villly wrote: Did you get anything regarding my problem? I'm waiting for your reply. Strange - I sent an email to you both direct and through CP the same night you posted here first. CP had an error, but the direct email wasn't returned, so I thought I had gotten through. Anyway, here it is. **********EMAIL*************** Your problem probably has to do with the fact that the listview control that shows the files/folders is the one getting the delete message rather than the WebBrowser window which is its parent. Fix: Get the child window's handle and the enumerate the windows to find a window with the classname "SHELLDLL_DefView". If this window doesn't recieve the delete messages, enumerate its child windows to find a window with the classname "SysListView32" and subclass it. Hefty fix, huh?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma GandhiHi, Thank you very much for your help. It's working properly. I subclass "SysListView32" object of Web Browser Control and getting the messages from it throught VB.NET's "System.Windows.Forms.NativeWindow". Thank you very much for your help. Best regards, Vilas Shewale ;)
-
villly wrote: Did you get anything regarding my problem? I'm waiting for your reply. Strange - I sent an email to you both direct and through CP the same night you posted here first. CP had an error, but the direct email wasn't returned, so I thought I had gotten through. Anyway, here it is. **********EMAIL*************** Your problem probably has to do with the fact that the listview control that shows the files/folders is the one getting the delete message rather than the WebBrowser window which is its parent. Fix: Get the child window's handle and the enumerate the windows to find a window with the classname "SHELLDLL_DefView". If this window doesn't recieve the delete messages, enumerate its child windows to find a window with the classname "SysListView32" and subclass it. Hefty fix, huh?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma GandhiHi, I am facing the same problem again but in different way now. I subclass "SysListView32" object to get the messages. It's working for other messages like mouse move, mouse over, etc. But I am not able to trap DELETE notofication in the same object. MSDN help says the WM_DELETEITEM message is sent to the owner of a list box or combo box when the list box or combo box is destroyed or when items are removed by the LB_DELETESTRING, LB_RESETCONTENT, CB_DELETESTRING, or CB_RESETCONTENT message. So I try to trap the same message in my code. I am not able to get the DELETE notification by "SysListView32" object. Could you help me in the same context? I want a message which will trap the DELETE message as soon as user will click on "Right click\Delete" or "Delete this file" from the left panel of Web Browser control. Thank you very much for your help. I look forward to hear from you very soon. Best regards, Vilas Shewale :)
-
Hi, I am facing the same problem again but in different way now. I subclass "SysListView32" object to get the messages. It's working for other messages like mouse move, mouse over, etc. But I am not able to trap DELETE notofication in the same object. MSDN help says the WM_DELETEITEM message is sent to the owner of a list box or combo box when the list box or combo box is destroyed or when items are removed by the LB_DELETESTRING, LB_RESETCONTENT, CB_DELETESTRING, or CB_RESETCONTENT message. So I try to trap the same message in my code. I am not able to get the DELETE notification by "SysListView32" object. Could you help me in the same context? I want a message which will trap the DELETE message as soon as user will click on "Right click\Delete" or "Delete this file" from the left panel of Web Browser control. Thank you very much for your help. I look forward to hear from you very soon. Best regards, Vilas Shewale :)
A listbox and a listview are to different things. List view notifications start with LVN_ rather than LB_. BTW, you might want to try using the folder view's object model to intercept delete messages rather than trying to subclass the control. :~
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi -
A listbox and a listview are to different things. List view notifications start with LVN_ rather than LB_. BTW, you might want to try using the folder view's object model to intercept delete messages rather than trying to subclass the control. :~
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi -
Hi, I didn't get the thing what you are trying to explain to me. Could you please send me some sample how i shall achieve the same? I shall wait for your sample code. Thank in advance. Best regards, Vilas Shewale ;)
villly wrote: Could you please send me some sample how i shall achieve the same? Soon I might be able to do this, but for now, look at the code in the file "folder.htt" in your Windows directory. This code deals with selecting, deleting, etc, of files/folders in the list view in explorer and the folder view.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi