Question for VBPro's 
Author Message
 Question for VBPro's

Hello VBPro's,

I would appreciate if you could reply to my VB Queries,

1 - What is the exact command to call an external application for example
defrag into my VB application, and as soon as the user is done with it, it
returns directly to my project. Please include all the declaration and
functions.

2- How can I ping, tracert, finger and know my IP or other using VB ?. What
codes do I need.

3- I've just come through the tabstrip component. However, I would like to
know how can I move to a different tab and have different commands, lables
etc on the other. I added the component, yet was not able to add different
commands on a different tab. All tabs have same commands as the index one.
Please explain breifly how to use tabstrip of VB component.

4- I currently use a mer for my progressbar, how can make use of it during a
certain process.

5- What's the main difference between VB6 and VB5. I have both, but use VB5
because VB6 Application Wizard is a nuisance. If I develop an application
and have it as an setup.exe file, a user will be requested to boot-up the
machine if some files are not found on his machine. But with VB5, all files
are installed without the interruption of booting-up process.

Many thanks in advance

Tarq\iq



Tue, 22 Jan 2002 03:00:00 GMT  
 Question for VBPro's
Tariq,

1.  Jim Rech posted recently the following code which would appear to do
what you want:

Declare Function OpenProcess Lib "kernel32" _
 (ByVal dwDesiredAccess As Long, _
   ByVal bInheritHandle As Long, _
    ByVal dwProcessId As Long) As Long

Declare Function GetExitCodeProcess Lib "kernel32" _
 (ByVal hProcess As Long, _
   lpExitCode As Long) As Long

Public Const PROCESS_QUERY_INFORMATION = &H400
Public Const STILL_ACTIVE = &H103

Sub Test()
    Dim StartTime As Double
    StartTime = Now
    ShellAndWait "calc.exe", 1
    MsgBox "Gone " & Format(Now - StartTime, "s") & " seconds"
End Sub

Sub ShellAndWait(ByVal PathName As String, Optional WindowState)
    Dim hProg As Long
    Dim hProcess As Long, ExitCode As Long

    'fill in the missing parameter and execute the program
    If IsMissing(WindowState) Then WindowState = 1
    hProg = Shell(PathName, WindowState)

    hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, False, hProg)
    Do
        'populate Exitcode variable
        GetExitCodeProcess hProcess, ExitCode
        DoEvents
    Loop While ExitCode = STILL_ACTIVE
end Sub

3.    The tab strip control doesn't do quite as much as you think <g>.  It
is simply a set of tabs.  You have to organise the display yourself.  The
way you typically do it is to have several container controls (I usually use
SSPanel controls) which contain the display you want to show for each tab.
In the _Click event of the TabStrip you decide which container control
should be visible.  For a tab string called tsMain something like:

Dim l_iCurrTab as Integer

Private Sub tsMain_Click()
  Dim ToShow As Control

  If l_iCurrTab = tsMain.SelectedItem.Index Then Exit Sub

  ' Hide current panel
  Select Case l_iCurrTab
    Case 1:
      pRHS.Visible = False
    Case 2:
      pExpiry.Visible = False
    Case 3:
      pBondContDets.Visible = False
    Case 4:
      pOptions.Visible = False
  End Select

  l_iCurrTab = tsMain.SelectedItem.Index
  ' Show new panel
  Select Case l_iCurrTab
    Case 1:
      Set ToShow = pRHS
    Case 2:
      Set ToShow = pExpiry
    Case 3:
        Set ToShow = pBondContDets
    Case 4:
      Set ToShow = pOptions
  End Select

  ToShow.Move tsMain.Left, tsMain.Top + tsMain.TabFixedHeight, _
              tsMain.Width, tsMain.Height - tsMain.TabFixedHeight
  ToShow.Visible = True
End Sub

4.  I think you will have to give more details.  What is a "mer"?

5.  The setup process will ask for a re-boot when it is trying to update a
file that is in use by Windows.  This is true of both VB5 and VB6.

HTH

Peter


Quote:
> Hello VBPro's,

> I would appreciate if you could reply to my VB Queries,

> 1 - What is the exact command to call an external application for example
> defrag into my VB application, and as soon as the user is done with it, it
> returns directly to my project. Please include all the declaration and
> functions.

> 2- How can I ping, tracert, finger and know my IP or other using VB ?.
What
> codes do I need.

> 3- I've just come through the tabstrip component. However, I would like to
> know how can I move to a different tab and have different commands, lables
> etc on the other. I added the component, yet was not able to add different
> commands on a different tab. All tabs have same commands as the index one.
> Please explain breifly how to use tabstrip of VB component.

> 4- I currently use a mer for my progressbar, how can make use of it during
a
> certain process.

> 5- What's the main difference between VB6 and VB5. I have both, but use
VB5
> because VB6 Application Wizard is a nuisance. If I develop an application
> and have it as an setup.exe file, a user will be requested to boot-up the
> machine if some files are not found on his machine. But with VB5, all
files
> are installed without the interruption of booting-up process.

> Many thanks in advance

> Tarq\iq



Tue, 22 Jan 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Questions for VBPRO's

2. VB-VBpro what's the difference?

3. Handling screen resolution in vbpro???

4. Should I buy VBPro 4.0 Student Edition?

5. VBPro & ACCESS 2 help

6. HELP: VBPro 3 crystal ctrl has problems

7. Q: CRW for VBPro 3...

8. Q: How do i delete an access table with VBpro

9. VBPro v. VBEnterprise

10. AnimatePalette help in VBPro 3.0

11. VBpro 3.0 under Win95

12. VB and VBPro Differences?

 

 
Powered by phpBB® Forum Software