Login  
Search All Forums
Dart Home | PowerTCP Web Enterprise for ActiveX | Custom Development Reply | PowerTCP Web Enterprise for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web Enterprise for ActiveX
Topic: How to create WebASP object and bind to progress event
pkuczynski

From: Szczecin, Poland
Posts: 6
Member Since: 04/09/05
posted April 10, 2005 7:43 PM

How should I properly create WebASP object in run-time, to bind to the progress event?

Currently I am doing this way:

Dim httpx As DartWebASP.WebASP
Set httpx = New DartWebASP.WebASP
httpx.Request.URL = "http://www.dart.com"
httpx.Get
...
Set httpx = Nothing


Private Sub httpx_Progress(ByVal Method As DartWebASPCtl.WebMethodConstants, ByVal Status As DartWebASPCtl.WebStatusConstants, ByVal Count As Long, ByVal Size As Long)
  Debug.Print "PROGRESS Count:" + CStr(Count) + " Size:" + CStr(Size)
End Sub


But I see no action in progress sub. I am not very familiar with VB6, so maybe I am doing something wrong. Could you help me?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 10, 2005 8:41 PM

VB6 creates the events for you when you declare the object

You can either put the control on a form, or Dim it using "WithEvent" at the top level:

Dim Withevents WebASP1 as WebASP

You also might want to take a look at some of the sample apps that get installed with the toolkit.

pkuczynski

From: Szczecin, Poland
Posts: 6
Member Since: 04/09/05
posted April 11, 2005 5:12 AM

I found in the samples, that usually you put on the form DartWebASPCtl instead of DartWebASP described in the documentation. What's the difference between them?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 11, 2005 7:25 AM

I think that DartWebASPCtl is an object that VB automatically creates as a wrapper around our interface.
pkuczynski

From: Szczecin, Poland
Posts: 6
Member Since: 04/09/05
posted April 11, 2005 7:50 AM

I am not sure... In the code I can dim as DartWebASP.WebASP, but when I drag'n'drop control from the toolbar over the form it will be declared as DartWebASPCtl.WebASP...
pkuczynski

From: Szczecin, Poland
Posts: 6
Member Since: 04/09/05
posted April 11, 2005 1:28 PM

Sorry bithering you, but I still have huge problems wiht your component. I am doing following code:

Dim WithEvents httpx As DartWebASP.WebASP
Set httpx = New DartWebASP.WebASP
httpx.Request.URL = "http://address.yahoo.com"
httpx.Get
...
httpx.Request.URL = "https://login.yahoo.com/config/login?"
httpx.Request.Variables("aaa") = "1"
httpx.Request.Variables("bbb") = "2"
...
httpx.Post

And all seems to be working with Get, but it stucks on Post. Shall I do anything special for https communication?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 11, 2005 1:42 PM

I'd have to know the exact error message to comment on the cause. Please supply the exact text of the error message.
Reply | PowerTCP Web Enterprise for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX