Simple Shutdown Utility - Visual Basic 2008

Simple Shutdown Utility - Visual Basic 2008 by: Liam Demafelix Site: http://whizl287.multiply.com This tutorial will show you how to create a Shutdown utility. visual basic 2008. Open Visual Basic 2008 Express Edition. (If you don't have the program click here to download it for free.) Click on Project next to Create: Click on Windows Form Application, and name the project "Media Player" and then click Ok. Create a WindowsFormApplication and name it whatever you want. image1.bmp I’m using Visual Studio 2008 but it will work on express even if not studio. Change the form name to whatever you want. image2.bmp Set the maximize box and minimize box property to “false”. Change formborderstyle to FixedSingle. image3.bmp image4.bmp Add 3 Groupboxes and 3 buttons to the form. image5.bmp Rename the ff: GroupBox1 = Shutdown Groupbox2 = Restart Groupbox3 = Log Off Button1 = Click here to Shut Down Button2= Click here to restart Button3=Click here to Log Off. image6.bmp It should look like on the left. Now to add the code: Double click on “Click here to shut down” button. Enter the highlighted code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Shell("shutdown -s") End Sub Double Click on “Click here to Restart” button. Enter the highlighted code: Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Shell("shutdown -r") End Sub Double Click on “Click here to logoff button”. Enter the highlighted code: Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Shell("shutdown -l") End Sub Debug and test it. It should work. NOTE: If you debug, it will shutdown, causing you to lose your work if unsaved.

Upload a picture to PictureBox

Upload a picture to PictureBox First Add a OpenFileDialog to the project Add the following code to BROWSE button Dim OpenFileDialog1 As New OpenFileDialog With OpenFileDialog1 .CheckFileExists = True .ShowReadOnly = False .Filter = "All Files|*.*|Bitmap Files (*)|*.bmp;*.gif;*.jpg" .FilterIndex = 2 If .ShowDialog = DialogResult.OK Then PictureBox1.Image = Image.FromFile(.FileName) End If End With

Media Player - Visual Basic 2008

This tutorial will show you how to make media player program in visual basic 2008. Open Visual Basic 2008 Express Edition. (If you don't have the program click here to download it for free.) Click on Project next to Create: Click on Windows Form Application, and name the project "Media Player" and then click Ok. You can change the form text to "Media Player". Click on the form and then go to properties window, then change the text property. The first thing you can do after changing the form text property is adding Windows Media Player to the form. to do that follow the following steps: We will add one control that is not included in the toolbox: On the Toolbox: right click the mouse and click on Choose Items...: Visual Basic 2008 Add WinSock A Window will appear: Click on COM Components. Scroll down to Windows Media Player and check it then click ok. In the toolbox, scroll down to the new control "Windows Media Player and drag it to the form: Resize it to fit the form like the picture below and make sure to leave a space between the icon and Windows Media Player: Change some properties of the Windows Media Player. Right click on it and then click on properties. On the properties window, change the Anchor property to Top, Bottom, Left, Right. That property will make Windows Media Player stretches to the whole window when the form size maximizes. Add a button to the form and change it's text property to "Song": Add OpenFileDialog to the form: Right click on OpenFileDialog1 in the gray area and click on properties. Change it's Filter property to Music File|*.mp3 Double click on the button "Song" and add the following highlighted code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click OpenFileDialog1.ShowDialog() AxWindowsMediaPlayer1.URL = OpenFileDialog1.FileName End Sub When you play the program, click on Song button and that should show you a Open File Dialog to choose a song. Make sure that the song is in mp3 format.

Login - Visual Basic 2008

This tutorial will show you how to make a login program. Open Visual Basic 2008 / 2010 Express Edition. (If you don't have the program click here to download it for free.) Click on Project next to Create: Click on Windows Form Application, and name the project "Your Application" and then click Ok. You can change the form text to "your application". Click on the form and then go to properties window, then change the text property. You need to add another form to your application. To do that, click on Project on the menu bar, then click on Add Windows Form.: A new window will appear. Click on Add: Add a new Label and change it's text to whatever you like: Go back to Form1: Add a label and a textbox to the form. Change the label's text to "Username": Add another label and a textbox to the form. Change the label's text to "Password": We need the change the password text property. Right click on the textbox that will hold the password, click on properties, go to the properties window. Change the PasswordChar property to * : Add a button to the form and change it's text to "Login" Suppose we want the username = rfb and the password = reflection Double click on the button and add the following highlighted code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "rfb" And TextBox2.Text = "reflection" Then Form2.Show() Else MsgBox("Sorry, username or password not found", MsgBoxStyle.OkOnly, "Invalid") End If End Sub You can change the username and the password in the code where it says "rfb" for the username and "reflection" for the password. Run the program and it should work fine. If you enter a wrong username or a wrong password, you should get the following message: If you enter the right username and the right password, the second form will appear:

Play music in your project

Play music in your project My.Computer.Audio.Play("C:\Music\Music.wav")

Allow Numbers only in TextBox

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If Asc(e.KeyChar) <> 13 AndAlso Asc(e.KeyChar) <> 8 _ AndAlso Not IsNumeric(e.KeyChar) Then MessageBox.Show("Please enter numbers only") e.Handled = True End If End Sub

Search a listbox (Search full Text)

For this project I use: Listbox1 Listbox2 Button1 Textbox1 Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load With ListBox1.Items .Add("My name is Jimmy") .Add("I am from California") .Add("I go to UCLA") .Add("I like porgramming in VB 2008") .Add("I love Visual Basic language") .Add("This tutorial shows you how to search a listbox ") End With End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ListBox2.Items.Clear() Dim count As Integer = (ListBox1.Items.Count - 1) Dim words As String For a = 0 To count words = ListBox1.Items.Item(a) If InStr(words.ToLower, TextBox1.Text.ToLower) Then ListBox2.Items.Add(words) End If Next End Sub End Class

Search Listbox (Search Text)

This tutorial shows you how to search a listbox. For this project I use: ListBox1 ListBox2 Button1 TextBox1 Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load With ListBox1.Items .Add("My name is Jimmy") .Add("I am from California") .Add("I go to UCLA") .Add("I like porgramming in VB 2008") .Add("I love Visual Basic language") .Add("This tutorial shows you how to search a listbox ") End With End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ListBox2.Items.Clear() Dim count As Integer = (ListBox1.Items.Count - 1) Dim words, wordsB As String Dim spaceCharCounter As Integer = 0 For i = 0 To count words = ListBox1.Items.Item(i) For j = 0 To words.Length - 1 If spaceCharCounter >= 2 Then wordsB += words.Substring(j, 1) ElseIf words.Substring(j, 1) = Chr(32) Then spaceCharCounter += 1 End If Next If InStr(wordsB, TextBox1.Text) Then ListBox2.Items.Add(ListBox1.Items.Item(i)) End If words = Nothing spaceCharCounter = 0 wordsB = Nothing Next End Sub End Class

Notepad - Visual Basic 2008 page 3 Edit Undo

Edit Undo Under Edit, double click on Undo and add the following highlighted code: Private Sub UndoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UndoToolStripMenuItem.Click 'check if textbox can undo If TextBox1.CanUndo Then TextBox1.Undo() Else End If End Sub Edit Cut Double click on Cut and add the following highlighted code: Private Sub CutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CutToolStripMenuItem.Click My.Computer.Clipboard.Clear() If TextBox1.SelectionLength > 0 Then My.Computer.Clipboard.SetText(TextBox1.SelectedText) End If TextBox1.SelectedText = "" End Sub Edit Copy Double click on Copy and add the following highlighted code: Private Sub CopyToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CopyToolStripMenuItem.Click My.Computer.Clipboard.Clear() If TextBox1.SelectionLength > 0 Then My.Computer.Clipboard.SetText(TextBox1.SelectedText) End If End Sub Edit Paste Double click on Paste and add the following highlighted code: Private Sub PasteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasteToolStripMenuItem.Click If My.Computer.Clipboard.ContainsText Then TextBox1.Paste() End If End Sub Edit Select All Double click on Select All and add the following highlighted code: Private Sub SelectAllToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SelectAllToolStripMenuItem.Click TextBox1.SelectAll() End Sub Edit Find Double click on Find and add the following highlighted code: Private Sub FindToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FindToolStripMenuItem.Click Dim a As String Dim b As String a = InputBox("Enter text to be found") b = InStr(TextBox1.Text, a) If b Then TextBox1.Focus() TextBox1.SelectionStart = b - 1 TextBox1.SelectionLength = Len(a) Else MsgBox("Text not found.") End If End Sub

The Open File Dialogue Box

The Open File Dialogue Box In most programmes, if you click the File menu, and select the Open item, a dialogue box is displayed. From the dialogue box, you can click on a file to select it, then click the Open button. The file you clicked on is then opened up. We'll see how to do that from our menu. (Except, the file won't open yet - only the dialogue box will display, and then name of the chosen file. You'll learn how to open files in a later section.) First, place two textboxes on your form. In the properties box, locate the MultiLine property. It is set to False by default (which is why you can't change the height of textboxes). Change this value to True. Type some default text for the Text Property of textbox1. Change the Font size to 14 points. Your form should now look something like this one: What your form should look like now We'll work with these textboxes when we do the Edit menu. So let's leave them for now. When we click on File > Open from our menu, we want the Open dialogue box to appear. This is fairly straightforward in VB.NET. In fact there is even a control for it! Open up your toolbox, and locate the control called "OpenFileDialog". You might have to scroll down to see it. But you're looking for this: The Open File Dialog Control Double click the control to add one to your project. But notice that the control doesn't get added to your form. It gets added to the area at the bottom, next to your menu control: The Object area in VB .NET The shaded area surrounding the control means that it is selected. If you look on your right, you'll see the properties that you can use with the control. Click on the Name property and change the name to openFD. When you change the name in the properties box, the name of the control at the bottom will change: The Control has been renamed to openFD We’ll now write some code to manipulate the properties of our new control. So do the following: Access the code for your File > Open menu item. (To do this quickly, you can simply double click the Open item on your menu bar. Or press F7 (CTRL + ALT + 0 in version 2012) to access the Code View.) Click the name of your menu item from the left drop down box at the top of the code Then select the Click event from the drop down box to the right Your empty code should be this (the code below has underscore characters added, so that it can fit on this page): Private Sub mnuOpen_Click(ByVal sender As Object, _ ByVal e As System.EventArgs) _ Handles mnuOpen.Click End Sub With you cursor flashing between the two lines of your code, add the following: openFD.ShowDialog() When you typed a full stop after the openFD, you probably saw a list box appear. You can just double click the ShowDialog() item to add it to your code. But this method of the OpenFileDialog control does what you'd expect it to do: Shows the dialogue box. You can even test it out right now. Press F5 to run your programme. Then click the Open item on your File menu. You should see an Open dialogue box display. Return to the design environment, and we'll explore some more things you can do with this Dialogue box control. No more reading these lessons online - get the eBook here! The Initial Directory You can set which directory the dialogue box should display when it appears. Instead of it displaying the contents of the "My Documents" folder, for example, you can have it display the contents of any folder. This done with the Initial Directory property. Amend your code to this: openFD.InitialDirectory = "C:\" openFD.ShowDialog() Run your programme again, and see the results in action. You should see the contents of the "C" folder on your hard drive (if you root folder is called something else, change the code above). The Title Property By default, the dialogue box will display the word "Open" as a caption at the top of your dialogue box. You can change this with the Title property. Add the line in Bold to your code: openFD.InitialDirectory = "C:\" openFD.Title = "Open a Text File" openFD.ShowDialog() Run your code again, and Click File > Open from your menu. You should see this at the top of the Open dialogue box: Notice the new white title on the blue background In the next parts of this tutorial, we'll see how to change the Filter property, and how you can select a file from the list.

The Paste Menu

Again, there's only one line of code to write. It's this: TextBox2.Paste() Notice that we're saying paste to textbox2. Because the copy menu places the text from textbox one onto the clipboard, you only need this one line of code. You're saying "Whatever is on the Clipboard, paste it into Textbox2". So add that line to your Paste menu item. Your code window should look like this: Pasting Text in VB NET Time to test it out. Run your programme. Select all the text in textbox one (it might already be selected), then click Edit > Copy from your menu. Click inside the second textbox. Then click Edit > Paste from your menu. The text should appear in textbox two.

The Copy Menu

If you type Textbox1 in your code window, then a full stop, you get a list of properties and methods available to the textbox. Scroll up to the top and locate the Copy method: Copy VB NET 2012 Intellisense menu Notice the tool tip in yellow in the 2010 version. It's telling you what this method does - copies the current selection to the clipboard. The clipboard is a temporary storage area available to most Windows applications. When you invoke the Copy method of the textbox, any selected text is place in this temporary storage area for you. You don't have to write any other code. So access the code for your Copy menu item, and add this line to it: Textbox1.Copy() Your code window should look something like this: Code to Copy text in VB NET That's all there is for the copy menu! But nothing visible will happen when you run your code. Let's paste it into the second textbox. No more reading these lessons online - get the eBook here!

Undo and Redo

Use AddUndo to start adding pauses in-between when the user is typing. One way to do this is to use this code. Private Sub Text1_Change() Timer1.Interval = 5000 End Sub Private Sub Timer1_Timer() Undo1.AddUndo Text1.Text Timer1.Interval = 0 End Sub When you want to undo use Undo and Redo to redo. Dim OldContent As String Dim Last As UndoDirection Public Enum UndoDirection DirUndo = 1 DirRedo = 2 End Enum Public Function Undo() Dim Front As Double Dim Back As Double Dim StrFront As String Dim StrBack As String Dim Changed As String If Last = DirRedo Or Last = 0 Then Last = DirUndo Undo End If Last = DirUndo If lstUndo.ListCount = 0 Then Undo = OldContent Exit Function End If lstUndo.Selected(lstUndo.ListCount - 1) = True Undo = lstUndo.Text OldContent = Undo lstRedo.AddItem lstUndo.Text lstUndo.RemoveItem lstUndo.ListCount - 1 End Function Public Function Redo() If Last = DirUndo Or Last = 0 Then Last = DirRedo Redo End If Last = DirRedo If lstRedo.ListCount = 0 Then Redo = OldContent Exit Function End If lstRedo.Selected(lstRedo.ListCount - 1) = True Redo = lstRedo.Text OldContent = Redo lstUndo.AddItem lstRedo.Text lstRedo.RemoveItem lstRedo.ListCount - 1 End Function Public Sub AddUndo(NewContent As String) Dim Content As String Dim XStr As String Content = NewContent If OldContent = Content Then Exit Sub lstRedo.Clear lstUndo.AddItem Content OldContent = NewContent End Sub

Undo after VB code executes

Code: Private Sub Worksheet_Change(ByVal Target As Range) Undolist = Application.CommandBars("Standard").Controls("&Undo").List(1) On Error GoTo Whoa Application.EnableEvents = False CheckChanges Range("A20:A32") LetsContinue: Application.EnableEvents = True Application.ScreenUpdating = True Exit Sub Whoa: MsgBox Err.Description Resume LetsContinue Undo End Sub Code: Sub Undo() Application.CommandBars("Standard").Controls("&Undo").List = UndoList End sub

How to use undo\redo in a RichTextBox

'In a Class Module Named UndoElement Public SelStart As Long Public TextLen As Long Public Text As String 'In a Module Public trapUndo As Boolean Public UndoStack As New Collection Public RedoStack As New Collection Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Any) As Long Public Sub Redo() Dim chg$ Dim DeleteFlag As Boolean Dim objElement As Object If RedoStack.Count > 0 And trapUndo Then trapUndo = False DeleteFlag = RedoStack(RedoStack.Count).TextLen < Len(RTFForm.RichTextBox.Text) If DeleteFlag Then Set objElement = RedoStack(RedoStack.Count) RTFForm.RichTextBox.SelStart = objElement.SelStart RTFForm.RichTextBox.SelLength = Len(RTFForm.RichTextBox.Text) - objElement.TextLen RTFForm.RichTextBox.SelText = "" Else Set objElement = RedoStack(RedoStack.Count) chg$ = Change(RTFForm.RichTextBox.Text, objElement.Text, objElement.SelStart + 1) RTFForm.RichTextBox.SelStart = objElement.SelStart - Len(chg$) RTFForm.RichTextBox.SelLength = 0 RTFForm.RichTextBox.SelText = chg$ RTFForm.RichTextBox.SelStart = objElement.SelStart - Len(chg$) If Len(chg$) > 1 And chg$ <> vbCrLf Then RTFForm.RichTextBox.SelLength = Len(chg$) Else RTFForm.RichTextBox.SelStart = RTFForm.RichTextBox.SelStart + Len(chg$) End If End If UndoStack.Add Item:=objElement RedoStack.Remove RedoStack.Count End If trapUndo = True RTFForm.RichTextBox.SetFocus End Sub Public Sub Undo() Dim chg$, x& Dim DeleteFlag As Boolean Dim objElement As Object, objElement2 As Object If UndoStack.Count > 1 And trapUndo Then trapUndo = False DeleteFlag = UndoStack(UndoStack.Count - 1).TextLen < UndoStack(UndoStack.Count).TextLen If DeleteFlag Then x& = SendMessage(RTFForm.RichTextBox.hwnd, EM_HIDESELECTION, 1&, 1&) Set objElement = UndoStack(UndoStack.Count) Set objElement2 = UndoStack(UndoStack.Count - 1) RTFForm.RichTextBox.SelStart = objElement.SelStart - (objElement.TextLen - objElement2.TextLen) RTFForm.RichTextBox.SelLength = objElement.TextLen - objElement2.TextLen RTFForm.RichTextBox.SelText = "" x& = SendMessage(RTFForm.RichTextBox.hwnd, EM_HIDESELECTION, 0&, 0&) Else Set objElement = UndoStack(UndoStack.Count - 1) Set objElement2 = UndoStack(UndoStack.Count) chg$ = Change(objElement.Text, objElement2.Text, _ objElement2.SelStart + 1 + Abs(Len(objElement.Text) - Len(objElement2.Text))) RTFForm.RichTextBox.SelStart = objElement2.SelStart RTFForm.RichTextBox.SelLength = 0 RTFForm.RichTextBox.SelText = chg$ RTFForm.RichTextBox.SelStart = objElement2.SelStart If Len(chg$) > 1 And chg$ <> vbCrLf Then RTFForm.RichTextBox.SelLength = Len(chg$) Else RTFForm.rtfText.SelStart = RTFForm.RichTextBox.SelStart + Len(chg$) End If End If RedoStack.Add Item:=UndoStack(UndoStack.Count) UndoStack.Remove UndoStack.Count End If trapUndo = True RTFForm.RichTextBox.SetFocus End Sub Public Function Change(ByVal lParam1 As String, ByVal lParam2 As String, startSearch As Long) As String Dim tempParam$ Dim d& If Len(lParam1) > Len(lParam2) Then 'swap tempParam$ = lParam1 lParam1 = lParam2 lParam2 = tempParam$ End If d& = Len(lParam2) - Len(lParam1) Change = Mid(lParam2, startSearch - d&, d&) End Function ------------------------------------------- 'RTF Form's Code Private Sub RichTextBox_Change() If Not trapUndo Then Exit Sub Dim newElement As New UndoElement Dim c%, l& For c% = 1 To RedoStack.Count RedoStack.Remove 1 Next c% newElement.SelStart = RichTextBox.SelStart newElement.TextLen = Len(RichTextBox.Text) newElement.Text = RichTextBox.Text UndoStack.Add Item:=newElement End Sub Private Sub Form_Load() trapUndo = True RichTextBox_Change End Sub Private Sub UndoButton_Click() Call Undo End Sub Private Sub RedoButton_Click() Call Redo End Sub

VB Code to print a file

Why don't you use the Macro-Recorder to generate code for you. I used the Recorder and added a for loop vb Code: Sub Makro1() Dim i As Long For i = 100600 To 100750 Cells(9, 9).Value = i ActiveWindow.ActiveSheet.PrintOut Copies:=1, Collate:=True, _ IgnorePrintAreas:=False Next i End Sub You might want to adjudst the PrintArea!

sample of printing code

Imports System.Drawing.Printing . . . Dim pd1 As PrintDialog = New PrintDialog Dim WithEvents printdoc As PrintDocument Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click pd1.AllowPrintToFile = True pd1.PrinterSettings = New PrinterSettings If pd1.ShowDialog = DialogResult.OK Then Me.printdoc = New PrintDocument Me.printdoc.Print() End If End Sub Private Sub printdoc_printpage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) _ Handles printdoc.PrintPage Dim pfont As Font = New Font("Arial", 12) Dim ppen As New Pen(Color.Black, 3) Dim pheight As Integer = CInt(pfont.GetHeight(e.Graphics)) Dim xpos As Integer = CInt(e.MarginBounds.Left) Dim ypos As Integer = CInt(e.MarginBounds.Top) Dim strtoprint As String = "This is sample text..." e.Graphics.DrawString(strtoprint, pfont, Brushes.Black, xpos, ypos) ypos += pheight e.Graphics.DrawLine(ppen, xpos, ypos, e.MarginBounds.Right - 100, ypos) ypos += pheight e.Graphics.DrawString(strtoprint, pfont, Brushes.Black, xpos, ypos) e.HasMorePages = False End Sub

How to: Print a Form by Using the PrintForm Component (Visual Basic)

The PrintForm component enables you to quickly print an image of a form exactly as it appears on screen without using a PrintDocument component. The following procedures show how to print a form to a printer, to a print preview window, and to an Encapsulated PostScript file. To print a form to the default printer In the Toolbox, click the Visual Basic PowerPacks tab and then drag the PrintForm component onto the form. The PrintForm component is added to the component tray. In the Properties window, set the PrintAction property to PrintToPrinter. Add the following code in the appropriate event handler (for example, in the Click event handler for a Print Button). PrintForm1.Print() To display a form in a print preview window In the Toolbox, click the Visual Basic PowerPacks tab and then drag the PrintForm component onto the form. The PrintForm component is added to the component tray. In the Properties window, set the PrintAction property to PrintToPreview. Add the following code in the appropriate event handler (for example, in the Click event handler for a Print Button). PrintForm1.Print() To print a form to a file In the Toolbox, click the Visual Basic PowerPacks tab and then drag the PrintForm component onto the form. The PrintForm component is added to the component tray. In the Properties window, set the PrintAction property to PrintToFile. Optionally, select the PrintFileName property and type the full path and file name for the destination file. If you skip this step, the user will be prompted for a file name at run time. Add the following code in the appropriate event handler (for example, in the Click event handler for a Print Button). PrintForm1.Print()

Jema - Alert workshop

Workshop at  Jema

Alenga Martin

At the Jema community library on alert workshop

Yussif Mankiri's wedding cremony

At Gulumpe in Kintampo-B/A on 29 June 2013

Marriage

Marriage - Anas ibn Malik reported: The Messenger of Allah, peace and blessings be upon him, said, “Whoever Allah provides with a righteous wife, then he has fulfilled half of his religion, so let him fear Allah regarding the second half.” Source: Al-Mustadrak ‘ala as-Saheehain 2607 Grade: Sahih (authentic) according to As-Suyuti and Al-Hakim Insha'Allah am getting married today by the time this message reaches you , i might have not yet married or i would have already Insha'Allah ...Remember me in your Dua's عَنْ أَنَسِ بْنِ مَالِكٍ رَضِيَ اللَّهُ عَنْهُ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قَالَ مَنْ رَزَقَهُ اللَّهُ امْرَأَةً صَالِحَةً فَقَدْ أَعَانَهُ عَلَى شَطْرِ دِينِهِ فَلْيَتَّقِ اللَّهَ فِي الشَّطْرِ الثَّانِي 2607 المستدرك على الصحيحين قال الحاكم هَذَا حَدِيثٌ صَحِيحُ الإِسْنَادِ المحدث السيوطي خلاصة حكم المحدث صحيح    

Joke

+++LAUGH AS YOU WORK+++ Girl: Dad, I'm in love with a boy who is Far away from me. I'm in Ghana and he lives in Uk. We met on a dating website, became friends on FACEBOOK, had long chats on WHATSAPP, proposed to each other on SKYPE, and now two months of relationship through VIBER, I need your blessings and good wishes daddy. Her dad said: Really! Then get married on TWITTER, have fun on TANGO. Buy your kids on E-BAY, send them through GMAIL. And if you are fed up with your husband....sell him on Tonaton.com. Nonsense generation!
Abdullah ibn Al-Harith reported: I have not seen anyone smile more often than the Messenger of Allah, peace and blessings be upon him. [Sunan al-Tirmidhi, Book of Good Qualities, Number 3641, Hasan] عَنْ عَبْدِ اللَّهِ بْنِ الْحَارِثِ بْنِ جَزْءٍ قَالَ مَا رَأَيْتُ أَحَدًا أَكْثَرَ تَبَسُّمًا مِنْ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ 3641 سنن الترمذي كِتَاب الْمَنَاقِبِ بَاب فِي بَشَاشَةِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ

Siba