Hi all, I have taken the default “VideoPreview” plugin as a basis and am adapting it according to my needs. What I have to do for “drag” the PTZ preset buttons in my panel, where I view the camera?
in the default plugin, provided by you, it is not possible to drag preset.. but after several attempts I was able to do it on my code… but with subsequent changes, I can’t see them anymore and I don’t understand where I’m wrong..
I have set
panel2.allowdrop = true
panelmain.allowdrop = true
vbviewitemusercontrol.allowdrop = true
When it worked I was using the 2019R1 version.. now I user the 2020R3, can it depend on this? Or should I create the sub panel2_DragDrop?
as said before, I was able to make them work.. tell me if I have to integrate with lines of code please?
Milestone does not support this functionality as far as we understand it. We are curious about it. You mentioned dragging PTZ preset buttons, can you please explain where these buttons come from? Please add screen captures with the explanation.
ok.. so I explain better.. I get default plugin “VideoPreview”.. I translate plugin in VBnet, with version 2020R1 and I think I had net framework 4.6 (or 4.5)..
After I needed to drag the presets (I attached photos) into my plugin and in the forum, I always read that it could not be possible.. but after many tests, I had succeeded !!! .. even if I put the plugin in the 2x2 screen, I could get the presets in all and 4 screens with my 4 plugin..
then i updated to 2020R3 version and put net framework 4.7, made changes in my project to add functions .. and i realized after a month of changes that the preset, was no longer dragged .. now i don’t remember what i did ..
i just remember if i reversed the code position on the sub init, the presets worked .. but i’m sure it worked, so something i did
I now understand. I am now able to reproduce. I can reproduce this with your plugin and with the unmodified Video Preview sample plugin.
Now my problem is that I think this is the behavior that has always been!
I believe that overlay buttons are only applicable to the built-in camera view items, not to MIP SDK based view items using the ImageViewerControl.
If I go one step further and test with Smart Client 2020R1 I still cannot make it work.
From your description you might have a way to make it work in the 2020R1 Smart Client. Can you please double-check?
If you can make it work in 2020R1 it should work also in 2020R3 but I fear you are mistaken and will discover that it does not work in either of the two versions.
Can you please double-check? If you have an idea how I might make it work please let me know.
oh no .. i’m absolutely sure it worked .. now i try on 2020R1 and net framework 4.5 .. i just remember a few things, like if i put the border on the panel it didn’t work .. and I was copying code from another plugin, like " overlay etc .. "or I had added some string … as soon as I test on 2020R1 or if I find string, I’ll tell you .. let me know if you found dolution please ;(
The way I see it. If I could make it work in 2020R1 I think I would be able to make it work in 2020R3 because it is extremely seldom that the compatibility is broken by an upgrade. But the challenge is that I do not know how to go about making it work in 202R1 or any version. I really hope you can give the information how to make it work (in any version) because you had it working…
I tried with the 2019R3 and it doesn’t work .. I have to see to test it on the 2020R1.. the net framework I used was 4.5.2 then I updated everything .. but it worked I’m sure.. I remember also that I taking pieces of code here and there from various sites, until at some point it worked.. but I don’t remember what made it work..
now I try to put the inside init (): (Im working in VB net.. and in VBnet it worked, i don’t know if same for C#…)
_imageViewerControl.AllowDrop = True
and I created sub:
Private Sub _imageViewerControl_DragDrop(sender As Object, e As DragEventArgs) Handles _imageViewerControl.DragDrop
Dim ptzbox As PtzOverlayControl = CType(sender, PtzOverlayControl)
Dim obj As New DataObject
obj.SetData(DataFormats.Bitmap, ptzbox)
Dim eff As DragDropEffects
eff = _imageViewerControl.DoDragDrop(obj, DragDropEffects.Move)
End Sub
but i don’t know the software classes so i get error when i drop preset on camera.. with this code i get no errors when compiling..
I really hope you are able to figure out how you made it work, because I cannot make it work either in my testing. At first we (the team and I) had an idea it could not be done, but if you say it can be made to work we are eager to see how.
I want retry to put version 2020 R1 Essential plus, but I dont have free licence for it? where I can get it? free is only last version… (I hope that there is page with old vrsion licence, or Im blocked)
From our knowledge and experience, it will not make a difference testing with another VMS, it is all code in the Smart Client so testing with the Smart Client in the right version should be sufficient.
tried with the 2019 R3 version but nothing .. now I’m trying with the 2020 R1 version … anyway it was my fault .. I had to say it immediately while it worked on the forum .. today I was not here to test
I remember that I had found the solution on another forum on a software similar to milestone, where I read that they had the same problem as me, on dragging the presets on the panel .. and they had replied with the solution .. in that forum I had copied the code ..
I remember that the panel had to have a 3d border and maybe I add another class to file ViewItemUserControl..
maybe I imported to the solution a reference to something .. at the time I did so many tests that when it worked, I didn’t know what I had done
unfortunately I don’t remember the name of the software and the site with this forum .. I’m looking for it