Advertisement
ASP_Volume2 Windows System Services #30118

Phone Dialer in VB

Phone Dialer in VB for windows 95. 'thanks to Andre Obelink 'De Visual Basic Groep 'http://www.plus.nl/vbg/

AI

Ringkasan AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kode Sumber
original-source
<?php
	// This script is one way to prevent/control caching of a
	// web page.
	//
	// Example of What Happens without an expires:
	// Your web page is saved to your local hard drive and if
	// you want to reload it, you must click the Refresh/Reload
	// button on the browser. If you just press Return while the
	// URL line has focus, the cache copy is only loaded.
	// This is probably fine for normal pages which do not change
	// but is a headache when developing pages and constantly pressing
	// the Reload/Refresh browser button.
	//
	// Using the Expires and setting the date and time to the current
	// instantenous time, will prevent caching and permit the reload
	// of the page from server just by pressing return while the URL
	// address line is in focus.
	//
	// Another purpose is when you have dynamic content or for PHP
	// when you are referencing a database table. Good pratice would
	// be to expire that page immediately so the next time the client
	// loads the page, any new data is retrieved without any extra
	// effort on the user.
	//
	// IMPORTANT:
	// The Expires: time stamp must be GMT. PHP has a function to
	// format the date in GMT.
	$nowGMT = gmdate("M d Y H:i:s");
	// This is header information and needs to be in the
	// header portion of the client page.
	// If displaying other than graphics, the Content-type
	// needs updating to reflect the content being displayed.
	$header = "Content-type: text/plain\nExpires: $nowGMT\n\n";
	header($header);
	// NOTE:
	// I've discovered, I needed to include the HTML <body> tags
	// when I use the PHP header() function, otherwise the
	// HTML tags are not interpreted properly and are displayed
	// as normal text.
	echo "<body>\n";
	echo "<b>$nowGMT</b>";
	echo "</body>\n";
?>
'make a new project; 2 textboxen (index 0 & 1); 2 labels (index 0 & 1)
'1 command button
'Insert the next code in the right place (use Insert/File)
'Press F5
------------- code -------------------
Private Sub ChooseNumber(strNumber As String, strAppName As String, strName As String)
  Dim lngResult As Long
  Dim strBuffer As String
  
  lngResult = tapiRequestMakeCall&(strNumber, strAppName, strName, "")
  If lngResult <> 0 Then 'error
    strBuffer = "Error connecting to number: "
    Select Case lngResult
    Case -2&
      strBuffer = strBuffer & " 'PhoneDailer not installed?"
    Case -3&
      strBuffer = strBuffer & "Error : " & CStr(lngResult) & "."
    End Select
    
    MsgBox strBuffer
  End If
  
End Sub
Private Sub Command1_Click()
  Call ChooseNumber(Text1(0).Text, "PhoneDialer", Text1(1).Text)
  
End Sub

Private Sub Form_Load()
  Text1(0).Text = ""
  Text1(1).Text = ""
  
End Sub
Private Sub Form_Unload(Cancel As Integer)
  End
  
End Sub
Upload
Komentar Asli (3)
Dipulihkan dari Wayback Machine