AdvancedHMI Software
General Category => Support Questions => Topic started by: oqapsking on May 14, 2017, 08:27:10 AM
-
hello
in my project what i built is multi page project
i the first page it monitors 6 plc`s
the way i built my software is to look and work like dvr software
so in the main page
i have 6 panels each panel have the same components and background the only difference is the com
my project is 1920;1080 size
each panel is live and when i click on it it opens another form that have the same components but with bigger size
now to the problems:
1- each time i make changes i get some errors and missing files i close the program (VB net 2012) and then re open it
the project is back to normal.(see the photos in the attachment)
2- the flickering i solved half of it
the main page which has 6 panels keeps flickering
the another page got fixed when i used this code
Protected Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim cp As CreateParams = MyBase.CreateParams
cp.ExStyle = cp.ExStyle Or &H2000000
Return cp
End Get
End Property 'CreateParams
i hope someone can help me
by the way my pc is
core i5 3.10GHz
10 Gbyte ram
with 250 ssd
and gt630 vga card
i read something about using computer hardware instead of net framework but i didn't find any how to do it
with thanks
-
error example
-
it even takes a lot of time loading the project
-
An out of memory typically occurs when you have code that is recursively doing something. It looks like you are loading something from a file. It may be repeat ably loading those contents and running out of memory.
Are you putting pictures in the background of your panels?
-
yes i do the photos size was 1920:1080 and i now changed it to lower size as the panels
-
after i changed the photos size
the project became more smoother
but the weird thing is that when i change the graphicselect1 in imageselectbybit control i have to change it one by one if i change it when i select them all the gif does not play
-
If you are using a Panel with a BackgroundImage, then you may have to create a "non-flickering" panel:
Public Class PanelNoFlicker
Inherits Panel
Public Sub New()
MyBase.New
Me.SetStyle(System.Windows.Forms.ControlStyles.OptimizedDoubleBuffer Or
System.Windows.Forms.ControlStyles.AllPaintingInWmPaint Or
System.Windows.Forms.ControlStyles.UserPaint Or
System.Windows.Forms.ControlStyles.SupportsTransparentBackColor, True)
End Sub
End Class
Here is something interesting..... If you look at the source code for the ImageList:
http://www.dotnetframework.org/default.aspx/DotNET/DotNET/8@0/untmp/whidbey/REDBITS/ndp/fx/src/WinForms/Managed/System/WinForms/ImageList@cs/4/ImageList@cs
There is a note in the code:
// ImageList appears to consume an exponential amount of memory
// based on image size x bpp. Restrict this to a reasonable maximum
// to keep people's systems from crashing.
-
thanks for your help archie
the second problem is solved
but i still have to re open my project and rebuild it after changing any thing
some times after changing a label text
i get the memory error
any ideas
and the imagelist code that you referred to is in sharp which means i don`t understand it or how to use it as am a noop in vb net
-
The link to the code I sent is just for reference and not to be used. It lets you see the notes and how Microsoft does their code.
-
i tried the no flickering panel it got worse
-
If something doesn't work for you then just go back to what does work.
In my opinion, you should definitely consider re-designing your project to make it "lighter".
-
i did and i reduced the photos sizes
and no flickering
but i still get the memory out exception
so i opened new project i am gonna do each one in a different project then after i finish them i will copy them all to one project
-
If you are starting over, I would recommend to migrate to VB 2013 or 2015.
-
If you are starting over, I would recommend to migrate to VB 2013 or 2015.
I have been recommending VS 2017 now because 2015 has that issue that sometimes the drivers will not always show up in the toolbox.
-
Been using 2013 mostly, so have not faced that issue so far. Thanks for the tip Archie.
-
ok i will download 2017
and what is better win10 or win7? with thanks
-
is Microsoft.Visual.Studio.2017..Community good for ahmi?
-
ok i will download 2017
and what is better win10 or win7? with thanks
I do not think there is a difference for your purposes.
-
as it seams it solves the out of memory error