Machsupport Forum
Mach Discussion => Mach Screens => Screen designer tips and tutorials => Topic started by: TPS on September 16, 2014, 07:43:15 AM
-
hi,
is there any possibility to update a BMP picture during runtime ?
mine is only update if i start the software.
Thanks Thomas
-
What are you trying to do?
-
Hello Gerry,
sorry for the bad explaining.
my self written postprozessor is creating now a picture (BMP) of the coresponding
cnc program with the finished part.
what i am trying to do is to display this pricture on my screenset.
-i created a picuturebox in my screenset witch is diplaying the file part.bmp
-in my load G-code button a script is loading the g-code file (no problem) and it is doing a filecopy from actpart.bmp to the part.bmp
an here starts my problem, because the picturebox is not updated dynamicly. if i reload the screenset or stop and start Mach3 software
the picture is updated.
-in my close file button a script close the g-code file (no problem) and does a filecopy from blank.bmp to part.bmp and of course
the same problem with the update.
hope you understand now what i am trying to do.
any other solution is welcome.
Thanks Thomas
-
OK, that's a very clear explanation.
Unfortunately, I don't know of anyway to get Mach3 to update the screen.
-
OK i found a solution.
here the code:
Dim objDialog
Dim filesys
set filesys=CreateObject("Scripting.FileSystemObject")
' Create a dialog object
Set objDialog = CreateObject( "UserAccounts.CommonDialog" )
objDialog.InitialDir = "C:\Programme\Platemaster\Projekte"
objDialog.Filter = "Programm|*.tap"
' Open the dialog and return the selected file name
If objDialog.ShowOpen Then
If filesys.FileExists(Left(objDialog.FileName, Len(Trim(objDialog.FileName)) - 4) + ".bmp") Then
filesys.CopyFile Left(objDialog.FileName, Len(Trim(objDialog.FileName)) - 4) + ".bmp", "C:\Mach3\Bitmaps\Platemaster\Anzeige.BMP"
End If
LoadStandardLayout()
Sleep(3000)
LoadFile(objDialog.FileName)
Else
GetFileName = ""
End If
ok its reloading the whole screenset and not only the bitmap, but its working.
Thomas