ich habe ein kleines problem:
ich habe eine picturebox (PB1)
ich benutze diesen code um diese zu füllen:
Dann habe ich versucht so zu speichern:
aber raus kommt ein leeres bild! wie kann ich das geschriebene auch mitspeichern?
und ich habe es auich nochmal so getestet:
dann kommt aber dieser fehler :
ich habe eine picturebox (PB1)
ich benutze diesen code um diese zu füllen:
VB.NET-Quellcode
- For i = 0 To 130
- PB1.CreateGraphics().DrawLine(Pens.Gray, 0, i, 600, i)
- Next
- PB1.CreateGraphics().DrawString("Cpu-Auslastung: " & Label2.Text, Label4.Font, Brushes.Black, 12, 39)
- PB1.CreateGraphics().DrawString("Ram-Auslastung: " & Label5.Text, Label4.Font, Brushes.Black, 12, 71)
- PB1.CreateGraphics().DrawString(System.DateTime.Now, Label4.Font, Brushes.Black, 393, 104)
Dann habe ich versucht so zu speichern:
aber raus kommt ein leeres bild! wie kann ich das geschriebene auch mitspeichern?
und ich habe es auich nochmal so getestet:
dann kommt aber dieser fehler :
VB.NET-Quellcode
- System.NullReferenceException wurde nicht behandelt.
- Message="Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."
- Source="SystemTool"
- StackTrace:
- bei SystemTool.Form1.Timer1_Tick(Object sender, EventArgs e) in C:\Users\%Username%\Pictures\SystemTool\SystemTool\Form1.vb:Zeile 47. bei System.Windows.Forms.Timer.OnTick(EventArgs e) bei System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m) bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) bei System.Windows.Forms.Application.Run(ApplicationContext context) bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) bei SystemTool.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:Zeile 81. bei System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() bei System.Threading.ThreadHelper.ThreadStart_Context(Object state) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading.ThreadHelper.ThreadStart()
- InnerException:
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Zukatane“ ()