|
KarlKaiser wrote:
But it's turning out that I will have several days (weeks?) of study to even get to that level.
Possibly, depending on where you're coming from.
KarlKaiser wrote:
I think the user should (and would want to) see the default values for new table fields when they create a new record
Then do what I said - enforce defaults in the UI, not the DB.
KarlKaiser wrote:
But enough talk for now. It's time to study up.
Have fun....
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
It sounds to me like you've locked yourself into a product that, right or wrong, was bought by Microsoft for the express purpose of killing it.
Actually, Microsoft did a very good job with keeping FoxPro alive even though it was in competition with Access. Its only as we entered the .NET world where FoxPro started to get left behind as its language (being data-centric) couldn't be made compliant.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
Hi,
I have been looking into implementing SHA-2 Hashing into my application, but I am unsure if it is available in the .NET Framework. I have read conflicting info on the Net; some says that the SHA256, 384 and 512 are different bit strenght versions of SHA-1 and some say SHA-2. If not does anyone have a C# implementation of SHA-2?
Thanx!
Dave Shaw
History admires the wise, but elevates the brave. - Edmund Morris
|
|
|
|
|
Dave,
Have you read the article Good Bye MD5 by ediazc here on Code Project? It may point you in the direction you want to go.
Paul
|
|
|
|
|
There appears to be a bug in the Region.Union function in GDI+. I see this in programs developed in C# .Net using Visual Studio 2003. I have been using Regions in an application I have been developing and in most cases have had no problems with the Union function. I noticed some occasional glitches in my program and have traced them to this bug in Microsoft's routine. The Union function allows you to build up various shapes/regions together into a region encompassing all the subparts. In the example below I create a Region that is the combination of 3 rectangles. The fact that the rectangles overlap may be what triggers the bug, although the function should be able to work with overlapping areas.
If anyone can prove me wrong I'll be very impressed.
The problem can be demonstrated in this simple test code which responds to the paint event. To run the code, create a C# windows forms application. And put this code in your paint event handler.
The code will draw the outlines of the three rectangles with a black dashed line. The pink area should be the combination/union of the areas of the 3 rectangles. You'll see there is a small area missing that should be filled in pink but its not.
I wasn't able to find anything on the internet regarding this bug so I thought I would post it.
<br />
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)<br />
{<br />
Rectangle rect1,rect2,rect3;<br />
rect1 = new Rectangle(435,235,50,50);
rect2 = new Rectangle(180,80,250,250);
rect3 = new Rectangle(335,135,250,250);
<br />
Region redrawRegion = new Region();<br />
redrawRegion.MakeEmpty();<br />
redrawRegion.Union(rect1);<br />
redrawRegion.Union(rect2);<br />
redrawRegion.Union(rect3);<br />
using(Brush myBrush = new SolidBrush(Color.Fuchsia))<br />
{<br />
e.Graphics.FillRegion(myBrush,redrawRegion);<br />
}<br />
<br />
using(Pen myPen = new Pen(Color.Black))<br />
{<br />
myPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;<br />
e.Graphics.DrawRectangle(myPen,rect1);<br />
e.Graphics.DrawRectangle(myPen,rect2);<br />
e.Graphics.DrawRectangle(myPen,rect3);<br />
}<br />
}
Any suggestions or comments are welcome.
Steve Knauber
|
|
|
|
|
Hi!
Last week I could play a little bit with Axapta from Microsoft.
I didnt like the GUI and Navigation but I wonder how to build an application
with 7 customizable layers. IMHO SAP or PeopleSoft are similar ? (Country, Industry, partner, Custpomer,..) where each can be edited and
they can still use the same core libraries and businessfunctions ?
How do they do this ? Can anyone pass me links or give me some information how to build such applications ? Maybe just with two layers. Do they use plugins or subclassing ?
Thanks Thomas
|
|
|
|
|
|
I want to call HtmlHelp API function. I include the .h file and specify the incluce and libary directories. Howerver, it continuous give this error "error C2660: 'CWnd::HtmlHelpA' : function does not take 4 arguments".
|
|
|
|
|
I have a C# windows service that depends on time comparisons that is encountering problems due to the time zone on the machine being changed. Unfortunately, this time zone change is outside of my control. I use the TimeZone.CurrentTimeZone.ToUniversalTime() and TimeZone.CurrentTimeZone.GetUtcOffset() methods to make sure all my times are converted and compared as UTC. The problem is that TimeZone.CurrentTimeZone is not updating when the machine's time zone has changed. You can reproduce this easily by creating a console app with the following lines of code, and manually changing your machine's time zone during the app's pause.
Console.WriteLine("Current time zone is {0}.", TimeZone.CurrentTimeZone.StandardName);<br />
Console.Write("Waiting for time zone change. Hit 'Enter' to continue ...");<br />
Console.ReadLine();
Console.WriteLine("Current time zone is {0}.", TimeZone.CurrentTimeZone.StandardName);
Does anyone have any idea about how to refresh or update the TimeZone.CurrentTimeZone? Thanks!
|
|
|
|
|
I think I found a work-around, but I don't fully like it. If I call the GetSystemTime WinAPI function, it seems to always return the correct UTC time.
I got some decent sample code from Anson Goldade's GotDotNet user sample to nicely encapsulate the API calls. Too bad Microsoft's framework methods don't call the API correctly.
|
|
|
|
|
The problem is that the CurrentTimeZone property caches the result for the lifetime of the AppDomain , so you won't see any changes until your AppDomain is restarted.
The simplest option is to use reflection to create a new instance of the internal CurrentSystemTimeZone class. The following code will cache the current time zone for 5 minutes, and allow you to manually refresh the time zone as well:
using System;
using System.Reflection;
public sealed class CurrentTimeZone
{
private const int RefreshAfterMinutes = 5;
private static readonly object _lockMe = new object();
private static readonly Type _timeZoneType;
private static readonly ConstructorInfo _timeZoneConstructor;
private static TimeZone _instance = TimeZone.CurrentTimeZone;
private static DateTime _instanceCreated = DateTime.UtcNow;
static CurrentTimeZone()
{
_timeZoneType = TimeZone.CurrentTimeZone.GetType();
_timeZoneConstructor = _timeZoneType.GetConstructor(
BindingFlags.Instance | BindingFlags.NonPublic,
null, new Type[0], null);
}
private static TimeZone CreateInstance()
{
return (TimeZone)_timeZoneConstructor.Invoke(null);
}
private static void UpdateIfStale()
{
TimeSpan age = _instanceCreated - DateTime.UtcNow;
if (age.TotalMinutes > RefreshAfterMinutes)
{
_instance = CreateInstance();
_instanceCreated = DateTime.UtcNow;
}
}
public static TimeZone Instance
{
get
{
lock(_lockMe)
{
UpdateIfStale();
return _instance;
}
}
}
public static void Refresh()
{
lock(_lockMe)
{
_instance = CreateInstance();
_instanceCreated = DateTime.UtcNow;
}
}
}
All you need to do is replace each instance of TimeZone.CurrentTimeZone with CurrentTimeZone.Instance , and you should see the changes within 5 minutes.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Unfortunately, I need to know the time zone at the exact moment that the code runs, and even 5 minutes late could cause issues.
Anyway, while it's pretty cool, do you really think that your class is the simplest way to fix the problem when you can just call the GetSystemTime API?
|
|
|
|
|
If you just need the current UTC system time, you can simply call DateTime.UtcNow , which will return the same time as calling the GetSystemTime API.
From your initial post, it sounded like you need the current time zone information as well, in which case the code I posted will be the simplest solution.
If you want the current time zone information without any caching, you can simply remove the caching code and always return a new instance:
using System;
using System.Reflection;
public sealed class CurrentTimeZone
{
private static readonly Type _timeZoneType;
private static readonly ConstructorInfo _timeZoneConstructor;
static CurrentTimeZone()
{
_timeZoneType = TimeZone.CurrentTimeZone.GetType();
_timeZoneConstructor = _timeZoneType.GetConstructor(
BindingFlags.Instance | BindingFlags.NonPublic,
null, new Type[0], null);
}
private static TimeZone CreateInstance()
{
return (TimeZone)_timeZoneConstructor.Invoke(null);
}
public static TimeZone Instance
{
get { return CreateInstance(); }
}
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Thanks, this code will be very useful to me.
However, I just want to point out that in my tests DateTime.UtcNow doesn't return the correct time because of the time zone caching. You can try it yourself by using a test similar to the first one I posted.
|
|
|
|
|
That's very strange. The DateTime.UtcNow property simply calls the GetSystemTimeAsFileTime API to get the current UTC system time. There is no caching involved, so the result should be the same as calling the GetSystemTime API directly.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
hey guys!
sorry about my english..
======== the context:
- one WebService "A", where the IIS directory security has only the "Windows Integrated Authentication" enable, and authentication mode is "Windows" on web.config.
- IIS Version 5.1
- one WindowsApplication "B", to call some methods from the WebService "A".
- the user running the WinApp "A", belongs to Administrator Group on both machines ("A" app Machine, and "B" app Machine). User account is the same in both places. this will never change...
- I always need to set the Credentials of my proxy obj before call any webMethod (this happen on "B" app)
======== the problem:
- is kind boring, ask for user insert the UserName, Password and Domain all the time, rigth?!
so, is possible set at runtime this informations, wihtout user interactions?
or some way to set anything on web.config or IIS to workaround this problem?
.. I search how build the Credentials dynamically, I can get the current userName and Domain, but what about the password??
any tip will be great!
thanks!
João Paulo Melo
southBrazil
blitzkrieg bop!!
-- modified at 14:15 Thursday 1st September, 2005
|
|
|
|
|
I do a auction system.this software use CS architectur.The client use tcp to communicate with the server.Now I met a question that the firewall refuse the tcp connection of the listening port.I want to look for a appropriate solution in dot net framework which can resolve this problem.
More over,I plan to development an activex control to work together with the client.This activex control has same functions as the client.As so,the communication solution base on a standard specificat maybe needed (such as webservice).It supports the client and avtivex communicate with the server in the same way.But i am afraid that webservice can't satisfy capability requirement.This system require Quote action complete in 500ms.300 sessions in the same time.
want to get your advices.thanks all.
|
|
|
|
|
A properly designed web service should be more then capable of handling the load you are talking about. With current hardware you shouldn't even need more then one server. As long as your transaction system can handle the load, putting a web service interface in place shouldn't add more then tens of milliseconds to the transaction, and shouldn't add any scalablilty bottlenecks.
I've dealt with webservices handling sub 100ms response time with 5000+ concurrent "sessions" with 3 year old hardware. Since there wasn't a lot of procesing on the web service layer the database server determined performance to a greater extent.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
-- modified at 23:55 Wednesday 31st August, 2005
|
|
|
|
|
Thank you!
I am sorry I forgot to explain an important factor.When a client quote a new price other clients must get it rapidly.So the clients must check the new price frequently.About every 200ms 1 times.
I want to know the capability in this case.
|
|
|
|
|
In general the true bottlenecks on any system are the network, memory and processor constraints of the systems that your application is running on. What I am saying is that in my experience the .net web service implementation adds a fixed transactional cost based on adding a small amount of processor and memory time and extra message size. You need to test and do a comparison to see if the overhead is too high, but there isn't anything in principle which slow the system down below what you need.
However if your system is already close to the numbers you need then the additional overhead might push you over. The only way to really tell is test.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
I am currently working on a phase whose task is to extract each and every frame from an AVI Movie,save it onto Bitmap object and process it.I am doing this task in WEB FORM APPLICATIONS( VISUAL C++ PROJECTS) which is in 1.1 Framework.In visual C++ there is vfw32.lib which serves the purpose.Is there any way to use that lib here.IF there is then how?Or any other library can be used to do the same task?
|
|
|
|
|
Hi all,
I've built a Windows Service wich accepts arguments in the main function so I can execute the exe like MyWindowsServ.exe –install .
I can install the service, I can run it, and everything runs ok.
Now, what I wanted to do was to install the service so when it starts it can take some arguments as well.
If you look at the COM+ Event System service properties (for instance) in your control panel, you can see that the path to executable is something like this C:\WINDOWS\system32\svchost.exe -k netsvcs
Is there a way I can add these arguments to my ProcessInstaller or ServiceInstaller or something like that?
Thanks,
vSoares
|
|
|
|
|
Hi all,
I am new to Pocket PC world.I am working in Pocket PC windows application using C#.NET.I am developing the application similar to MS Paint.I want to do CUT/Copy/Paste,Setting transparency,background every thing.If there is any 3rd party control to serve this purpose.
If so please let me know.
If any body knews coding in C#.Net(For Pocket PC) to do the above mentioned functionalities.Please let me knew.It is very helpfull for me.Thanx in advance.
Regards,
S.Sevugan.
|
|
|
|
|
although I can not help you for this ,but still give your best regards and hope to get this knowledge too.
|
|
|
|
|
The problem is, code does not detected telephone tones(telephone button press).Language is vb.net.
Code is::
Imports TAPI3Lib<br />
Imports SpeechLib<br />
Public Class Form1<br />
Inherits System.Windows.Forms.Form<br />
<br />
#Region " Windows Form Designer generated code "<br />
<br />
Public Sub New()<br />
MyBase.New()<br />
<br />
'This call is required by the Windows Form Designer.<br />
InitializeComponent()<br />
initializetapi3()<br />
'Add any initialization after the InitializeComponent() call<br />
<br />
End Sub<br />
Sub initializetapi3()<br />
m_TAPI.Initialize()<br />
'oTAPI = m_TAPI<br />
cn = New notification<br />
AddHandler m_TAPI.ITTAPIEventNotification_Event_Event, New TAPI3Lib.ITTAPIEventNotification_EventEventHandler(AddressOf cn.sEvent)<br />
<br />
End Sub<br />
<br />
'Form overrides dispose to clean up the component list.<br />
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)<br />
m_TAPI.Shutdown()<br />
If disposing Then<br />
If Not (components Is Nothing) Then<br />
components.Dispose()<br />
End If<br />
End If<br />
MyBase.Dispose(disposing)<br />
End Sub<br />
<br />
'Required by the Windows Form Designer<br />
Private components As System.ComponentModel.IContainer<br />
<br />
'NOTE: The following procedure is required by the Windows Form Designer<br />
'It can be modified using the Windows Form Designer. <br />
'Do not modify it using the code editor.<br />
Friend WithEvents Button1 As System.Windows.Forms.Button<br />
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()<br />
Me.Button1 = New System.Windows.Forms.Button<br />
Me.SuspendLayout()<br />
'<br />
'Button1<br />
'<br />
Me.Button1.Location = New System.Drawing.Point(144, 64)<br />
Me.Button1.Name = "Button1"<br />
Me.Button1.Size = New System.Drawing.Size(104, 40)<br />
Me.Button1.TabIndex = 0<br />
Me.Button1.Text = "answer"<br />
'<br />
'Form1<br />
'<br />
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)<br />
Me.ClientSize = New System.Drawing.Size(292, 273)<br />
Me.Controls.Add(Me.Button1)<br />
Me.Name = "Form1"<br />
Me.Text = "Form1"<br />
Me.ResumeLayout(False)<br />
<br />
End Sub<br />
<br />
#End Region<br />
<br />
<br />
Private MediaAudio As Integer<br />
Private MediaModem As Integer = 24<br />
Private MediaFax As Integer<br />
Private MediaVideo As Integer<br />
Dim MediaTypes As Integer<br />
Private cn As notification<br />
'Private WithEvents button1 As System.Windows.Forms.Button<br />
'Private WithEvents oTAPI As TAPI3Lib.TAPI ' will hold our TAPI object<br />
'Private oTAPI As TAPI3Lib.TAPI<br />
Dim m_TAPI As New TAPIClass<br />
Private line_token As Integer<br />
Private oAddress As ITAddress ' will hold our selected address (you can hold many address in an array)<br />
<br />
<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim myspeak As New SpeechLib.SpVoiceClass<br />
Dim S1 As New SpeechLib.SpFileStream<br />
Const FILENAME1 = "c:\my.wav"<br />
Dim ec As IEnumCall = oAddress.EnumerateCalls()<br />
Dim arg As System.UInt32 = Convert.ToUInt32(0) 'ToDo: Unsigned Integers not supported<br />
Dim ici As ITCallInfo<br />
Dim reject = False<br />
Dim eobj<br />
Dim aa As New Byte<br />
Dim val As Integer<br />
<br />
'Trya<br />
ec.Next(Convert.ToUInt32(2), ici, arg)<br />
Dim bc As ITBasicCallControl = CType(ici, TAPI3Lib.ITBasicCallControl)<br />
' Dim con As ITBasicCallControl = CType(ici, TAPI3Lib.ITBasicCallControl)<br />
'If Not reject Then<br />
MsgBox("hello how r u")<br />
bc.Answer()<br />
MsgBox("hello")<br />
'Dim tone As TAPI3Lib.ITToneDetectionEvent = CType(ici, TAPI3Lib.ITToneDetectionEvent)<br />
'Dim a = tone.Call()<br />
<br />
<br />
<br />
<br />
<br />
'Try<br />
' S1.Open(FILENAME1, SpeechStreamFileMode.SSFMCreateForWrite)<br />
' myspeak.AudioOutputStream = S1<br />
' myspeak.Speak("welcome to telemail,how r u girls")<br />
<br />
' S1.Close()<br />
' MsgBox("file is created")<br />
' Sound.PlayWaveFile(FILENAME1)<br />
<br />
'Catch ex As Exception<br />
' MsgBox(e.ToString)<br />
'End Try<br />
<br />
<br />
<br />
<br />
End Sub<br />
<br />
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
' creating a new instance to first initialize TAPI befor attaching the events<br />
Try<br />
<br />
' a variable to hold supported media types for the address<br />
<br />
' initializing TAPI<br />
'''m_TAPI.Initialize()<br />
'''oTAPI = m_TAPI<br />
'm_TAPI = Nothing<br />
'oTAPI.EventFilter = (TAPI_EVENT.TE_CALLNOTIFICATION Or TAPI_EVENT.TE_CALLSTATE Or TAPI_EVENT.TE_CALLINFOCHANGE)<br />
' attaching event sink<br />
'oTAPI = m_TAPI<br />
' getting red of the private instance as we have another global instance (oTAPI)<br />
'm_TAPI = Nothing<br />
<br />
Dim AddressCollection As ITCollection = m_TAPI.Addresses()<br />
<br />
For Each Address As ITAddress In AddressCollection ' looping through address collection<br />
<br />
If Address.State = ADDRESS_STATE.AS_INSERVICE Then ' checking if address is working <br />
<br />
Dim MediaSupport As ITMediaSupport = Address ' extracting meida support interface from the address<br />
<br />
MediaTypes = MediaSupport.MediaTypes ' extracting media types supporting<br />
<br />
MediaSupport = Nothing ' dispose of the object<br />
<br />
'If MediaTypes And MediaModem = MediaModem Then<br />
' the address is a data Modem<br />
If MediaTypes = MediaModem Then<br />
' the address supports Audio<br />
oAddress = Address ' select this address<br />
MsgBox("we have selected this address: " + oAddress.AddressName) ' show the selected address name<br />
MsgBox("no is" + CType(MediaTypes, String))<br />
Exit For<br />
End If<br />
End If<br />
<br />
'End If<br />
<br />
Next Address<br />
<br />
<br />
'If Not oAddress Is Nothing Then<br />
' registering notifications for the selected address<br />
line_token = m_TAPI.RegisterCallNotifications(oAddress, True, True, MediaTypes, 2)<br />
m_TAPI.EventFilter = TAPI_EVENT.TE_CALLNOTIFICATION Or TAPI_EVENT.TE_DIGITEVENT Or TAPI_EVENT.TE_PHONEEVENT Or TAPI_EVENT.TE_CALLSTATE Or TAPI_EVENT.TE_GENERATEEVENT Or TAPI_EVENT.TE_GATHERDIGITS Or TAPI_EVENT.TE_REQUEST Or TAPI_EVENT.TE_TONEEVENT Or TAPI_EVENT.TE_CALLMEDIA<br />
<br />
Catch ex As Exception<br />
MsgBox("Error occured:" & vbCrLf & ex.Message, MsgBoxStyle.Critical, "VBCITY.VBTAPI")<br />
End Try<br />
End Sub<br />
<br />
<br />
<br />
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)<br />
<br />
End Sub<br />
End Class<br />
''-----------------------------SOUND CLASS-------------------------------<br />
Public Class Sound<br />
Declare Auto Function PlaySound Lib "winmm.dll" (ByVal name _<br />
As String, ByVal hmod As Integer, ByVal flags As Integer) As Integer<br />
<br />
<br />
Public Const SND_FILENAME = &H20000 ' name is file name <br />
<br />
Public Shared Sub PlayWaveFile(ByVal fileWaveFullPath As String)<br />
Try<br />
PlaySound(fileWaveFullPath, 0, SND_FILENAME)<br />
Catch<br />
End Try<br />
End Sub<br />
End Class<br />
Class notification<br />
'Implements TAPI3Lib.ITTAPIEventNotification<br />
'Implements TAPI3Lib.ITDigitDetectionEvent<br />
<br />
<br />
<br />
'Delegate Sub listshow(ByVal str As String)<br />
'Publicmsgbox As listshow<br />
<br />
<br />
Public Sub sEvent(ByVal te As TAPI3Lib.TAPI_EVENT, ByVal eobj As Object)<br />
'Implements ITTAPIEventNotification.Event,ITDetectTone<br />
Dim aa As New Byte<br />
Dim val As Integer<br />
<br />
Select Case te<br />
<br />
<br />
Case TAPI3Lib.TAPI_EVENT.TE_CALLNOTIFICATION<br />
MsgBox("call notification event has occured")<br />
<br />
<br />
Case TAPI3Lib.TAPI_EVENT.TE_DIGITEVENT<br />
MsgBox("digit is detected")<br />
Dim dd As TAPI3Lib.ITDigitDetectionEvent = CType(eobj, TAPI3Lib.ITDigitDetectionEvent)<br />
'MsgBox("my digit")<br />
MsgBox(("Dialed digit" + dd.ToString()))<br />
<br />
<br />
<br />
<br />
'aa = dd.Digit()<br />
'val = dd.DigitMode<br />
'MsgBox(val)<br />
'Select Case val<br />
' Case val = 1<br />
' MsgBox("u have enter 1")<br />
'End Select<br />
<br />
''''''''''''<br />
<br />
Case TAPI_EVENT.TE_CALLMEDIA<br />
MsgBox("media is changed")<br />
<br />
<br />
Case TAPI_EVENT.TE_PHONEEVENT<br />
MsgBox("phone event is occured")<br />
Case TAPI_EVENT.TE_TONEEVENT<br />
MsgBox("tone is detected")<br />
Case TAPI3Lib.TAPI_EVENT.TE_GENERATEEVENT<br />
Dim dg As TAPI3Lib.ITDigitGenerationEvent = CType(eobj, TAPI3Lib.ITDigitGenerationEvent)<br />
<br />
<br />
MsgBox("digit dialed!")<br />
MsgBox(("Dialed digit" + dg.ToString()))<br />
Case TAPI3Lib.TAPI_EVENT.TE_PHONEEVENT<br />
MsgBox("A phone event!")<br />
Case TAPI3Lib.TAPI_EVENT.TE_GATHERDIGITS<br />
MsgBox("Gather digit event!")<br />
<br />
Case TAPI3Lib.TAPI_EVENT.TE_CALLSTATE<br />
MsgBox("welcome to call state")<br />
Dim a As TAPI3Lib.ITCallStateEvent = CType(eobj, TAPI3Lib.ITCallStateEvent)<br />
Dim b As TAPI3Lib.ITCallInfo = a.Call<br />
<br />
Select Case b.CallState<br />
Case TAPI3Lib.CALL_STATE.CS_INPROGRESS<br />
MsgBox("dialing")<br />
Case TAPI3Lib.CALL_STATE.CS_CONNECTED<br />
MsgBox("Connected")<br />
<br />
Case TAPI3Lib.CALL_STATE.CS_DISCONNECTED<br />
MsgBox("Disconnected")<br />
Case TAPI3Lib.CALL_STATE.CS_OFFERING<br />
MsgBox("A party wants to communicate with you!")<br />
Case TAPI3Lib.CALL_STATE.CS_IDLE<br />
MsgBox("Call is created!")<br />
Case CALL_STATE.CS_HOLD<br />
MsgBox("hold the call")<br />
End Select<br />
End Select<br />
End Sub 'Event<br />
<br />
<br />
<br />
<br />
<br />
<br />
End Class 'callnotification<br />
<br />
<br />
|
|
|
|
|