Martes, Pebrero 14, 2012

How to save an image in ms access database using vb.net?

You can store any image format in the database because you are storing it using Byte data.

Yes, you can click on an image in a DataGridView and have it display larger.  This is something I used a few weeks ago to do just that:


Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
        If e.ColumnIndex <> 1 Then Exit Sub
        fn = DataGridView1.Item(1, e.RowIndex).Value.ToString
        Form2.ShowDialog()
    End Sub

In this example, if the click occurs in any column other than the second column (index 1) then don't do anything (Exit Sub).  If the click occurs in the second column, I retrieve the filename (including its path which I also show in the DataGridView, and pass that in a global variable to a second form.  The second form has only 1 PictureBox with its SizeMode set to  Zoom.  Set the PictureBox.Image property to Image.FromFile using the path and filename in the global variable.

One thing you should know about storing images in a database is that the database will become VERY large depending on the size of each image and the number of images you store.


http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/09c4e2f4-540f-409b-a503-db941e81b965 

How to save and image to msaccess using vb 6 code?

How to save and image to msaccess using vb 6 code?


(a) Create a database file (MS ACCESS) having a DATAFIELD name (say image1). 

(b) Place a DATA component (say DATA1) in main vb form. Select this DATA1 component and then select database name property and browse for above MS ACCESS file and select to open the file. This will save the file path. 

(c) Place a text box (say text8) in vb form and set it's visible property to false. Also, select DATASOURCE property 
(say DATA1) and DATAFIELD(say image1). 

(d) Place a common dialog box in your form (say commondialog1). 

(e) Place an image box component in your form (say image1) 

(f) Now, this simple code will load and save any image present in your hard disk: 

Private Sub Command4_Click() 
Form1.CommonDialog1.Filter = "JPG Files|*.jpg|BMP Images|*.bmp|GIF Images|*.gif" 
On Error Resume Next 
Form1.CommonDialog1.ShowOpen 
On Error Resume Next 
Form1.CommonDialog1.CancelError = True 
Form1.Text8.Text = Form1.CommonDialog1.FileName 
a = Form1.Text8.Text 
Form1.Image1.Picture = LoadPicture(a) 

End Sub 



How to Read/Write Image files from/to Access DB using ADO

AUTOCAD DRAFTING AND DESIGNING SEMINAR WORKSHOP

At the end of the eight-hour seminar, the 3rd year BSIT, BSIS, and BSCS participants were given an evaluation form to evaluate the seminar. Participants suggest some seminar about Game making using PHP, PC Troubleshooting, AutoCAD & Web programs, Photoshop after effects, 3d Games & Robotic activities, Movie making using Sony Vegas, and Adobe Photoshop.
Participants commented that the seminar was great and the resource person explained the topic very well. Others also commented that the time allotted for the seminar was not enough because understanding the whole application of AutoCAD is not easy. In general the seminar was successful and they learned new things.
Computer technology has many faces, technology that produces and contributes to the positive and significant grounds of our daily lives. We cannot imagine a life without it. Through different high technology present today, interests and skills are developing for the progression of the society.

One of the faces of today’s modern technology is AutoCAD. A software that is developed and created to help people design buildings, products, or public spaces ,instead of  drawing up plans hand in hand .It produces 2D or 3D outputs on incomparable speeds, thus saving human time and effort  to a large extent. By using AutoCAD, we can design and shape the world us.
 In order to understand the technological art brought by AutoCAD, the Group 4 BSCS students conducted an eight-hour seminar workshop about the said application. This activity was participated by forty (40) junior BSCS, BSIT, and BSIS students on the 28th January 2012 at Computer Laboratory 2, Sullivan Building of Notre Dame of Midsayap College, Midsayap, Cotabato.
At the end of the seminar-workshop, the participants identified and used the different drawing and drafting tools of AutoCAD and created an architectural design using the said application.

PROJECT TITLE: AUTOCAD DRAFTING AND DESIGNING SEMINAR-WORKSHOP
PROJECT GOAL:      TO TRAIN THE PARTICIPANTS on how to design and draft using AUTOCAD
PROGRAM OBJECTIVES:  At the end of the 8hours training, 40 students
Of BSIT, BSCS and BSIS will be able to:
1.      Identify the different drawing and drafting tools of AUTOCAD 2007
2.      Use the different drawing and drafting tools of AUTOCAD 2007
3.      Create a 2 Dimensional architectural design using AUTOCAD 2007

AUTOCAD DRAFTING AND DESIGNING SEMINAR WORKSHOP
Seminar Outline

Course Description:

            This course is designed to bring the drafter, designer, engineer or new user to a productive level of experience. It is an appropriate course of all design disciplines and for individuals who edit, view or work with others that create design content.
            In this training course, participants will use AutoCAD 2007 as a tool in drafting and designing activities. There will be a brief introduction about benefits of being expert in this kind of tool, as well as familiarization of its environment. From there, the participants will be well verse in using it and have a comfy time drafting and designing.   

Course Objectives:

By completing this course, participants are expected to:
·         Create accurate dimensioned drawings;
·         Understand how coordinate system is used to define locations of drawing in CAD;
·         Learn to use helpful Commands in drafting ;
·         Modify drawings or objects with ease;
·         Create two-dimensional design drawing


Course Outline:

I – GETTING STARTED WITH AUTOCAD
o   AutoCAD Screen Lay-out
o   Start Up and New Drawing Wizard
o   Saving and Leaving a Drawing Session
o   Exiting From AutoCAD


II – SPECIFYING COORDINATES
o   Enter Cartesian Coordinates
o   Specifying Absolute  And Relative Coordinates
o   Enter Polar Coordinates
o   Dynamic Input and Limits
o   Grid Settings
o   Orthogonal Mode
o   Picking Coordinates on the Screen
§  Object Snaps
§  Running Object Snap and OSNAP Mode
§  Polar Tracking and Polar Snap

III – DRAWING IN TWO DIMENSIONS
o   Drawing Simple Lines
§  Using Line Command
§  Drawing Rectangle
o   Drawing Curves and Point Objects
§  Drawing Circles
§  Drawing Arcs
§  Draw Ellipses
§  Draw Isometric Circles
§  Drawing Donuts
o   Draw Geometric Objects
§  Draw Polylines
§  Draw Polygons
§  Draw Multi-line Objects

IV – VIEWING YOUR DRAWING
o   The ZOOM Command
o   Panning
o   Real-time PAN and ZOOM
o   Setting Isometric Grid and Snap

V – CREATE AND EDIT TEXT
o   Creating Single Line Text
o   Understanding Text Styles
o   Creating Multiline Text

VI – Other Commands
o   Using OFFSET Command
o   Using MIRROR Command
o   Using ARRAY Command
§  Breaking Objects
§  Trimming Objects
§  Extending Objects
§  Exploding Objects
§  Rotating Objects
o   Using PEDIT Command
o   Obtain Distance, Angles, and Point Location
o   Create Fillets and Chamfers in Object
§  Create Fillet
§  Create Chamfer
o   Resize or Reshape Objects
§  Lengthen Objects
§  Stretch Objects
§  Scale Objects
§  Align Objects

VII – CREATING HATCH PATTERN AND SOLID FILLS
o   Overview of Hatch Patterns and Solid Fills
o   Creating Hatch Patterns
o   Editing Hatch Pattern
o   Editing Hatch Pattern Boundary

AUTOCAD DESIGNING AND DRAFTING SEMINAR/WORKSHOP

Technological innovation has become a commonplace phenomenon. In everyday life, technology plays an ever-increasing role; innovations quickly become incorporated into daily use and are added to society’s vocabulary.
As students in the field of Information Technology, we must be responsible to develop our knowledge in every field not only in programming but also in designing and drafting. AutoCAD is a fantastic example of software that fundamentally changed the way an industry works. AutoCAD is a Computer Aided Design (CAD) software application for 2D and 3D design and drafting.
This program is all about designing and developing our skills in making a 2D and 3D drawing using AutoCAD. We need to learn this application in order to enhance our skills in computer aided drafting. Unlike manual drafting, AutoCAD, with a click of the mouse, drawings can be shown in two or three dimensions, rotated, animated, and viewed from many different angles.
This training will be facilitated by the BSIT-3 Group 2 and participated by 40 students of BSIT, BSCS and BSIS. The resource person of the program was Engr. Dawn D. Hope Sulit. It was held at Notre Dame of Midsayap College Computer Laboratory 2. The program started at exactly 8:00 am and ended at 5:00 pm.
Program Title:  AutoCAD Designing and Drafting Seminar/Workshop (ADD)
 Program Goal: To train the participants on how to design and develop architectural drawings using AutoCAD

Specific Objectives: At the end of the 8 hours Training, 40 students of BSIT, BSCS and   
BSIS will be able to:
a.       Understand the AutoCAD toolbars, drawing editor and command.
b.      Use properly the commands for drawing, plotting and other techniques in AutoCAD.
c.       Design a basic 2D and 3D drawings.
Topic Outline

Date: December 17, 2011
Place: Fr. Sullivan Building, Computer Laboratory 2 of Notre Dame of Midsayap College

Seminar Schedule:
I – GETTING STARTED WITH AUTOCAD
o   AutoCAD Screen Lay-out
o   Start Up and New Drawing Wizard
o   Saving and Leaving a Drawing Session
o   Exiting From AutoCAD

II – SPECIFYING COORDINATES
o   Enter Cartesian Coordinates
o   Specifying Absolute  And Relative Coordinates
o   Enter Polar Coordinates
o   Dynamic Input and Limits
o   Grid Settings
o   Orthogonal Mode
o   Picking Coordinates on the Screen
§  Object Snaps
§  Running Object Snap and OSNAP Mode
§  Polar Tracking and Polar Snap

III – DRAWING IN TWO DIMENSIONS
o   Drawing Simple Lines
§  Using Line Command
§  Drawing Rectangle
o   Drawing Curves and Point Objects
§  Drawing Circles
§  Drawing Arcs
§  Draw Ellipses
§  Draw Isometric Circles
§  Drawing Donuts
o   Draw Geometric Objects
§  Draw Polylines
§  Draw Polygons
§  Draw Multi-line Objects


IV – VIEWING YOUR DRAWING
o   The ZOOM Command
o   Panning
o   Real-time PAN and ZOOM
o   Setting Isometric Grid and Snap

V – CREATE AND EDIT TEXT
o   Creating Single Line Text
o   Understanding Text Styles
o   Creating Multiline Text

VI – Other Commands
o   Using OFFSET Command
o   Using MIRROR Command
o   Using ARRAY Command
§  Breaking Objects
§  Trimming Objects
§  Extending Objects
§  Exploding Objects
§  Rotating Objects
o   Using PEDIT Command
o   Obtain Distance, Angles, and Point Location
o   Create Fillets and Chamfers in Object
§  Create Fillet
§  Create Chamfer
o   Resize or Reshape Objects
§  Lengthen Objects
§  Stretch Objects
§  Scale Objects
§  Align Objects

VII – CREATING HATCH PATTERN AND SOLID FILLS
o   Overview of Hatch Patterns and Solid Fills
o   Creating Hatch Patterns
o   Editing Hatch Pattern
o   Editing Hatch Pattern Boundary

VII – 3D Basics
o   Isometric Views
o   Solids