Minimalist 96 Posting Pro

Yes you can - To have these keys raise the KeyDown event, you must override the IsInputKey method in each control on your form. Read the link.
Since your code calls it from the TextBox1_KeyDown event you need to call it from the form that has focus.

Minimalist 96 Posting Pro

Your select statements could be also wrong. May be try:
"SELECT Sum((Quantity)12) FROM Sell_Detail Where Cateogry=" & "'" & Large & "'" and I am not sure if you have take this Sum((Quantity)12) also out of the string.

Minimalist 96 Posting Pro

Well, I haven't worked with com ports since dos6 and commit but you might find eberything you need to get started here:
http://www.codeproject.com/Articles/16648/NET-Phone-Communication-Library-Part-I-Retrieve-P
http://www.codeproject.com/Articles/16727/NET-Phone-Communication-Library-Part-IV-Receive-S

Minimalist 96 Posting Pro

Did you install all the sevice packs for vb6?
http://www.microsoft.com/en-us/download/details.aspx?id=5721
Also check this website for answers.

Minimalist 96 Posting Pro

Only glancing at it, you declared your variables as string but then try to do some calculation with these in line 8. Need to change into some number type, int, long ?

Minimalist 96 Posting Pro

The LWin and RWin keys are modifier keys with some extra functionallity. It is easier to use the Alt or Control keys.

 Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown
        If (e.Modifiers = Keys.Control AndAlso e.KeyCode = Keys.Z) = True Then
            Me.BackColor = Color.Blue
        End If
    End Sub

http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keydown.aspx

Minimalist 96 Posting Pro

If you just use: ReDim TheArray(num) you would loose all the values entered previously. To keep these you need to use: ReDim Preserve TheArray(num) where num can be num+1.

Minimalist 96 Posting Pro
Minimalist 96 Posting Pro

Maybe use a timer event to fire the alert.

Minimalist 96 Posting Pro

There are a few pitfalls working with dates as it always depends on how the compiler works these and can make decisions on what it thinks you want. ALso if you want to compare just numbers you will see that four comes before one because f goes when sorting before o. So generally speaking google as much as you can digest about some of th code if something goe wrong. Please mark this thread as solved.Thanks

Minimalist 96 Posting Pro

What is the event you want to use to move the data? Keypress? Buttonclick? Why do you want to move data into an array before moving it into a listbox? What code do you have sofar?

Minimalist 96 Posting Pro

Why don't you use datedifference function?
http://msdn.microsoft.com/en-us/library/b5xbyt6f(v=vs.90).aspx

Minimalist 96 Posting Pro

Well what is the idea of line 7? Maybe you should get rid of it. I thought you want to count the number of puls there consequently my idea of a second counter . In the real world you only get a certain number of pulls.

Minimalist 96 Posting Pro

O.K I assume you need to put some of your code into a button event which becomes your pull. In ther you need a counter to count the number of pulls. You also need to initialize your number of tokens as:
Dim number as Integer = 100 which is the start amount of tokens. So line 6 to 24 need to go into a buttons click event.

Minimalist 96 Posting Pro

My bad. Thought it would be easier to change the code. I use vb 13 express and no you just can't expect to import and run the code - it needs to get modified. I will give it aa try.

Minimalist 96 Posting Pro
Minimalist 96 Posting Pro

Its not really clear if you want 1 var or 3 var.You always can put them into an array:
arr1(6) as string =New String(){"200","100"......} and so on

Minimalist 96 Posting Pro

This link might be useful to you as it shows you the steps to take.
http://www.timesheetsmts.com/adotutorial.htm

Minimalist 96 Posting Pro

Maybe this is what you want?

Dim x As Integer = PictureBox1.Width
        Dim y As Integer = PictureBox1.Height
        Dim bm As New Bitmap(x, y)

        PictureBox1.DrawToBitmap(bm, New Rectangle(0, 0, x, y))

        PictureBox2.Image = bm
Minimalist 96 Posting Pro

Since I run all this old stuff in virtual machines I got some problems retrieving the code. However, have a look at this likn which shows the different graphs you can get:
http://www.vb123.com/toolshed/99_vbchart/vbchart1.htm
http://www.vb123.com/toolshed/99_graphs/msolechart.htm
If this doesn help you need to show some code where you think you got a problem with.

Minimalist 96 Posting Pro

I used the controls that shipped with vb6. In projects, components you can add different controls to your project. I have used MS chart wizard which you can add to your project and microsoft chart control 6.0 which you find in controls also.

Minimalist 96 Posting Pro

Replace line 14 with all of the following code:

 If st = "zero" Then
                lbl.Text = st & "  0"
            Else
                If st = "one" Then
                    lbl.Text = st & " 1"
                else
                    lbl.Text = st
                End If
            End If
Minimalist 96 Posting Pro

xlTmp.Workbooks.open ("app.path & \kundreg\bokfaktura2.xls") 'don't work
should be:
xlTmp.Workbooks.open ("app.path" & "\kundreg\bokfaktura2.xls") 'don't work

Minimalist 96 Posting Pro
Minimalist 96 Posting Pro

1) From my understanding it is used to allow scrolling of bitmaps and sprites in games. I only read up on it when I came across your question and post 2 links you may follow. The first shows you how to find info about directx and othe enviroment variables on your system.
http://windows.microsoft.com/en-us/windows/which-version-directx#which-version-directx=windows-7
The next one is a thread about your problem:
http://www.dreamincode.net/forums/topic/123298-vb-shuts-down/
My question is why don't you use the graphing controls in vb6? If you run vb6 and go to project you can add graphing controls to your program. I have used them years ago and they are easy to use. Good Luck

Minimalist 96 Posting Pro

look at line 14, put an if statement in and lbl.Text = st & " 0".
Don't forget to mark the thread as solved. Thanks

Minimalist 96 Posting Pro

@ cambalinho
Why don't you create a project, 2 textboxes and copy my code into the key_down event in the first textbox. It works perfect as you only catch the enter event and nothing else.

Minimalist 96 Posting Pro

@ cambalinho
Read the OP's question carefully and before telling me my code is incomplete try it first and put it in the correct event, keydown on textbox1.

Minimalist 96 Posting Pro

You can use something like this:

    Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown
        If e.KeyCode = Keys.Enter Then
            TextBox2.Focus()
        End If
    End Sub
Minimalist 96 Posting Pro
 Private Sub byteTest()
        Dim inquirybyyearmonthday(20) As Byte
    End Sub

Do you get an error if you use it like this? I didn't get the extra brackets.

Minimalist 96 Posting Pro

Just put an
if i= 0 then
put label location for the first label
end if

Minimalist 96 Posting Pro

Just reading up on it the problem might be with directx. Find out which version is running on the computer you want to run the game.

Minimalist 96 Posting Pro

The problem lies with you assigning the currentRow to items.count. You need to find the currentRow based on some criteria - this is only pseudo:
dim intCount ,i as Integer
intCount=.....Row.count
for i = 0 to intCount-1
if ...text= ..Row(i).items.text then
currentRow=...Row(i)
next
So basically you need to find the current row and then do your stuff.

Minimalist 96 Posting Pro

The code works fine

Private Sub Command1_Click()
If Text1.Text = "This" And Text2.Text = "That" And Text3.Text = "Those" Then
MsgBox ("1")
ElseIf Text1.Text = "This" And Text2.Text = "That" And Text3.Text = "Those" Then
MsgBox ("2")
Else
MsgBox ("Failed")
End If
End Sub

Private Sub Form_Load()
Text1.Text = "This"
Text2.Text = "That"
Text3.Text = "Those"
End Sub

don't forget the brackets around the msg. Also you will never enter the elseif if thats exactly the same as in the if statement

Minimalist 96 Posting Pro

O.K. make it as simple as possible. This code works for me:

Private Sub Form_Load()
If App.PrevInstance Then
Msgbox("Running")
End
Else
Form1.Show
End If
End Sub
Minimalist 96 Posting Pro
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim strComNAme As String = "DT-WAR-BISMITH"
        Dim strEx As String = "SMITH"
        If strComNAme.Contains(strEx) Then
            Debug.Print("Found")
        End If
    End Sub

O.K. this code works. Contains is case sensitive and I think you want to find the person name within th wcomputer name and not vise versa.

Minimalist 96 Posting Pro

Sorry I was too hasty, you do already.

Minimalist 96 Posting Pro

You don't need the split method. Use the contain method. See the examples here:http://www.dotnetperls.com/contains-vbnet

Minimalist 96 Posting Pro

Well, I do think you might want to reconsider.
1)There are already lots of these programs around.
2)VB6 doesn't cut it anymore. Why?
3)I have coded and sold a program like this coded in vb3,vb4,vb5,vb6 and now rewriting it in vb.net. You are looking at 20000 lines of code, depends how efficient your program should be. If you are on your own you are looking at one year of coding - in vb6, you are wasting your time. If you want tro look at my manual I will posted here.

Stuugie commented: At least you know what he/she means. +5
Minimalist 96 Posting Pro
For i As Integer = Me.Controls.Count - 1 To 0 Step -1
    If TypeOf Me.Controls(i) Is Label Then
        Me.Controls.RemoveAt(i)
    End If
Next
Minimalist 96 Posting Pro
Use App.PrevInstance:

'this code would be in a bas module for start up.'
Private Sub main()
    'Check for previous instance and exit if found.'

    Dim rc As Long

    If App.PrevInstance Then
        rc = MsgBox("Application is already running", vbCritical, App.Title)
        Exit Sub
    Else
        frmMain.Show
    End If

End Sub
Minimalist 96 Posting Pro

My 2 last posts didn't display so I try again. Just insrt my code into a new project and play around with the labels.

Imports System.Drawing.Color
Public Class Form1
    Inherits System.Windows.Forms.Form
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        Dim testStr As String = TextBox1.Text
        Dim st As String
        Dim po As Integer = 10
        For i = 0 To testStr.Length - 1
            st = CStr(GetRootNumberWord((CInt(Val(testStr(i))))))
            Dim lbl As New Label
            lbl.Text = st
            lbl.BackColor = Aqua
            lbl.Location = CType(New System.Drawing.Size(po + i, 30 * i), Point) 'position of label
            Me.Controls.Add(lbl)
        Next
    End Sub


    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Me.Close()
    End Sub
    Public Enum RootNumbers
        zero
        one
        two
        three
        four
        five
        six
        seven
        eight
        nine
    End Enum
    Public Shared Function GetRootNumberWord(ByVal number As Integer) As String
        Return [Enum].GetName(GetType(RootNumbers), number)
    End Function
End Class
Minimalist 96 Posting Pro
Dim value1 as string="Item1 1"
Dim value2 as string=value1.Replace(" 1","Yes")
Minimalist 96 Posting Pro

I very much recommend to read through this tutorial beause you are not following procedures of getting the recordset etc.
http://visualbasic.freetutes.com/learn-vb6-advanced/lesson8/p24.html

Minimalist 96 Posting Pro

Your msgbox will always display because it is not in any of the conditions but executes within the flow of the program. You need to put it where you want to display the msg. If the rest is working please mark the thread as solved. Thanks

Minimalist 96 Posting Pro

O.K. just go back to your original question. You want to use two input boxes to get two values. Look at my original post and then look at your last code.

msg = InputBox("ENTER PROD_DATE", "FIND")
msg = InputBox("ENTER SHIFT", "LOCATE")

So msg ony holds your shift. Then look at your code here:

If StrComp(Adodc1.Recordset.Fields("Prod_Date"), msg, vbTextCompare) = 0 Then
If StrComp(Adodc1.Recordset.Fields("Shift"), msg, vbTextCompare) = 0 Then

where you only search for "Shift" because thats what you assingned it as you useonly one variable =msg.

Minimalist 96 Posting Pro

Sorry copied the wrong line the first trime. What I tried to point out is that you never use msg1 in your search.

If StrComp(Adodc1.Recordset.Fields("Shift"), msg, vbTextCompare) = 0 Then

I think you wanted to use msg1 here.

Minimalist 96 Posting Pro

There are 2 issues:
1st) In windows 7 you havent't got the folder option to display your requested info to the statusbar as it has been removed by microsoft.
2nd) If you are coding your own explorer window you have the option to add the statusstrip from the toolbox to your form and display the information in there. The link will show you how:
http://www.dotnetheaven.com/article/statusbar-control-in-vb-.net

Minimalist 96 Posting Pro
If StrComp(Adodc1.Recordset.Fields("Prod_Date"), msg, vbTextCompare) = 0 Then

If StrComp(Adodc1.Recordset.Fields("Prod_Date"), msg1, vbTextCompare) = 0 Then

instead of msg shouldn't it be msg1

Minimalist 96 Posting Pro

Well you want to prompt for two pieces of input, so use two input boxes.

Dim msg1, msg2 As String
line 16   msg = InputBox("ENTER PROD_DATE", "FIND")
line17    msg1 = InputBox( "Enter Shift", ?)

So you catch the second prompt in msg1