Alaska and the Internet
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Alaska and the Internet
1. How not to open sites and addressing them by ftp and before that find out the Internet or not.
2. How to open a site for it to be minimized in the taskbar or after the opening of the site to close it after a specified time.
2. How to open a site for it to be minimized in the taskbar or after the opening of the site to close it after a specified time.
Re: Alaska and the Internet
If you have the Alaska Professional Subscription, it includes ASINet. This supports an FTP client.How not to open sites and addressing them by ftp and before that find out the Internet or not
I will write you a small sample program.How to open a site for it to be minimized in the taskbar or after the opening of the site to close it after a specified time.
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Alaska and the Internet
Roger! I know how to use FTP software and open sites. I want to know if the Internet is to how to use it (to avoid any mistakes, if it is not)
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Alaska and the Internet
1. In general, I want to know is, the Internet or not. And if it is, then use it.
2. It would be interesting to apply to the site and close it after a specified time (very small).
2. It would be interesting to apply to the site and close it after a specified time (very small).
Re: Alaska and the Internet
Your questions are vague and ambiguous.
Every internet resource must be handled differently.
If you are using a WebBrowser or DCHTMLVIEWER then the browser will let you know if a site cannot be reached.
What kind of internet resource are you wanting to test?
If it is an FTP server, then AsiNet FTP class will return an error code if you cannot connect.
Are you wanting to know if you have access to anything on the internet at all and that your internet provider is the problem?
Every internet resource must be handled differently.
If you are using a WebBrowser or DCHTMLVIEWER then the browser will let you know if a site cannot be reached.
What kind of internet resource are you wanting to test?
If it is an FTP server, then AsiNet FTP class will return an error code if you cannot connect.
Are you wanting to know if you have access to anything on the internet at all and that your internet provider is the problem?
The eXpress train is coming - and it has more cars.
Re: Alaska and the Internet
Hopefully, this will get you started.
The Windows API function, InternetGetConnectedState, is used to test if there is an internet connection.
The TIMEOUT for the Web Browser window is 120 seconds.
The Windows API function, InternetGetConnectedState, is used to test if there is an internet connection.
The TIMEOUT for the Web Browser window is 120 seconds.
Code: Select all
/*
TASKBAR.PRG
This sample demonstrates how to use TASKBAR.DLL to start up the application
in the ICON tray.
1. To start the program normally: TASKBAR
2. To start the program in the icon tray: TASKBAR x
*/
#INCLUDE "dcdialog.CH"
#INCLUDE "dcicon.CH"
#INCLUDE "appevent.CH"
#INCLUDE "dll.CH"
#Pragma Library("Taskbar.lib")
FUNCTION Main( TaskTray )
DC_IconDefault(ICON_EXPRESS)
IF !Empty(TaskTray)
TaskBarMenu()
ELSE
BrowseForum()
ENDIF
RETURN nil
* -----------
PROC appsys ; RETURN
* -----------
FUNCTION TaskBarMenu()
LOCAL GetList[0], oTaskBar, oMenu, aRef[2]
oTaskBar := TaskBarIcon():New( xbeP_User + 30 ):Create()
oTaskBar:AddIcon( 1, ICON_EXPRESS , "Donnay Forum" + Chr(13) + ;
'Right-Click for menu' )
DCSUBMENU oMenu PROMPT 'Taskbar Menu' PARENT oTaskBar
DCMENUITEM 'Run Donnay Forum' PARENT oMenu ;
ACTION {||Thread():new():start({||BrowseForum()})}
DCMENUITEM 'Exit' PARENT oMenu ;
ACTION {||DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)}
DCREAD GUI PARENT oTaskBar ;
EVAL {||aRef[1] := oMenu, aRef[2] := oTaskBar} ;
HANDLER taskBarHandler REFERENCE @aRef
oTaskBar:remAllIcons()
QUIT
RETURN nil
* -----------
STATIC FUNCTION taskBarHandler( nEvent, mp1, mp2, oXbp, oDlg, GetList, aRef )
LOCAL oMenu := aRef[1], oTaskBar := aRef[2]
IF nEvent = xbeP_User + 30
IF mp1[2] = xbeM_RbUp
oMenu:PopUp( oTaskBar, { mp1[3], mp1[4] } )
ENDIF
ENDIF
RETURN DCGUI_NONE
* -------------
STATIC FUNCTION BrowseForum()
LOCAL GetList[0], GetOptions, oWebBrowser, n := 0
IF InternetGetConnectedState( @n, 0 ) == 0
DCMSGBOX 'The Internet is NOT Available!' TIMEOUT 3
ENDIF
@ 0,0 DCHTMLVIEWER oWebBrowser SIZE 1000,800 PIXEL ;
NAVIGATE "http://bb.donnay-software.com/donnay/index.php"
DCGETOPTIONS ;
RESIZE ;
RESIZEDEFAULT DCGUI_RESIZE_RESIZEONLY
DCREAD GUI FIT TITLE 'Donnay User Support Forum' ;
SETAPPWINDOW ;
OPTIONS GetOptions ;
HANDLER browseHandler REFERENCE Seconds() ;
TIMEOUT 120
RETURN nil
* ---------
STATIC FUNCTION browseHandler( nEvent, mp1, mp2, oXbp, oDlg, GetList, nSeconds )
RETURN DCGUI_NONE
* ---------
DLLFUNCTION InternetGetConnectedState( @nFlags, nReserved ) USING STDCALL FROM WinInet.Dll
- Attachments
-
- taskbar.zip
- (2.14 KiB) Downloaded 648 times
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Alaska and the Internet
My questions are vague because I had a foggy English. I have to question absolutely clear head. In your example, Roger, is the answer to the question of whether there is a connection to the Internet. I do, of course, use it. This is valuable. Many thanks! Opening of the site in its own browser - it partially solves the second question. You can make a small box somewhere on the side of the screen and it will not interfere with other windows. But it would be even better if it did not deploy at the opening, and was minimized in the taskbar. And it would be great if it is itself shut after a specified time.
It says what I need. The truth is in Russian:
http://www.cyberforum.ru/php/thread1871802.html
I do it all already made in the system of the Eidos. It remains only to make a cartographic visualization visitors, like this:
http://www.revolvermaps.com/?target=enl ... mlzmb&dm=2
Interestingly, I found that my system and run in the US and in the Netherlands and Bulgaria:
http://j90540lw.beget.tech/test_strings.txt
Previously, I did not know.
I have not figured out in your example, how to run a function in the system tray or taskbar
It says what I need. The truth is in Russian:
http://www.cyberforum.ru/php/thread1871802.html
I do it all already made in the system of the Eidos. It remains only to make a cartographic visualization visitors, like this:
http://www.revolvermaps.com/?target=enl ... mlzmb&dm=2
Interestingly, I found that my system and run in the US and in the Netherlands and Bulgaria:
http://j90540lw.beget.tech/test_strings.txt
Previously, I did not know.
I have not figured out in your example, how to run a function in the system tray or taskbar
- Attachments
-
- Безымянный.jpg (308.63 KiB) Viewed 12593 times
Last edited by Eugene Lutsenko on Thu Dec 08, 2016 2:32 pm, edited 1 time in total.
Re: Alaska and the Internet
But it would be even better if it did not deploy at the opening, and was minimized in the taskbar.
Pass any parameter to Taskbar.exe and it will start on the Taskbar.
Right click to open the WebBrowser window.
The TIMEOUT clause of DCREAD GUI causes it to shut down after 120 seconds.And it would be great if it is itself shut after a specified time.
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Alaska and the Internet
I can not run with the parameter TaskBar.exe. When you try to do just nothing happens
Re: Alaska and the Internet
Look at your TASK BAR.I can not run with the parameter TaskBar.exe. When you try to do just nothing happens
The Rocket Icon will appear on the TASK BAR.
If it is not there, then click the arrow to open the TASK BAR window.
When you see the Rocket Icon, right click it for it's menu.
The eXpress train is coming - and it has more cars.