Write a project in visual basic to display name of college Dijlah in

advertisement
Write a project in visual basic to display name of college Dijlah
in Arabic and English by using label and adding button for exit
the project as shown in figure below ?
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click
Label3.Text = " ‫"كلية دجلة الجامعة‬
End Sub
Private Sub Button2_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button2.Click
Label3.Text = "Dijlah college"
End Sub
Private Sub Button4_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button4.Click
End
End Sub
End Class
Write a project in visual basic to display name of college Dijlah
in Arabic and English by using Textbox and adding button for
exit the project as shown in figure below ?
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click
Textbox1.Text = " ‫"كلية دجلة الجامعة‬
End Sub
Private Sub Button2_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button2.Click
Textbox.Text = "Dijlah college"
End Sub
Private Sub Button4_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button4.Click
End
End Sub
End Class
Write a project in visual basic to Change Back color for form to
colors (Beige,Blue,Yellow,Gray) and text color to colors
(Black,White) and select four pictures to display and adding
checkbox to control the visibility of picture box by using
RadioButton and adding buttons for print form and exit the
project as shown in figure below ?
Public Class Form1
Private Sub RadioButton1_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RadioButton1.CheckedChanged
Me.BackColor = Color.Beige
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RadioButton2.CheckedChanged
Me.BackColor = Color.Blue
End Sub
Private Sub RadioButton3_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RadioButton3.CheckedChanged
Me.BackColor = Color.Yellow
End Sub
Private Sub RadioButton4_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RadioButton4.CheckedChanged
Me.BackColor = Color.Gray
End Sub
Private Sub RadioButton5_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RadioButton5.CheckedChanged
Me.ForeColor = Color.Black
End Sub
Private Sub RadioButton6_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RadioButton6.CheckedChanged
Me.foreColor = Color.White
End Sub
Private Sub RadioButton7_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RadioButton7.CheckedChanged
Picturebox1.Image = My.Resources.Desert
End Sub
Private Sub RadioButton8_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RadioButton8.CheckedChanged
Picturebox1.Image = My.Resources.Koala
End Sub
Private Sub RadioButton9_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RadioButton9.CheckedChanged
Picturebox1.Image = My.Resources.Lighthouse
End Sub
Private Sub RadioButton10_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RadioButton10.CheckedChanged
Picturebox1.Image = My.Resources.Tulips
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CheckBox1.CheckedChanged
PictureBox1.visible=CheckBox1.Checkd
End Sub
Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click
Printform1.PrintAction=Printing. PrintAction. PrintToPreview
Printform1.Print()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
Notice :
1. you first add your images to the project Resources
,then you can assign the resource to the Image property
of a PictureBox control.
Place a picturebox control on a form and then select its
image property in the properties window.click on the
properties button to display a select resource dialog
box where you can select images that you have already
added or add new images .
Click on the import button of the select Resources
dialog box to add images an open dialog box appears
,where you can navigate to your image files.a preview
of the image appears in the preview box.
2. visual basic 2010 includes a printform component .you
will add the printform component to your form ,but it
is not a visible element ,such as the controls you have
already added.
You can choose to send the printer output to the
printer or to the preview window,which saves paper
while you are testing your program.
Step 1.scroll down to the bottom of the toolbox and find
the header for visual basic powerpacks.
Step 2.click on the triangle to open the section of the
toolbox , you should see the printform
component listed.
Setp3.double click on the printform component .or you
can drag and drop the component on the form
.in either case,the component appears in a new
pane that opens at the bottom of the form
designer .this pane,called the component tray
holds components that do not have a visual
basic representation at run time .
Download