Jx_Man 987 Nearly a Senior Poster Featured Poster

The label flashes every time the caption changes (this is the problem).

so what the problem with this?

Also, if I set the timer interval to 1, the label dosent print 1000 milliseconds in a second can anyone explain this?

It happen because you set interval to 1000 in your procedure. Even you set 1 in timer interval but when it executed, there are new statement in your procedure to change interval to 1000. Just remove it.

Dim sec As Integer
Sub Timer1_Timer()
    sec = sec + 1
    Label1.Caption = Str(sec) + "s"
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

You're welcome.
Don't forget to mark this thread as Solved.
Happy Coding.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Ok. So when you type on textbox then there are data display on datagrid.
Use textbox change event to make searching every you type a word on textbox.
This is an example of searching using datagrid. Modified as you needed.

Private Sub Text1_Change()
 Set rs = New ADODB.Recordset
        rs.CursorType = adOpenDynamic
        rs.LockType = adLockOptimistic
        rs.Open "SELECT * FROM Login where fname  like " & "'%" & Text1.Text & "%'", Conn, , , adCmdText

    Set DataGrid1.DataSource = rs
    DataGrid1.Columns(0).Width = 2000
    DataGrid1.Columns(1).Width = 2000

    DataGrid1.AllowAddNew = False
    DataGrid1.AllowArrows = True
    DataGrid1.AllowDelete = False
    DataGrid1.AllowUpdate = False
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

okay..
How far you doing this? show some effort here..

Jx_Man 987 Nearly a Senior Poster Featured Poster

how to search in datagrid where every keyword you type wil display the record
found in database?

You want to search in datagrid or search record in database?

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

@Djamel2010 : make your own thread dude..don't raise dead thread

Jx_Man 987 Nearly a Senior Poster Featured Poster

Post your code. we will help you :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Declare object instance of form2 and use it to disable or visble a button in form2.
You already declare it but you didn't use it.
Try this :

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    Dim form2 As New Form2
    form2.SaveVISACaseButton.Enabled = False
    form2.SaveVISACaseButton.Visible = False
    form2.Show()
    Me.Hide()
End Sub
november_pooh commented: Nice. +2
Jx_Man 987 Nearly a Senior Poster Featured Poster

well, it works fine to me.
Provide more information, what exactly you want to do.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Try this :

Private Sub cmdDelete_Click()
    Dim con As ADODB.Connection
    Set con = New ADODB.Connection
    Dim rsDelete As ADODB.Recordset
    Set rsDelete = New ADODB.Recordset
    Dim Query As String

    If MsgBox("Are you sure you want to delete?", vbYesNo, "Santo Niño Census Info System") = vbYes Then
        Query = "DELETE FROM Users WHERE IdUser ='" & Trim(txtId) & "'"
        con.Execute Query, , adCmdText
    End If
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

Save background color changed into txt files or you can use registry instead of txt files. Load it when form load.

Jx_Man 987 Nearly a Senior Poster Featured Poster

There are several ways to get screen resolution :

First way

Put this in module

Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1

Put this in form

Tmp As String
Tmp = GetSystemMetrics(SM_CXSCREEN) & "x" & GetSystemMetrics(SM_CYSCREEN)
Label1.Caption = Tmp

Second way

Label1.Caption = "Resolution = " & Screen.Width / Screen.TwipsPerPixelX _
   & " X " & Screen.Height / Screen.TwipsPerPixelY
End Sub

For changing Resolution with your criteria :
Require two buttons. One as 1200x900 and other as 800x600

Option Explicit

'The EnumDisplaySettings function retrieves information about one of the graphics modes for a display device
Private Declare Function EnumDisplaySettings Lib "user32" Alias "EnumDisplaySettingsA" (ByVal lpszDeviceName As Long, ByVal iModeNum As Long, lpDevMode As Any) As Boolean

'The ChangeDisplaySettings function changes the settings of the default display device to the specified graphics mode.
Private Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDisplaySettingsA" (lpDevMode As Any, ByVal dwFlags As Long) As Long

'Logs off the interactive user, shuts down the system, or shuts down and restarts the system.
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long

'The GetDeviceCaps function retrieves device-specific information for the specified device.
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long

'The CreateDC function creates a device context (DC) for a device using the specified name
Private Declare Function CreateDC Lib "gdi32" Alias …
Jx_Man 987 Nearly a Senior Poster Featured Poster
Estella commented: Nice site +3
Jx_Man 987 Nearly a Senior Poster Featured Poster

Andre shown how to add header and display it in report style.
Below is how to display data into listview using access and adodb.
Modified as you need and show to us how it work..

Private Sub ShowData()
    Dim con As ADODB.Connection
    Set con = New ADODB.Connection
    Dim rsShow As ADODB.Recordset
    Set rsShow = New ADODB.Recordset
    con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\project.MDB;Persist Security Info=False"

    rsShow.Open "SELECT * FROM Student ", con, adOpenStatic, adLockOptimistic
    ListView1.ListItems.Clear

    While Not rsShow.EOF
        Set View = ListView1.ListItems.Add
        View.Text = rsShow!ID
        View.SubItems(1) = rsShow!LastName
        View.SubItems(2) = rsShow!FirstName
        View.SubItems(3) = rsShow!MiddleName
        View.SubItems(4) = rsShow!Age
        View.SubItems(5) = rsShow!Sex
        'and soon
        rsShow.MoveNext
    Wend
    rsShow.Close
    con.Close
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

Its not a problem when you use datagrid or listview. The pressure point is how you'll get searching data from database (exact or like), it will influence how you display the result. if you want display the exact result then you can use textbox to display it like andre solution.

Jx_Man 987 Nearly a Senior Poster Featured Poster

I don't know where you display the searching data. But i give an example searching with listview.
Try this example :

Private Sub cmdSearch_Click()
    Dim con As ADODB.Connection
    Set con = New ADODB.Connection
    Dim rsSearch As ADODB.Recordset
    Set rsSearch = New ADODB.Recordset
    con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\ListofMembers.MDB;Persist Security Info=False"

    rsSearch.Open "SELECT * FROM Census WHERE ID LIKE " & "'%" & Text1.Text & "%'", con, adOpenStatic, adLockOptimistic
    ListView1.ListItems.Clear

    While Not rsSearch.EOF
        Set View = ListView1.ListItems.Add
        View.Text = rs!ID
        View.SubItems(1) = rs!LastName
        View.SubItems(2) = rs!FirstName
        View.SubItems(3) = rs!MiddleName
        View.SubItems(4) = rs!Age
        View.SubItems(5) = rs!Sex
        'and soon
        rsSearch.MoveNext
    Wend
    rsSearch.Close
    con.Close
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

Try This :

Public Conn As New ADODB.Connection
Private Sub Access_Connector()
    Set Conn = New ADODB.Connection
    Conn.Provider = "microsoft.jet.oledb.4.0"
    Conn.CursorLocation = adUseClient
    Conn.Open App.Path & "\project.mdb"
End Sub
Private Sub GetData()
    Set rs = New ADODB.Recordset
    rs.Open "SELECT * from goods ", Conn, adOpenDynamic, adLockBatchOptimistic

    While Not rs.EOF
        List1.AddItem rs.Fields("tabid")
        rs.MoveNext
    Wend
    rs.Close
End Sub

Private Sub Command1_Click()
    Dim temp As String
    Text1.Text = ""
    For i = 0 To List1.ListCount - 1
        If List1.Selected(i) = True Then
            temp = temp & List1.List(i) & ","
        End If
    Next

    Set rs = New ADODB.Recordset
    rs.Open "SELECT * from goods where tabid in (" & temp & ")", Conn, adOpenDynamic, adLockBatchOptimistic

    While Not rs.EOF
        Text1.Text = Text1.Text & rs.Fields!tabid & "-" & rs.Fields("tabno") & vbCrLf
        rs.MoveNext
    Wend
    rs.Close
End Sub

Private Sub Form_Load()
Access_Connector
GetData
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

yup its a textbox

I already answer your question in my second post.

Jx_Man 987 Nearly a Senior Poster Featured Poster

If it textbox you can use ascii to trap zero and negative sign.

Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 45, 48  
    KeyAscii = 0
End Select
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

Please more detail. What you mean about TEXT? it's Textbox?

Jx_Man 987 Nearly a Senior Poster Featured Poster

First, your code is not running. You missing 's' in every ListItems and SubItems statements.

Second, As default you can't select entire rows. It's because version 5.0 (SP2) does not support it.
but if you use version 6.0, your listview will able to do that with set FullRowSelect = true.
In your case you can SendMessage to add this behavior :

Private Declare Function SendMessage Lib "user32" Alias _
        "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal _
        wParam As Long, lParam As Any) As Long

Const LVS_EX_FULLROWSELECT = &H20
Const LVM_FIRST = &H1000
Const LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + &H37
Const LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + &H36


Private Sub Form_Load()
'Using api function
Dim lStyle As Long
lStyle = SendMessage(ListView1.hwnd, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
lStyle = lStyle Or LVS_EX_FULLROWSELECT
Call SendMessage(ListView1.hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, ByVal lStyle)


ListView1.ListItems.Add , , 111
ListView1.ListItems(ListView1.ListItems.Count).SubItems(1) = "apple"
ListView1.ListItems(ListView1.ListItems.Count).SubItems(2) = "100"
ListView1.ListItems.Add , , 222
ListView1.ListItems(ListView1.ListItems.Count).SubItems(1) = "mango"
ListView1.ListItems(ListView1.ListItems.Count).SubItems(2) = "200"

End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

Read this thread
You can use andre concept.
Add module, make public variable to accomodate your inputs in form 1 to form 4.
set every input to those variable in each form.
Ex :

'in module
Public a,b,c,d as Integer

'in form1
a = Val(Text1.Text)

'in form2
b = Val(Text2.Text)

'in form3
c = Val(Text3.Text)

'in form4
d = Val(Text4.Text)

'in form5
Text5.Text = Val(a+b+c+d)
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hai Haviansyah..
As andre said that your code is not consistent.
Ex when you use text1 instead of Name.
But we really appreciate your post and hope many posts from you. :)

*NB : Pake bhs inggris ya bro,,forum internasional nih,,hehe,,semua comment n bhs harus inggris,,ntar pada komentar,,kdg ada admin yg mrh kalo bukan bhs ing.. see u soon bro :)

AndreRet commented: Long time no hear ;) +12
Aurax commented: :D +0
Jx_Man 987 Nearly a Senior Poster Featured Poster

What you mean about disappeared? you mean remove selected item from combobox?

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
    ComboBox1.Items.Remove(ComboBox1.SelectedItem)
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

1 Textbox, 1 Button. Result showing in form caption :

Private Sub Command1_Click()
    Dim TextLines As Variant
    TextLines = Split(Text1, vbNewLine)
    Form1.Caption = "Sockz-" & (UBound(TextLines) + 1)
End Sub
debasisdas commented: agree +13
Naruse commented: agree +2
Sturdy commented: :D +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

vbDatabaseCompare uses the current setting of the database's string
comparison operator. Normally this will use the computer's language
setting to handle (e.g.) accented characters, and will be case
insensitive. The alternative vbBinaryCompare will compare the exact
ASCII representation of the character. For example:

Instr(1,"XYZabcxZ","x",vbDatabaseCompare)
1

Instr(1,"XYZabcxZ","x",vbBinaryCompare)
7

The first example finds an x (or X) in the first position of the
string, since it's not case sensitive; the second example requires an
exact match, so it finds the lower-case x in the 7th position.

In the Replace() function this would let you choose between replacing
text in a case-sensitive or case-insensitive manner.

Check this site for more info

Jx_Man 987 Nearly a Senior Poster Featured Poster

Use UCase() or LCase () function. all string will be converted to upper or lower string

If UCase(Text1.Text) = UCase("red") And Label4.BackColor = vbRed Then
    score = score + 1
    Label6.Caption = score
End If

or if you just want to make uppercase the first string

mystring = Text1.Text
If (UCase(Left(mystring, 1)) & Right(mystring, Len(mystring) - 1)) = "Red" Then
    score = score + 1
    Label6.Caption = score
End If
Jx_Man 987 Nearly a Senior Poster Featured Poster

Post your code. How far you doing this and we try to help you.

Jx_Man 987 Nearly a Senior Poster Featured Poster

I believe that problem is Picture_Name.
You put Picture_Name in your insert statement but it never been declared in CmdSave.
Why you don't use lblPicture_Name? it hold picture name too.

Conn.Execute "INSERT INTO Ministers_AccountTB(User_Name,Password,Prefix,Privilege,Passport) VALUES ('" & txtUser_Name.Text & "','" & txtRetype_Password.Text & "','" & cmbPrefix.Text & "','" & cmbPrivilege.Text & "','" & lblPicture_Name.Caption & "')"
Jx_Man 987 Nearly a Senior Poster Featured Poster

Your open recordset parameter not completed.

Sub Open([Source], [ActiveConnection], [CursorType As CursorTypeEnum = adOpenUnspecified], [LockType As LockTypeEnum = adLockUnspecified], [Options As Long = -1])

It should looks like this :

rspassword.Open "Select * from table1", Con, adOpenDynamic, adLockBatchOptimistic
Jx_Man 987 Nearly a Senior Poster Featured Poster

Put this on your form code :

    Protected Overrides Function ProcessTabKey(ByVal forward As Boolean) As Boolean
        MyBase.ProcessTabKey(forward)
        MsgBox("Tab key") ' Change this with your retrieving code or function name
    End Function
Jx_Man 987 Nearly a Senior Poster Featured Poster

ASP.Net

Jx_Man 987 Nearly a Senior Poster Featured Poster

All projects use .Net 2.0, 3.0, 3.5, or 4.0
You can change the version in Project Properties -> Compile -> Advanced Compile Option

Jx_Man 987 Nearly a Senior Poster Featured Poster

I don't get what you mean.
You want add value from textbox to datagrid?

Jx_Man 987 Nearly a Senior Poster Featured Poster

hi isaya, how far you doing this?
post your code and we will trying to help you,

Jx_Man 987 Nearly a Senior Poster Featured Poster

thts fine....but how to convert textbox value to valid datetime format and update in database.....i m using sqlserver 2008r2 and vb.net.

i think Reverend Jim was answered it.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Ok. Don't forget to mark this thread as solved

Jx_Man 987 Nearly a Senior Poster Featured Poster

what you mean about combine?

Jx_Man 987 Nearly a Senior Poster Featured Poster

Bad file name or Number

this means your file is not exist. make sure your fle is exist and Check your path is typed correctly.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Yes. It means every you added new path the same icon will shown.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi,
Set BorderStyle of the form to :
1 -Fixed Single

Regards
Veena

@ veena : I think the OP was do that.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Make sure your file to delete is exist.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Add one icon with dimension 16x16 to Imagelist.
Then add this code :

Private Sub Command1_Click()
On Error Resume Next

    With ListView1
        Set .Icons = ImageList
        Set .SmallIcons = ImageList
        Set View = .ListItems.Add(, , , 1, 1) ' Icon Added
        View.SubItems(1) = "This/Where/Path/Added/" & .ListItems.Count 'Path Added
        View.SubItems(2) = "Size " & .ListItems.Count 'Size Added
    End With
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

You can capture the form resizing event then set the form into normal size.

Private Sub Form_Resize()
    If (Me.WindowState <> vbMinimized) Then
        Me.Width = 4800
        Me.Height = 3600
    End If
End Sub

And set max button to false.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Give your effort first. then i (and other members) will help you.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Your question is same as before. did u tried what i said above?

Jx_Man 987 Nearly a Senior Poster Featured Poster

So, how far you write a codes to show files in drive?

Jx_Man 987 Nearly a Senior Poster Featured Poster

How far you doing this? post your code. show some effort first.

Jx_Man 987 Nearly a Senior Poster Featured Poster

you mean every added any path then there are icon set in left side of that items?