Jx_Man 987 Nearly a Senior Poster Featured Poster

1. - to running hidden
there are a couple ways :
1. this.Visible = false;
this.ShowInTaskbar = false;
2. this.Opacity = 0;
this.ShowInTaskbar = false;
- to get form back => Set visible as True or Opacity to 100 on keypressed event.
2. You can disable by know the ascii or keychar (in keypressed event again).
3. To fullscreen : set WindowsState = true in form properties.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Adnan...Welcome to Daniweb Friend :)
Many members need your ability to Fixing here ;)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi shailendra...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Mark...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

i tried to binding data into combo box and set Sorted = true and it works fine...

Jx_Man 987 Nearly a Senior Poster Featured Poster

select the last id...so it always refresh.

Jx_Man 987 Nearly a Senior Poster Featured Poster

1. Start Microsoft Visual Studio .NET
2. On the File menu, point to New, and then click Project
3. Under Project Types, click Visual Basic Projects
4. Under Templates, click Windows Application. Form1 is created.
5. Change Form1's Properties: .Text="Click to Start", .FormBorderStyle="FixedToolWindow", .Size="192,64"
6. Place a new Label control anywhere on the form. Label1 is created.
7. Change Label1's Properties: .Text="StopWatch", .Dock="Fill", .Font="Georgia, 24pt", .TextAlign="MiddleCenter". Select foreground and background colors to taste (the example is .BackColor=Hot Track, .ForeColor=Menu).
8. Place a new Timer control on the form. Timer1 is created.
9. Right-click Form1, and then click View Code
10. Add the following code to the Form1 class:

Dim startTime As DateTime

    Private Sub Timer1_Tick(ByVal sender As System.Object, _
     ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim span As TimeSpan = DateTime.Now.Subtract(startTime)
        Label1.Text = span.Minutes.ToString & ":" & _
        span.Seconds.ToString & "." & span.Milliseconds
    End Sub

    Private Sub Label1_Click(ByVal sender As System.Object, _
     ByVal e As System.EventArgs) Handles Label1.Click
        If (Timer1.Enabled) Then
            Me.Text = "Click to Re-start"
            Timer1.Stop()
        Else
            startTime = DateTime.Now()
            Me.Text = "Click to Stop"
            Timer1.Start()
        End If
    End Sub

    Private Sub Stopwatch_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        startTime = DateTime.Now()
        Timer1.Start()
    End Sub

Author : Alastair Dallas

Jx_Man 987 Nearly a Senior Poster Featured Poster

actually your code is great but don't use it in textbox changed event. maybe u can convert it after user fill all the textbox.

ITKnight commented: Good point +1
Jx_Man 987 Nearly a Senior Poster Featured Poster
Imports System
Imports System.Windows.Forms
Imports System.Drawing
Public Class Form4
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()
        ListView.Dock = DockStyle.Fill
        PopulateListView()
        Me.Controls.Add(ListView)
        Me.ClientSize = New Size(400, 200)
        'Add any initialization after the InitializeComponent() call

    End Sub

    .....
	
#End Region
   
    Private Sub PopulateListView()
        ' Set the view to show details.
        ListView.View = View.Details

        ' Add columns
        ListView.Columns.Add("Author", -2, HorizontalAlignment.Center)
        ListView.Columns.Add("Title", -2, HorizontalAlignment.Left)
        ListView.Columns.Add("Price", -2, HorizontalAlignment.Left)

        ' Add items
        Dim item1 As New ListViewItem("Steve Martin")
        item1.SubItems.Add("Programming .NET")
        item1.SubItems.Add("39.95")

        Dim item2 As New ListViewItem("Irene Suzuki")
        item2.SubItems.Add("VB.NET Core Studies")
        item2.SubItems.Add("69.95")

        Dim item3 As New ListViewItem("Ricky Ericsson")
        item3.SubItems.Add("Passing Your .NET Exams")
        item3.SubItems.Add("19.95")

        ' Add the items to the ListView.
        ListView.Items.AddRange(New ListViewItem() {item1, item2, item3})
    End Sub


    Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim form As New ListView
        form.Show()
    End Sub


    Private Sub ListView_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView.SelectedIndexChanged
        On Error Resume Next
        MsgBox(ListView.SelectedItems(0).Text + ", " + ListView.SelectedItems(0).SubItems(1).Text + ", " + ListView.SelectedItems(0).SubItems(2).Text)
    End Sub
End Class
Jx_Man 987 Nearly a Senior Poster Featured Poster

Avg 8.0 is available to download

Jx_Man 987 Nearly a Senior Poster Featured Poster

set count to 0

Jx_Man 987 Nearly a Senior Poster Featured Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster
Private Function TimeDiff(Time1 As String, Time2 As String) As String
Dim MinsDiff As String
Dim TheHours As String
MinsDiff = DateDiff("n", Time1, Time2)
'If midnight is between times
MinsDiff = IIf(MinsDiff < 0, MinsDiff + 1440, MinsDiff)
TheHours = Format(Int(MinsDiff / 60), "00")
MinsDiff = Format(MinsDiff Mod 60, "00")
TimeDiff = TheHours & ":" & MinsDiff
End Function


Private Sub Command1_Click()
Dim x As String
x = TimeDiff(DTPicker1.Value, DTPicker2.Value)
MsgBox x
End Sub
Jade_me commented: Great code +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

it cause your cursor focus in first character after converted. then your next character will input as first character.
g -> G => first converted, cursor focus on the front of first Character : |G (| : is cursor)
ge -> Eg => |Eg
gee -> Eeg => |Eeg
geet ->Teeg => |Teeg
geeta -> Ateeg => |Ateeg

Neji commented: good explain +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Cali...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Mark...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Meron...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Zello...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Mike...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Chuffy...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Aniefiok ...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Terry...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)
You can post your question on VB section

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Alan...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Wes...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

PLese help in using crystal report in vb.net 2005

what helps?you don't describe what the problem is...
use crystal report viewer to use crystal report

Jx_Man 987 Nearly a Senior Poster Featured Poster

U can compare dates in terms of days , months or years as u wish by DateDiff Function in VB6.
As DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]])
Where interval will be in string as :
yyyy Year
q Quarter
m Month
y Day of year
d Day
w Weekday
ww Week
h Hour
n Minute
s Second
It will return difference of two dates as long according to parameters provided.

following codes is an example :

Private Sub btnCalculate_Click()
Dim Temp, thn, bln As Long
Temp = DateDiff("m", DTPStart.Value, DTPEnd.Value)
thn = Temp \ 12   ' Year
bln = Temp Mod 12 ' Month
MsgBox thn & " Years " & bln & " Months"
End Sub

e.g :
Start = 5/24/2008
End = 7/24/2008
Result = 0 Years 2 Months

Jx_Man 987 Nearly a Senior Poster Featured Poster

This code if u want to add - after 3 numbers :

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        If TextBox1.Text.Length = 3 Then
            TextBox1.Text = TextBox1.Text + "-"
        End If
    End Sub

This Following code if u want - (negative) will added after user input 7 numbers.

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        If TextBox1.Text.Length = 7 Then
            TextBox1.Text = Microsoft.VisualBasic.Left(TextBox1.Text, 3) + "-" + Microsoft.VisualBasic.Mid(TextBox1.Text, 4, TextBox1.Text.Length)
        End If
    End Sub
Estella commented: awesome +1
Jx_Man 987 Nearly a Senior Poster Featured Poster
comboBox1.Items.Clear()

yeah...so true...

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)