Solved

Hide dialog window when dialup Ras commection

Posted on 2000-03-06
7
233 Views
Last Modified: 2008-02-26
When I try to connect to a remote access server (RAS) a dialog window appears after the dialing, asking me to enter username, password and domain, althougth I stated those parameters in code. How do I get rid of this window?
0
Comment
Question by:nireves
  • 5
  • 2
7 Comments
 
LVL 4

Accepted Solution

by:
Chizl earned 200 total points
ID: 2587716
It's the Async part that shows or not show the dialog..   Something like this..

If boolAsync Then
      'Asyncronous and ignoring RASDIALEXTENSIONS.
      'So that HWND is valid
      Load frmAsyncDial      
      lngRetCode = RasDial(ByVal APINULL, vbNullString, lprasdialparams, &HFFFFFFFF, frmAsyncDial.hWND, hRasConn)
Else
      'Syncronous and ignoring RASDIALEXTENSIONS.      
      Screen.MousePointer = vbHourglass      
      lngRetCode = RasDial(ByVal APINULL, vbNullString, lprasdialparams, APINULL, ByVal APINULL, hRasConn)
      Screen.MousePointer = vbDefault
End If
0
 

Author Comment

by:nireves
ID: 2595963
I already do it 'Syncronous', not 'Asyncronous '.
Still this window appears.
What's causing it's display?
0
 
LVL 4

Expert Comment

by:Chizl
ID: 2599408
I use:

Load frmAsyncDial
lngRetCode = RasDial(ByVal APINULL, vbNullString, lprasdialparams, &HFFFFFFFF, frmAsyncDial.hWND, hRasConn)

To show it and:

'Syncronous and ignoring RASDIALEXTENSIONS.
Screen.MousePointer = vbHourglass
lngRetCode = RasDial(ByVal APINULL, vbNullString, lprasdialparams, APINULL, ByVal APINULL, hRasConn)
Screen.MousePointer = vbDefault

To not show it.

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 4

Expert Comment

by:Chizl
ID: 2599409
By the way If you go to http://www.karland.com/OurProducts/RAS32/ you will see and can get the DLL I wrote in VB using this code.  It gives you the option to display or not display the dialog.
0
 

Author Comment

by:nireves
ID: 2611585
Chizl,

Thanx for answering and sorry for the long delay in my response, I was unavailable...

But...

As I mentioned in my previous comment, I ALREADY do it Syncronously. There is nothing new here, I do it exactly the same as the code you wrote for not showing that window. But in my case the window DOES appear.

Any suggestions?
0
 
LVL 4

Expert Comment

by:Chizl
ID: 2614225
With the API I have :
&HFFFFFFFF, frmAsyncDial.hWND to show the dialog.. My own dialog..

The:
APINULL, ByVal APINULL
should make it not show up..

I'm not sure what the problem could be if it still shows up even with:
APINULL, ByVal APINULL as parm 4 and 5.

Humm.. I will look into it more.
0
 
LVL 4

Expert Comment

by:Chizl
ID: 2614231
Maybe you can pass in a hWnd of your own dialog, but make that dialog invisible (hide).  Trashy way to do it, but if nothing else works.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now