Luc001 77 Posting Whiz

Hi,

What is the code to write in txtCaps text box event which can change the whole text entered in as capital letters? Thanks.

Hi,

You need the CharacterCasing property to do so.
Here's an example:

TextBox1.CharacterCasing = CharacterCasing.Upper
Luc001 77 Posting Whiz

Hi,

In addition Adatapost has written:

You need to create a parentform, to do so you can use Form1 and rename it parentform.vb. Then you need to set the property IsMDIContainer = true. When you add a new form to your application you'll see that it will create a Form1 again. Then use Adatapost's code.

kvprajapati commented: Helpful! +9
Luc001 77 Posting Whiz

Hi,

You can try something like this:

TextBox1.Text = ListView1.SelectedItems(0).ToString
Luc001 77 Posting Whiz

Hi,

I'm a little confused about your question, so I think that you want to see the times running.

Here's an example how to do it. All you need is to add a timer.

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        TextBox1.Text = Now.ToString("G")
        Label1.Text = Format(Now, "hh:mm:ss tt")

    End Sub
Luc001 77 Posting Whiz

Hi,

Why you changed everything?
Here's how it should look like and after testing works like it should.

Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        If MsgBox("Are you sure you want to exit?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Exit") = MsgBoxResult.Yes Then
        Else
            e.Cancel = True
        End If

    End Sub

    Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
        If Keys.Escape Then
            Me.Close()
        Else
        End If
    End Sub
Luc001 77 Posting Whiz

Hi,

Change this part of code:

Private Sub frmMain_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
        If Keys.Escape Then
            Me.Close()
        Else
        End If
    End Sub
Luc001 77 Posting Whiz

Hi,

You can try something like this:

Dim myReport as new ReportDocument()
myReport.Load("C:\myReport.rpt")
'Pass database and Parameter info here
myReport.PrinttoPrinter(1,true,0,0) 'This prints one copy of all pages to the default printer, and collates them