Hi,
Recently, I have been working on my own little project and have been having major headaches with VB6 while doing so and the problems only seem to occur when I am working on this particular project. I am not sure if it is because of the code I am using or what but the code shouldn't be executing if I am typing in the IDE should it and not actually running my program?
The is the code that seems to be executing while working on my program:
and I am confuse as to why it should be doing so when I not running the program.
Another problem I have encountered is VB doesn't seem to recognize the label:
it keeps saying variable undefined.
Also, sometimes I receive:
Run-time error '50304':
An instance of 'frmMain' cannot be created because it's designer window is open.
What is going on? :confused:
Thanks,
Nightwalker
Recently, I have been working on my own little project and have been having major headaches with VB6 while doing so and the problems only seem to occur when I am working on this particular project. I am not sure if it is because of the code I am using or what but the code shouldn't be executing if I am typing in the IDE should it and not actually running my program?
The is the code that seems to be executing while working on my program:
vb Code:
Public Function KeyboardProc(ByVal idHook As Long, ByVal wParam As Long, ByVal lParam As Long) As Long If idHook < 0 Then 'call the next hook KeyboardProc = CallNextHookEx(hHook, idHook, wParam, ByVal lParam) Else Select Case True Case GetAsyncKeyState(VK_LCONTROL) frmMain.ActiveControl.Text = (ht.Item(17)) Case GetAsyncKeyState(VK_RCONTROL) frmMain.ActiveControl.Text = (ht.Item(15)) Case GetAsyncKeyState(VK_LSHIFT) frmMain.ActiveControl.Text = (ht.Item(16)) Case GetAsyncKeyState(VK_RSHIFT) frmMain.ActiveControl.Text = (ht.Item(14)) Case GetAsyncKeyState(VK_LALT) frmMain.ActiveControl.Text = (ht.Item(18)) Case GetAsyncKeyState(VK_RALT) frmMain.ActiveControl.Text = (ht.Item(21)) End Select End If 'call the next hook KeyboardProc = CallNextHookEx(hHook, idHook, wParam, ByVal lParam) End Function
and I am confuse as to why it should be doing so when I not running the program.
Another problem I have encountered is VB doesn't seem to recognize the label:
vb Code:
For l = 2 To 37 - 2 lstCurrentAssign.ListItems.Add Label & l.Caption Next l
it keeps saying variable undefined.
Also, sometimes I receive:
Run-time error '50304':
An instance of 'frmMain' cannot be created because it's designer window is open.
What is going on? :confused:
Thanks,
Nightwalker