VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm() shrinks my main display form window
Initially
The display is big
and then when I open login form
The whole display shrinks
VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm() shrinks my main display form window
Initially
The display is big
and then when I open login form
The whole display shrinks
I cannot reproduce when I test with the samples.
Do you have anything in your code to apply scaling, setting DPI or similar?
When you test do you have a scaling or DPI setting applied to your Windows?
I tried to change a sample to have Inherit in AutoScaleMode, but still nothing happens when the login dialog is opened. Just for my understanding what is it that change? The size of just the main window of you application or the entire resolution or scale of your display?
Also could you please provide the line(s) of code where you instantiate and open the login dialog?
The resolution of the app,
I integrated it in another app too, and the resolution changes (its in 32-bit)
As from the pic, inside the blue box, you can see it shrinkedbut before it looks like this
in second picture and third picture, it can be seen, the main app is bigger, but as the video opens, it shrinked (as seen in first picture)And I was wondering if the video (imageviewercontrol) have be set to have certain height and width (maybe this would be the solution)
I must say that I am a bit confused now. In your original post you write that it shrinks when you open the login dialog, but now in your reply you write that it shrinks when you open the window containing the video, but apparently not when you open the login dialog (referring to pic 3)?
Also, you have not shared the lines of code executed when this happens.
The ImageViewerControl does not have any specific size it needs to be and would definitely not affect another dialog than the one it resides in.
My Apology for not having clear explanation,
I have attached the video in the zipped file. Hopefully this can explain.
The video seems like shrinking the main container app
Private mClientControl As ClientControl = Nothing
Private WithEvents mInnerVideoControl As ImageViewerControl = Nothing
Public Overrides Property InnerVideoControl() As Object
Get
Return mInnerVideoControl
End Get
Set(ByVal value As Object)
mInnerVideoControl = value
End Set
End Property
Public Shared Function GetClassInstance(ByVal Sender As SharedVideoControl) As MilestoneVideoClass
Const FunctionName As String = "MilestoneVideoClass.GetClassInstance"
Dim ObjInstance As MilestoneVideoClass
Try
ObjInstance = New MilestoneVideoClass
ObjInstance.gOwningControl = Sender
dbg.WriteToDebugFile(CInt(Dlvl.DATA), FunctionName, "Instanciating Milestone Video Object ")
dbg.WriteToDebugFile(CInt(Dlvl.DATA), FunctionName, "Creating the Inner Video Object")
VideoOS.Platform.SDK.Environment.Initialize()
VideoOS.Platform.SDK.UI.Environment.Initialize()
VideoOS.Platform.SDK.Export.Environment.Initialize()
ObjInstance.mClientControl = ClientControl.Instance
ObjInstance.mInnerVideoControl = ObjInstance.mClientControl.GenerateImageViewerControl() 'Instanciate the Milestone Video Control
ObjInstance.Init()
Return ObjInstance
Catch ex As Exception
dbg.LogError(FunctionName, "Error - " & ex.Message)
Return Nothing
End Try
End Function
Seems like initiation of clientControl shrinks the main window
The line 1 shrinks it. When I commented this one out, the window does not shrink.
Can I instantiate imageviewer without ClientControl.GenerateImageViewerControl
Just in case (my SDK version is 22.1)
Could you please try building your application in 64-bit and using latest SDK nuget packages (23.3) and see whether the problem persists there?
Also you might try using the WPF version of the ImageViewerControl (ImageViewerWpfControl). It does not require using a Generate method, but can simply be instantiated.
I wish I could use 23.3 but our app is in 32-bit and I believe 22.1 is the last 32-bit (please correct me if I am wrong).
I have tried trying with ImageViewerWpfControl, but still the same: It shrinks on scale larger than 100%
It is a bit unclear to me what you are saying. You say that the line 1 shrinks it, but on line 1 you just have “Private mClientControl As ClientControl = Nothing”. Since you then talk about GenerateImageViewerControl I assume you mean line 26?
In any case I tried making a small 32-bit program using SDK 22.1 and with main form opening another form doing following in OnLoad and it works fine - no resizing of anything:
private void Form2\_Load(object sender, EventArgs e)
{
var ivc = ClientControl.Instance.GenerateImageViewerControl();
panel1.Controls.Add(ivc);
ivc.Dock = DockStyle.Fill;
ivc.CameraFQID = Configuration.Instance.GetItem(new Guid("32244d6a-59ad-4407-a280-d6c64a130875"), Kind.Camera).FQID;
ivc.Initialize();
ivc.Connect();
ivc.Selected = true;
ivc.StartLive();
}
So I am at a loss what is happening on your system unless it is something related to VB.