Click here to Skip to main content
15,917,059 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionexcel to sql in vb.net(windows forms) Pin
deepakkp16-Oct-06 1:01
deepakkp16-Oct-06 1:01 
AnswerRe: excel to sql in vb.net(windows forms) Pin
gspowar16-Oct-06 1:26
gspowar16-Oct-06 1:26 
Questionexcel to sql Pin
deepakkp16-Oct-06 0:57
deepakkp16-Oct-06 0:57 
AnswerRe: excel to sql Pin
chat_sp2001@yahoo.com16-Oct-06 4:17
chat_sp2001@yahoo.com16-Oct-06 4:17 
Questionurgently help Pin
ela_8516-Oct-06 0:47
ela_8516-Oct-06 0:47 
AnswerRe: urgently help Pin
Colin Angus Mackay16-Oct-06 0:50
Colin Angus Mackay16-Oct-06 0:50 
AnswerRe: urgently help Pin
Polymorpher16-Oct-06 8:59
Polymorpher16-Oct-06 8:59 
QuestionVB6 + API => File open lag Pin
P Ern16-Oct-06 0:40
P Ern16-Oct-06 0:40 
I was trying to use Windows API calls from VB6 programs,
While those programs are running, there seems to be a hugh delay when tryning to open Word, or Excl files.
This is very conatant phenomena: every time one or more of the programs is running,
the open time goes from 1 sec to 10 and even about 30 sec.
Kill the offending process gets the lag back to about 1 sec.

Seems that API wait calls are not compatible with the VB runtime on XP SP/2.
Any ideas?

Example 1:
==========
I was trying to write a VB6 based Service. The following code should be paste into a module (no form)
(Based on a service example)

'-------------------------------------------- Start of code ------------------------------
Public Const INFINITE = &HFFFF ' Infinite timeout
Public Declare Function CreateEvent Lib "kernel32" Alias "CreateEventA" (ByVal lpEventAttributes As Long, ByVal bManualReset As Long,

ByVal bInitialState As Long, ByVal lpName As String) As Long
Public Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long

Private Sub Main()
Dim hEvent As Long
hEvent = CreateEvent(0, 1, 0, vbNullString)
WaitForSingleObject hEvent, INFINITE
End Sub
'-------------------------------------------- End of code ------------------------------



Example 2:
==========
Open a new VB6 project, paste the attached to the form, run it, and try to open any WORD file.
(I converted this to run as a timer, and it seems OK, but I'd like to know why it is so WRONG?)

'-------------------------------------------- Start ot code ------------------------------
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMillseconds As Long)

Private Sub Form_Load()
Do While (True)
DoEvents
Sleep 1000
Loop
End Sub
'-------------------------------------------- End of code ------------------------------

Confused | :confused:
Questionvb.net macro Pin
gspowar16-Oct-06 0:12
gspowar16-Oct-06 0:12 
AnswerRe: vb.net macro Pin
Dave Kreskowiak16-Oct-06 9:23
mveDave Kreskowiak16-Oct-06 9:23 
QuestionRe: vb.net macro Pin
gspowar17-Oct-06 0:14
gspowar17-Oct-06 0:14 
AnswerRe: vb.net macro Pin
Dave Kreskowiak17-Oct-06 2:10
mveDave Kreskowiak17-Oct-06 2:10 
GeneralRe: vb.net macro Pin
gspowar17-Oct-06 19:30
gspowar17-Oct-06 19:30 
Questionstoring .wmv file in database Pin
ghelai_cute16-Oct-06 0:11
ghelai_cute16-Oct-06 0:11 
QuestionSPLIT() Pin
Mr kilany15-Oct-06 22:47
Mr kilany15-Oct-06 22:47 
AnswerRe: SPLIT() Pin
Guffa15-Oct-06 23:25
Guffa15-Oct-06 23:25 
QuestionChanging / renaming a CN in Active Directory Pin
Narfix15-Oct-06 22:43
professionalNarfix15-Oct-06 22:43 
AnswerRe: Changing / renaming a CN in Active Directory Pin
Narfix16-Oct-06 1:48
professionalNarfix16-Oct-06 1:48 
QuestionNeed Help !!! - Plagiarism tool Pin
Jats_4ru15-Oct-06 20:11
Jats_4ru15-Oct-06 20:11 
AnswerRe: Need Help !!! - Plagiarism tool Pin
Dave Sexton15-Oct-06 21:25
Dave Sexton15-Oct-06 21:25 
QuestionSave images in Access Using VB6 Pin
Kiran S. S.15-Oct-06 20:05
Kiran S. S.15-Oct-06 20:05 
AnswerRe: Save images in Access Using VB6 Pin
shreekar16-Oct-06 19:39
shreekar16-Oct-06 19:39 
QuestionHow to trap enter,esc and arrow key in datagrid Pin
hisuman10015-Oct-06 19:08
hisuman10015-Oct-06 19:08 
AnswerRe: How to trap enter,esc and arrow key in datagrid Pin
nlarson1118-Oct-06 9:36
nlarson1118-Oct-06 9:36 
AnswerRe: object required in data report?? Pin
Dave Sexton15-Oct-06 21:11
Dave Sexton15-Oct-06 21:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.