Opt In (Do Not Edit Here)

Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Oct 25, 2015

Image Zoom Using VB.NET

In this post we learn to apply Zoom Effect on the Specified Image.
o TrackBar
o PictureBox
o ContextMenuStrip
o OpenFileDialog
Step 1:
/*--------------------------------Setting Properties------------------------*/
Form Properties
ContextMenustrip =ContextMenuStrip1
TrackBar Properties
LargeChange =1
Maximum =20
Minimum =1
Value =1
PictureBox Properties
SizeMode =AutoSize
Dock =None
Image =None
Add 2 menu labled as follows…
menu: load image
Step 2:
/*--------------------------------Writing Codes-----------------------------*/
TrackBar1_Scroll Event
Dim scale As Double= TrackBar1.Value
Dim height As Integer = Convert.ToInt32(scale * ptbImage.Image.Height)
Dim width As Integer = Convert.ToInt32(scale * ptbImage.Image.Width)
'Apply new size according to TrackBar Value to PictureBox
ptbImage.Size = New Size(width, height)
ptbImage.SizeMode = PictureBoxSizeMode.StretchImage
ExitToolStripMenuItem_Click Event
LoadImageToolStripMenuItem_Click Event
Dim res As DialogResult
'Setting Image filter to OpenFileDialog Control
OpenFileDialog1.Filter = "JPEG|*.jpg|BMP|*.bmp|All Files|*.*"
res = OpenFileDialog1.ShowDialog()
'Select the Image File
If res = Windows.Forms.DialogResult.OK Then
ptbImage.Image = Image.FromFile(OpenFileDialog1.FileName)
End If
'Adjust the Size of Image
ptbImage.SizeMode = PictureBoxSizeMode.AutoSize
Step 3:
/*--------------------------------Execution of Program-----------------------------*/

Dec 30, 2013

Crystal Reports: Grouping Pattern

          In this Article we are going see how to make a Grouping in Crystal Report to display data in particular pattern.

Aim: To group the data to be displayed in Crystal Report in following pattern.




          Displaying data into Grouped form can be useful in areas where we need to show common data grouped under the same category.    E.g. Grouping of data by Country, City, Status, etc.

          We can achieve the intended result in two ways...

a)   Set the Group By property while selecting the DataTable and other Fields to place into the desired Crystal Report as follows.

Figure 1


b)   If we do not set the Group By property using case (a), then we need to add the Group Name Fields manually in our Crystal Report as follows.

Path: Field Explorer à Group Name Fields à Group Expert

                                Figure - 2 
 Figure 2

          Now, arrange the required fields on Crystal Report as follows…

               Figure -3        
 Figure 3

Intended Result:

Figure - 4
Figure 4

Summary: Here we learn how to Group the particular fields on Crystal Report using wizards.

All Rights Reserved. 2014 Copyright SIMPLITONA

Powered By Blogger | Published By Gooyaabi Templates Designed By : BloggerMotion