<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Visual Basic.NET drawing and graphics problem' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Visual Basic.NET drawing and graphics problem' posted on the 'Visual Basic' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Fri, 24 May 2013 19:13:18 -0700</pubDate>
    <lastBuildDate>Fri, 24 May 2013 19:13:18 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Visual Basic.NET drawing and graphics problem</title>
      <link>http://www.programmersheaven.com/mb/VBasic/430192/430192/visual-basicnet-drawing-and-graphics-problem/</link>
      <description>&lt;em&gt;Hi!&lt;br /&gt;
&lt;br /&gt;
I'm creating new project and want to use drawing and graphics to edit pictures...&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="text-decoration: underline;"&gt;I tried to import system library:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Imports System.Drawing.Drawing2D&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="text-decoration: underline;"&gt;and created object:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Dim G As Graphics = picture.CreateGraphics&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="text-decoration: underline;"&gt;I created simple utility to test writting one line:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;   Private Sub MainLine()&lt;br /&gt;
        X = Int(picture.Width)&lt;br /&gt;
        Y = Int(picture.Height)&lt;br /&gt;
        mLinePos = X / 2&lt;br /&gt;
        Dim P As Pen = New Pen(Color.Red)&lt;br /&gt;
        G.DrawLine(P, mLinePos, 0, mLinePos, Y)&lt;br /&gt;
        curX = X / baseX&lt;br /&gt;
        curY = Y / baseY&lt;br /&gt;
        G.ScaleTransform(curX, curY)&lt;br /&gt;
    End Sub&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="text-decoration: underline;"&gt;Then Visual Basic reported error... and after removing code which was to test and object declaration and import too, project always reports the same error, look below...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Can anybody help me?&lt;br /&gt;
&lt;br /&gt;
Many many thanks for everything!&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;System.InvalidOperationException was unhandled&lt;br /&gt;
  Message="An error occurred creating the form. See Exception.InnerException for details.  The error is: Object reference not set to an &lt;br /&gt;
&lt;br /&gt;
instance of an object."&lt;br /&gt;
  Source="The Body Analyzer"&lt;br /&gt;
  StackTrace:&lt;br /&gt;
       at The_Body_Analyzer.My.MyProject.MyForms.Create__Ins
tance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190&lt;br /&gt;
       at The_Body_Analyzer.My.MyProject.MyForms.get_Form1()&lt;br /&gt;
       at The_Body_Analyzer.My.MyApplication.OnCreateMainFor
m() in C:\Documents\Visual Studio 2008\Projects\The Body Analyzer\The Body &lt;br /&gt;
&lt;br /&gt;
Analyzer\My Project\Application.Designer.vb:line 35&lt;br /&gt;
       at Microsoft.VisualBasic.ApplicationServices.WindowsF
ormsApplicationBase.OnRun()&lt;br /&gt;
       at Microsoft.VisualBasic.ApplicationServices.WindowsF
ormsApplicationBase.DoApplicationModel()&lt;br /&gt;
       at Microsoft.VisualBasic.ApplicationServices.WindowsF
ormsApplicationBase.Run(String[] commandLine)&lt;br /&gt;
       at The_Body_Analyzer.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81&lt;br /&gt;
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)&lt;br /&gt;
       at Microsoft.VisualStudio.HostingProcess.HostProc.Run
UsersAssembly()&lt;br /&gt;
       at System.Threading.ExecutionContext.Run(ExecutionCon
text executionContext, ContextCallback callback, Object state)&lt;br /&gt;
       at System.Threading.ThreadHelper.ThreadStart()&lt;br /&gt;
  InnerException: System.NullReferenceException&lt;br /&gt;
       Message="Object reference not set to an instance of an object."&lt;br /&gt;
       Source="The Body Analyzer"&lt;br /&gt;
       StackTrace:&lt;br /&gt;
            at The_Body_Analyzer.Form1..ctor() in C:\Documents\Visual Studio 2008\Projects\The Body Analyzer\The Body Analyzer\Form1.vb:line &lt;br /&gt;
&lt;br /&gt;
4&lt;br /&gt;
       InnerException: &lt;br /&gt;
&lt;br /&gt;
&lt;/strong&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBasic/430192/430192/visual-basicnet-drawing-and-graphics-problem/</guid>
      <pubDate>Sat, 10 Nov 2012 02:59:00 -0700</pubDate>
      <category>Visual Basic</category>
    </item>
  </channel>
</rss>