<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7522233941845867910</id><updated>2012-02-16T14:55:49.259-08:00</updated><title type='text'>load multi image vb2005</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://loadmultiimage.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7522233941845867910/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://loadmultiimage.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>vbnetcode</name><uri>http://www.blogger.com/profile/04926504053784281645</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7522233941845867910.post-6796358121427518195</id><published>2009-02-04T02:09:00.001-08:00</published><updated>2009-02-04T02:09:19.188-08:00</updated><title type='text'></title><content type='html'>Create a Windows Application&lt;br /&gt;1. Start Microsoft Visual Studio .NET or Microsoft Visual Studio 2005. &lt;br /&gt;2. On the File menu, point to New, and then click Project. &lt;br /&gt;3. Under Project Types, click Visual Basic Projects.&lt;br /&gt;&lt;br /&gt;Note In Visual Studio 2005, click Visual Basic under Project Types. &lt;br /&gt;4. Under Templates, click Windows Application. &lt;br /&gt;5. In the Name text box, type ImageDemo, and then click OK. &lt;br /&gt;&lt;br /&gt;Form1.vb is created. &lt;br /&gt;&lt;br /&gt;Back to the top&lt;br /&gt;&lt;br /&gt;Replace the Existing Constructor of Your Form&lt;br /&gt;By default, the existing constructor of Form1 does not accept any parameters. To pass a list of images and their descriptions to the constructor of Form1, modify the default constructor. To do this, follow these steps: 1. On the View menu, click Code. &lt;br /&gt;2. In the Form1.vb file, locate the following code in the Windows Form Designer generated code region:Public Sub New()&lt;br /&gt;   MyBase.New()&lt;br /&gt;&lt;br /&gt;   'The Windows Form Designer requires this call.&lt;br /&gt;   InitializeComponent()&lt;br /&gt;&lt;br /&gt;   'Add any initialization after the InitializeComponent() call.&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt; &lt;br /&gt;3. Replace the code that you located in step 2 with the following code:   ' Declare the constructor of Form1 to accept the passed command-line arguments.&lt;br /&gt;   Public Sub New(ByVal CmdArgs() As String)&lt;br /&gt;      MyBase.New()&lt;br /&gt;&lt;br /&gt;      'The Windows Form Designer requires this call.&lt;br /&gt;      InitializeComponent()&lt;br /&gt;&lt;br /&gt;      'Add any initialization after the InitializeComponent() call.&lt;br /&gt;      Me.WindowState = FormWindowState.Maximized&lt;br /&gt;&lt;br /&gt;      ' Call the method that opens and then displays your images.&lt;br /&gt;      OpenAndDisplayImages(CmdArgs)&lt;br /&gt;   End Sub&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Back to the top&lt;br /&gt;&lt;br /&gt;Add a New Module to Your Project&lt;br /&gt;To pass a list of images and their descriptions to the constructor of Form1, add a new module to your project and then create a new Form1 object in the Main method of your new module. The Main method accepts command-line arguments. To do this, follow these steps: 1. On the Project menu, click Add Module. &lt;br /&gt;2. In the Add New Item - ImageDemo dialog box, click Open. &lt;br /&gt;&lt;br /&gt;By default, Module1.vb is created. &lt;br /&gt;3. In the Module1.vb file, locate the following statement:Module Module1&lt;br /&gt; &lt;br /&gt;4. Add the following code after the code that you located in step 3:' Declare a Main method that accepts your list of images and their descriptions &lt;br /&gt;' as command-line arguments.&lt;br /&gt;Public Sub Main(ByVal CmdArgs() As String)&lt;br /&gt;   ' Create a Form1 object by passing the received command-line arguments &lt;br /&gt;   ' to the constructor of Form1 and then display the new Form1 object.&lt;br /&gt;   Application.Run(New Form1(CmdArgs))&lt;br /&gt;End Sub&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Back to the top&lt;br /&gt;&lt;br /&gt;Change the Startup Object of Your Project&lt;br /&gt;Your project is currently configured to use Form1 as the Startup object. To pass command-line arguments to your project, modify the Startup object for your project to Module1. To do this, follow these steps: 1. On the Project menu, click ImageDemo Properties. &lt;br /&gt;2. In the ImageDemo Property Pages dialog box, click to select Module1 from the Startup object combo box, and then click OK. &lt;br /&gt;&lt;br /&gt;Back to the top&lt;br /&gt;&lt;br /&gt;Add Code to Open and Then to Display Images&lt;br /&gt;To open and then to display the list of images that are passed to the constructor of your Form1 object, follow these steps: 1. In Form1.vb, locate the following code:End Class&lt;br /&gt; &lt;br /&gt;2. Add the following code before the code that you located in step 1:' Declare a method to control the programming logic that you must have  &lt;br /&gt;' to open and then to display all your images.&lt;br /&gt;Private Sub OpenAndDisplayImages(ByVal CmdArgs() As String)&lt;br /&gt;   ' Variable to iterate through your list of images.&lt;br /&gt;   Dim Count As Integer&lt;br /&gt;   Try&lt;br /&gt;      ' Temporarily suspend the layout logic for your Form1 object.&lt;br /&gt;      Me.SuspendLayout()&lt;br /&gt;      ' Iterate through your list of images.&lt;br /&gt;      For Count = 0 To (CmdArgs.Length - 1) Step 2&lt;br /&gt;         ' Call the method that opens and then displays the image that corresponds to &lt;br /&gt;         ' the image file name that is indexed by the current value of Count.&lt;br /&gt;         OpenAndDisplay(CmdArgs(Count), Count)&lt;br /&gt;      Next&lt;br /&gt;      Me.ResumeLayout(False)&lt;br /&gt;   Catch ex As Exception&lt;br /&gt;      MessageBox.Show(ex.ToString())&lt;br /&gt;   End Try&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;' Declare a method to open and then to display the image that ImageFileName specifies.&lt;br /&gt;Private Sub OpenAndDisplay(ByVal ImageFileName As String, ByVal Count As Integer)&lt;br /&gt;   ' Declare a variable to hold a reference to your image.&lt;br /&gt;   Dim ImageStream As System.IO.FileStream&lt;br /&gt;   Try&lt;br /&gt;      ' Open your image for Read access as a new FileStream.&lt;br /&gt;      ImageStream = New System.IO.FileStream(ImageFileName, _&lt;br /&gt;         System.IO.FileMode.Open, System.IO.FileAccess.Read)&lt;br /&gt;      ' Declare a variable to hold a reference to your PictureBox.&lt;br /&gt;      Dim MyPictureBox As New PictureBox&lt;br /&gt;      ' Set the image for the PictureBox to reduce or to expand &lt;br /&gt;      ' to fit the size of the PictureBox.&lt;br /&gt;      MyPictureBox.SizeMode = PictureBoxSizeMode.StretchImage&lt;br /&gt;      ' Set the location of the PictureBox based on the value of Count.&lt;br /&gt;      MyPictureBox.Location = New System.Drawing.Point(Count * 64, 0)&lt;br /&gt;      ' Set the size of the PictureBox.&lt;br /&gt;      MyPictureBox.Size = New System.Drawing.Size(128, 128)&lt;br /&gt;      ' Set the BorderStyle of the PictureBox.&lt;br /&gt;      MyPictureBox.BorderStyle = BorderStyle.Fixed3D&lt;br /&gt;      ' Set the image of the PictureBox from the opened FileStream.&lt;br /&gt;      MyPictureBox.Image = System.Drawing.Image.FromStream(ImageStream)&lt;br /&gt;      ' Add the PictureBox to your Form1 object.&lt;br /&gt;      Me.Controls.Add(MyPictureBox)&lt;br /&gt;   Catch ex As Exception&lt;br /&gt;      MessageBox.Show(ex.ToString())&lt;br /&gt;   End Try&lt;br /&gt;End Sub&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Back to the top&lt;br /&gt;&lt;br /&gt;Complete Code Listing&lt;br /&gt;Module1.vb&lt;br /&gt;Option Strict On&lt;br /&gt;&lt;br /&gt;Module Module1&lt;br /&gt;    &lt;br /&gt;   ' Declare a Main method that accepts your list of images and their descriptions, &lt;br /&gt;   ' as command-line arguments.&lt;br /&gt;   Public Sub Main(ByVal CmdArgs() As String)&lt;br /&gt;      ' Create a Form1 object by passing the received command-line arguments &lt;br /&gt;      ' to the constructor of Form1, and then display the new Form1 object.&lt;br /&gt;      Application.Run(New Form1(CmdArgs))&lt;br /&gt;   End Sub&lt;br /&gt;&lt;br /&gt;End Module&lt;br /&gt;Form1.vb&lt;br /&gt;Option Strict On&lt;br /&gt;&lt;br /&gt;Public Class Form1&lt;br /&gt;    Inherits System.Windows.Forms.Form&lt;br /&gt;&lt;br /&gt;#Region " Windows Form Designer generated code "&lt;br /&gt;&lt;br /&gt;   ' Declare the constructor of Form1 to accept the passed command-line arguments.&lt;br /&gt;   Public Sub New(ByVal CmdArgs() As String)&lt;br /&gt;      MyBase.New()&lt;br /&gt;&lt;br /&gt;      'The Windows Form Designer requires this call.&lt;br /&gt;      InitializeComponent()&lt;br /&gt;&lt;br /&gt;      'Add any initialization after the InitializeComponent() call.&lt;br /&gt;      Me.WindowState = FormWindowState.Maximized&lt;br /&gt;&lt;br /&gt;      ' Call the method that opens and then displays your images.&lt;br /&gt;      OpenAndDisplayImages(CmdArgs)&lt;br /&gt;   End Sub&lt;br /&gt;&lt;br /&gt;   'Form overrides dispose to clean up the component list.&lt;br /&gt;   Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;      If disposing Then&lt;br /&gt;         If Not (components Is Nothing) Then&lt;br /&gt;            components.Dispose()&lt;br /&gt;         End If&lt;br /&gt;      End If&lt;br /&gt;      MyBase.Dispose(disposing)&lt;br /&gt;   End Sub&lt;br /&gt;&lt;br /&gt;   'Required by the Windows Form Designer.&lt;br /&gt;   Private components As System.ComponentModel.IContainer&lt;br /&gt;&lt;br /&gt;   'NOTE: The Windows Form Designer requires the following procedure.&lt;br /&gt;   'It can be modified by using the Windows Form Designer.  &lt;br /&gt;   'Do not modify the procedure by using the Code editor.&lt;br /&gt;   &lt;System.Diagnostics.DebuggerStepThrough()&gt; Private Sub InitializeComponent()&lt;br /&gt;      components = New System.ComponentModel.Container&lt;br /&gt;      Me.Text = "Form1"&lt;br /&gt;   End Sub&lt;br /&gt;&lt;br /&gt;#End Region&lt;br /&gt;&lt;br /&gt;   ' Declare a method to control the programming logic that you must have &lt;br /&gt;   ' to open and then to display all your images.&lt;br /&gt;   Private Sub OpenAndDisplayImages(ByVal CmdArgs() As String)&lt;br /&gt;      ' Variable to iterate through your list of images.&lt;br /&gt;      Dim Count As Integer&lt;br /&gt;      Try&lt;br /&gt;         ' Temporarily suspend the layout logic for your Form1 object.&lt;br /&gt;         Me.SuspendLayout()&lt;br /&gt;         ' Iterate through your list of images.&lt;br /&gt;         For Count = 0 To (CmdArgs.Length - 1) Step 2&lt;br /&gt;            ' Call the method that opens and then displays the image that corresponds to &lt;br /&gt;            ' the image file name that is indexed by the current value of Count.&lt;br /&gt;            OpenAndDisplay(CmdArgs(Count), Count)&lt;br /&gt;         Next&lt;br /&gt;         Me.ResumeLayout(False)&lt;br /&gt;      Catch ex As Exception&lt;br /&gt;         MessageBox.Show(ex.ToString())&lt;br /&gt;      End Try&lt;br /&gt;      End Sub&lt;br /&gt;&lt;br /&gt;   ' Declare a method to open and then to display the image that ImageFileName specifies.&lt;br /&gt;   Private Sub OpenAndDisplay(ByVal ImageFileName As String, ByVal Count As Integer)&lt;br /&gt;      ' Declare a variable to hold a reference to your image.&lt;br /&gt;      Dim ImageStream As System.IO.FileStream&lt;br /&gt;      Try&lt;br /&gt;         ' Open your image for Read access as a new FileStream.&lt;br /&gt;         ImageStream = New System.IO.FileStream(ImageFileName, _&lt;br /&gt;            System.IO.FileMode.Open, System.IO.FileAccess.Read)&lt;br /&gt;         ' Declare a variable to hold a reference to your PictureBox.&lt;br /&gt;         Dim MyPictureBox As New PictureBox&lt;br /&gt;         ' Set the image for the PictureBox to reduce or to expand &lt;br /&gt;         ' to fit the size of the PictureBox.&lt;br /&gt;         MyPictureBox.SizeMode = PictureBoxSizeMode.StretchImage&lt;br /&gt;         ' Set the location of the PictureBox based on the value of Count.&lt;br /&gt;         MyPictureBox.Location = New System.Drawing.Point(Count * 64, 0)&lt;br /&gt;         ' Set the size of the PictureBox.&lt;br /&gt;         MyPictureBox.Size = New System.Drawing.Size(128, 128)&lt;br /&gt;         ' Set the BorderStyle of the PictureBox.&lt;br /&gt;         MyPictureBox.BorderStyle = BorderStyle.Fixed3D&lt;br /&gt;         ' Set the image of the PictureBox from the opened FileStream.&lt;br /&gt;         MyPictureBox.Image = System.Drawing.Image.FromStream(ImageStream)&lt;br /&gt;         ' Add the PictureBox to your Form1 object.&lt;br /&gt;         Me.Controls.Add(MyPictureBox)&lt;br /&gt;      Catch ex As Exception&lt;br /&gt;         MessageBox.Show(ex.ToString())&lt;br /&gt;      End Try&lt;br /&gt;   End Sub&lt;br /&gt;&lt;br /&gt;End Class&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;source :http://msdn2.microsoft.com&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;a href="http://gambarbergerak-riaq.blogspot.com"&gt;Trik Gambar Bergerak&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://gambar-dimouse.blogspot.com"&gt;Trik Gambar-dimouse&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://hapuspwdmysql.blogspot.com"&gt;Trik hapus pwd mysql&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://insertintodb.blogspot.com"&gt;Trik insertin to db&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://jadirootdilinux.blogspot.com"&gt;Trik jadi root dilinux&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://jam-distatus-bar.blogspot.com"&gt;Trik jam-distatus-bar&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://koneksi-kedatabase.blogspot.com"&gt;Trik Koneksi-ke database&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://koneksi-msql-php.blogspot.com"&gt;Trik Koneksi-msql-php&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://lihat-database-mysql.blogspot.com"&gt;Trik lihat-database-mysql&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://membahas-fungsi-else.blogspot.com"&gt;Trik membahas-fungsi-else&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://member-area-riaq.blogspot.com"&gt;Trik member-area&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=woodworkin09c-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=B000FI73MA&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt; &lt;iframe src="http://rcm.amazon.com/e/cm?t=woodworkin09c-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=B000P9ZBFA&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7522233941845867910-6796358121427518195?l=loadmultiimage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://loadmultiimage.blogspot.com/feeds/6796358121427518195/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://loadmultiimage.blogspot.com/2009/02/create-windows-application-1.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7522233941845867910/posts/default/6796358121427518195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7522233941845867910/posts/default/6796358121427518195'/><link rel='alternate' type='text/html' href='http://loadmultiimage.blogspot.com/2009/02/create-windows-application-1.html' title=''/><author><name>vbnetcode</name><uri>http://www.blogger.com/profile/04926504053784281645</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
