|
georgishelpmegodtoo wrote: excel tele it it works(detects when ringing
and it could dial)
Every modem ever made does this, and without using TAPI.
|
|
|
|
|
georgishelpmegodtoo wrote: Forum C#
Subject: Re: help me with tapi 3 call status and tone detection
Sender: georgishelpmegodtoo
Date: 17:17 4 Jun '07
hi
i'm developing a software using c# that detects the dialed digits and the status(sp when connected and desconnected) of a call that is made by a handset attached to the modem.
i have developed some code but it doesn't work.please someone help me it's urgent.
i connected the main line to one of the modems telephone jack and the handset with the other jack and the computer is connected using the serial port and then
here is the code for status of the call
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using TAPI3Lib;
namespace tapi3call_status
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
public TAPIClass tapiobject;
private ITAddress[] ia = new TAPI3Lib.ITAddress[10];
uint lines;
int line;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label3;
public System.Windows.Forms.TextBox textBox2;
public callstatus cs = new callstatus();
private System.Windows.Forms.ListBox listBox1;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public class CLineDevice
{
public string d_Name;
public int d_ID;
public override string ToString()
{
return d_Name;
}
}
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
initializetapi3();
}
//
// TODO: Add any constructor code after InitializeComponent call
//
void initializetapi3()
{
tapiobject = new TAPIClass();
tapiobject.Initialize();
IEnumAddress ea = tapiobject.EnumerateAddresses();
ITAddress ln;
cs = new callstatus();
cs.addtolist = new callstatus.listshow(this.status);
tapiobject.ITTAPIEventNotification_Event_Event += new TAPI3Lib.ITTAPIEventNotification_EventEventHandler(cs.Event);
uint arg3 = 0;
lines = 0;
for (int i = 0; i < 10; i++)
{
ea.Next(1, out ln, ref arg3);
ia[i] = ln;
if (ln != null)
{
comboBox1.Items.Add(ia[i].AddressName);
lines++;
}
else
break;
}
tapiobject.EventFilter = (int)(TAPI_EVENT.TE_CALLSTATE);
}
public void status(string str)
{
listBox1.Items.Add(str);
}
///
/// Clean up any resources being used.
///
protected override void Dispose(bool disposing)
{
tapiobject.Shutdown();
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.listBox1 = new System.Windows.Forms.ListBox();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(32, 80);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(88, 16);
this.label1.TabIndex = 0;
this.label1.Text = "Call Status";
//
// button1
//
this.button1.Location = new System.Drawing.Point(184, 136);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(80, 24);
this.button1.TabIndex = 2;
this.button1.Text = "clear status";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label2
//
this.label2.Location = new System.Drawing.Point(32, 24);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(64, 24);
this.label2.TabIndex = 3;
this.label2.Text = "line devices";
//
// comboBox1
//
this.comboBox1.Location = new System.Drawing.Point(120, 16);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(224, 21);
this.comboBox1.TabIndex = 4;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// label3
//
this.label3.Location = new System.Drawing.Point(40, 208);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(80, 24);
this.label3.TabIndex = 5;
this.label3.Text = "Call Duration";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(120, 208);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(88, 20);
this.textBox2.TabIndex = 6;
this.textBox2.Text = "0.0";
this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
//
// listBox1
//
this.listBox1.Location = new System.Drawing.Point(120, 72);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(192, 56);
this.listBox1.TabIndex = 7;
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(360, 254);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.label3);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.label2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void Form1_Load(object sender, System.EventArgs e)
{
}
private void button1_Click(object sender, System.EventArgs e)
{
listBox1.Items.Clear();
}
private void textBox1_TextChanged(object sender, System.EventArgs e)
{
}
private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
line = comboBox1.SelectedIndex;
}
}
public class callstatus : TAPI3Lib.ITTAPIEventNotification
{
public StopWatch sw = new StopWatch();
public delegate void listshow(string str);
public listshow addtolist;
public void Event(TAPI3Lib.TAPI_EVENT te, object eobj)
{
Form1 fm = new Form1();
if (te == TAPI3Lib.TAPI_EVENT.TE_CALLSTATE)
{
TAPI3Lib.ITCallStateEvent a = (TAPI3Lib.ITCallStateEvent)eobj;
TAPI3Lib.ITCallInfo b = a.Call;
switch (b.CallState)
{
case TAPI3Lib.CALL_STATE.CS_INPROGRESS:
addtolist("dialing");
break;
case TAPI3Lib.CALL_STATE.CS_CONNECTED:
addtolist("Connected");
sw.Start();
fm.textBox2.Text = "0";
break;
case TAPI3Lib.CALL_STATE.CS_DISCONNECTED:
addtolist("Disconnected");
sw.Stop();
fm.textBox2.Text = sw.GetElapsedTimeMinutes().ToString();
break;
case TAPI3Lib.CALL_STATE.CS_OFFERING:
addtolist("A party wants to communicate with you!");
break;
case TAPI3Lib.CALL_STATE.CS_IDLE:
addtolist("Call is created!");
break;
}
}
}
public class StopWatch
{
private DateTime startTime;
private DateTime stopTime;
private bool running = false;
public void Start()
{
this.startTime = DateTime.Now;
this.running = true;
}
public void Stop()
{
this.stopTime = DateTime.Now;
this.running = false;
}
// elaspsed time in minutes
public double GetElapsedTimeMinutes()
{
TimeSpan interval;
if (running)
interval = DateTime.Now - startTime;
else
interval = stopTime - startTime;
return interval.TotalMinutes;
}
// elaspsed time in seconds
public double GetElapsedTimeSecs()
{
TimeSpan interval;
if (running)
interval = DateTime.Now - startTime;
else
interval = stopTime - startTime;
return interval.TotalSeconds;
}
}
}
}
and the code for detecting the dialed number
#define Win32
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using TAPI3Lib;
//using TERMMGRLib;
using System.Runtime.InteropServices;
//
using System.Threading;
using System.Data;
namespace tonedetection
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private System.Windows.Forms.TextBox dtmf;
public digitdetect dd = new digitdetect();
//public AxTAPIEXLib.AxTAPIExCtl tapi;
public TAPI3Lib.TAPIClass tapi;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
#region Windows Form Designer generated code
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
Initializetonemonit();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
public void Initializetonemonit()
{
try
{
tapi = new TAPIClass();
tapi.Initialize();
dd = new digitdetect();
dd.tapi_tonemonit();
tapi.ITTAPIEventNotification_Event_Event+= new TAPI3Lib.ITTAPIEventNotification_EventEventHandler(dd.tapi_event);
//tapi.EventFilter=(int)(TAPI_EVENT.TE_TONEEVENT);
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.dtmf = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// dtmf
//
this.dtmf.BackColor = System.Drawing.SystemColors.HighlightText;
this.dtmf.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dtmf.Location = new System.Drawing.Point(40, 104);
this.dtmf.Name = "dtmf";
this.dtmf.ReadOnly = true;
this.dtmf.Size = new System.Drawing.Size(216, 26);
this.dtmf.TabIndex = 1;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(392, 198);
this.Controls.Add(this.dtmf);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private void Form1_Load(object sender, EventArgs e)
{
}
/*
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
*/
///
/// The main entry point for the application.
///
}
}
public class digitdetect
{
//MonitorTones_Add 1, 80, 697, 1209, 0 ' "1"
//.MonitorTones_Add 2, 80, 697, 1336, 0 ' "2"
//.MonitorTones_Add 3, 80, 697, 1477, 0 ' "3"
//.MonitorTones_Add 4, 80, 770, 1209, 0 ' "4"
//.MonitorTones_Add 5, 80, 770, 1336, 0 ' "5"
//.MonitorTones_Add 6, 80, 770, 1477, 0 ' "6"
//.MonitorTones_Add 7, 80, 852, 1209, 0 ' "7"
//.MonitorTones_Add 8, 80, 852, 1336, 0 ' "8"
//.MonitorTones_Add 9, 80, 852, 1477, 0 ' "9"
//.MonitorTones_Add 10, 80, 941, 1209, 0 ' "*"
//.MonitorTones_Add 0, 80, 941, 1336, 0 ' "0"
//.MonitorTones_Add 12, 80, 941, 1477, 0 ' "#"
//************
//currCall.MonitorTones_Add(BUSY_ID, BusyTone.Duration, BusyTone.FirstFreq, BusyTone.SecondFreq, 0);
//*********
//Function MonitorTones_Add(
//AppSpecific As Long,
//Duration As Long,
//Frequency1 As Long, Frequency2 As Long, Frequency3 As Long ) As Boolean
//*************************
TAPI3Lib.TAPI_DETECTTONE currentcal_0;
TAPI3Lib.TAPI_DETECTTONE currentcal_1;
TAPI3Lib.TAPI_DETECTTONE currentcal_2;
TAPI3Lib.TAPI_DETECTTONE currentcal_3;
TAPI3Lib.TAPI_DETECTTONE currentcal_4;
TAPI3Lib.TAPI_DETECTTONE currentcal_5;
TAPI3Lib.TAPI_DETECTTONE currentcal_6;
TAPI3Lib.TAPI_DETECTTONE currentcal_7;
TAPI3Lib.TAPI_DETECTTONE currentcal_8;
TAPI3Lib.TAPI_DETECTTONE currentcal_9;
TAPI3Lib.TAPI_DETECTTONE currentcal_10;
TAPI3Lib.TAPI_DETECTTONE currentcal_11;
//public TAPIEXLib.ITAPICall currentcall;
public void tapi_tonemonit()
{
currentcal_0.dwAppSpecific=1;
currentcal_0.dwDuration=80;
currentcal_0.dwFrequency1=941;
currentcal_0.dwFrequency2=1336;
currentcal_0.dwFrequency3=0;
currentcal_1.dwAppSpecific=1;
currentcal_1.dwDuration=80;
currentcal_1.dwFrequency1=697;
currentcal_1.dwFrequency2=1209;
currentcal_1.dwFrequency3=0;
currentcal_2.dwAppSpecific=1;
currentcal_2.dwDuration=80;
currentcal_2.dwFrequency1=697;
currentcal_2.dwFrequency2=1336;
currentcal_2.dwFrequency3=0;
currentcal_3.dwAppSpecific=1;
currentcal_3.dwDuration=80;
currentcal_3.dwFrequency1=697;
currentcal_3.dwFrequency2=1447;
currentcal_3.dwFrequency3=0;
currentcal_4.dwAppSpecific=1;
currentcal_4.dwDuration=80;
currentcal_4.dwFrequency1=770;
currentcal_4.dwFrequency2=1209;
currentcal_4.dwFrequency3=0;
currentcal_5.dwAppSpecific=1;
currentcal_5.dwDuration=80;
currentcal_5.dwFrequency1=770;
currentcal_5.dwFrequency2=1336;
currentcal_5.dwFrequency3=0;
currentcal_6.dwAppSpecific=1;
currentcal_6.dwDuration=80;
currentcal_6.dwFrequency1=770;
currentcal_6.dwFrequency2=1447;
currentcal_6.dwFrequency3=0;
currentcal_7.dwAppSpecific=1;
currentcal_7.dwDuration=80;
currentcal_7.dwFrequency1=852;
currentcal_7.dwFrequency2=1209;
currentcal_7.dwFrequency3=0;
currentcal_8.dwAppSpecific=1;
currentcal_8.dwDuration=80;
currentcal_8.dwFrequency1=852;
currentcal_8.dwFrequency2=1336;
currentcal_8.dwFrequency3=0;
currentcal_9.dwAppSpecific=1;
currentcal_9.dwDuration=80;
currentcal_9.dwFrequency1=852;
currentcal_9.dwFrequency2=1447;
currentcal_9.dwFrequency3=0;
//*
currentcal_10.dwAppSpecific=1;
currentcal_10.dwDuration=80;
currentcal_10.dwFrequency1=941;
currentcal_10.dwFrequency2=1209;
currentcal_10.dwFrequency3=0;
//#
currentcal_11.dwAppSpecific=1;
currentcal_11.dwDuration=80;
currentcal_11.dwFrequency1=941;
currentcal_11.dwFrequency2=1447;
currentcal_11.dwFrequency3=0;
// currentcall.MonitorTones_Add(1,80,697,1209,0);
// currentcall.MonitorTones_Add(2,80,697,1336,0);
// currentcall.MonitorTones_Add(3,80,697,1477,0);
// currentcall.MonitorTones_Add(4,80,770,1209,0);
// currentcall.MonitorTones_Add(5,80,770,1336,0);
// currentcall.MonitorTones_Add(6,80,770,1209,0);
// currentcall.MonitorTones_Add(7,80,852,1209,0);
// currentcall.MonitorTones_Add(8,80,852,1336,0);
// currentcall.MonitorTones_Add(9,80,852,1477,0);
/// currentcall.MonitorTones_Add(10,80,941,1209,0); //*
// currentcall.MonitorTones_Add(0,80,941,1336,0);
// currentcall.MonitorTones_Add(11,80,941,1477,0); //#
}
public void Addtext(ref string msg)
{
//fm = new Form1();
TextBox dtmf = new TextBox();
dtmf.Text=msg;
}
private void Form1_Load(object sender, System.EventArgs e)
{
// tapi = new AxTAPIEXLib.AxTAPIExCtl();
//tapi.initialize();
}
public void tapi_event(TAPI3Lib.TAPI_EVENT te,object eobj)//TAPI3Lib.ITToneDetectionEvent e,Object eventSender )
{
if(te==TAPI3Lib.TAPI_EVENT.TE_TONEEVENT)
{
TAPI3Lib.ITToneDetectionEvent e=(TAPI3Lib.ITToneDetectionEvent)eobj;
switch ( e.AppSpecific)
{
case 0:
string temp_string0 = "0";
Addtext( ref temp_string0);
break;
case 1:
string temp_string = "1";
Addtext(ref temp_string);
break;
case 2:
string temp_string2 = "2";
Addtext(ref temp_string2);
break;
case 3:
string temp_string3 = "3";
Addtext(ref temp_string3);
break;
case 4:
string temp_string4 = "4";
Addtext(ref temp_string4);
break;
case 5:
string temp_string5 = "5";
Addtext(ref temp_string5);
break;
case 6:
string temp_string6 = "6";
Addtext(ref temp_string6);
break;
case 7:
string temp_string7 = "7";
Addtext(ref temp_string7);
break;
case 8:
string temp_string8 = "8";
Addtext(ref temp_string8);
break;
case 9:
string temp_string9 = "9";
Addtext(ref temp_string9);
break;
}
}
else
{
string msg2="no tone";
Addtext(ref msg2);
}
}
}
georgishelpmegodtoo wrote: thanks
Are you serious .. I think you're missing the joke icon!
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
As tapi3 is com based so u have to initiate it properly
then get all the devices
open the devices
and then listen for events
one important thing as someone else mentioned it it's very important that u should know that your modem supports the functionality that it will raise a event on DTMF.
|
|
|
|
|
hi
thanks
i have checked the modem with some dialing
sofware called excel tele it it works(detects when ringing
and it could dial) and i think my problem is that i donn't
understand how to open the line device and phone device
and how i connect the modem with the handset and the computer
could u help me with this
thank you for your help
thanks
|
|
|
|
|
There's a software with the name of "Tapi Browser" use that software it will help u out
first u should know about all the tapi.dll functions that are defined in it and
and the sequence in which u have to use them
|
|
|
|
|
Hello, I am searching for a soulution to copy highlighted text from any Window to my application. I will highlight some text, for example in MS Word od in Adobe Acrobat and then when i press a special key (example: mouse right key down and ALT-Key down) the selected text should be copied to my application. I hope you understand what i am looking for. How can i do that in C# any idea?
thanks alot
|
|
|
|
|
Has nobody an idea?
I cannot find any soulution.
|
|
|
|
|
|
Create your own CheckBox by inheriting from the CheckBox class and overriding the OnClick method. Just don't call the base classes OnClick method and you'll get the effect you want.
public class ReadOnlyCheckBox : CheckBox
{
protected override void OnClick(System.EventArgs e)
{
}
}
Put this in its own file in your project and compile it. When you do, you'll get a new ReadOnlyCheckBox in the Toolbox. Drag and drop to your form. Other than clicking, it'll work exactly like the normal CheckBox.
|
|
|
|
|
It's a little more complicated than that, if you're going for what I suspect. I ran into this same problem a little while ago, and here's my solution.
|
|
|
|
|
|
Try it again... I was a bit out of it, and it took a few tries to get the link right... Heh
|
|
|
|
|
I checked out that link. If I understand what you're getting at, you're capturing the window message for button down and stuff, essentially just intercepting the messages and stopping them from being dispatched.
We've both done the same thing but from different ends. Both methods havae their pros and cons.
First, in my method, I'm not stopping the mouse message, just stopping the event from firing once the message is dispatched. The upside is it's very little code, being done in about a minute. The down side is that if you have multiple controls, you'd have to do this for each control. But, again on the upside, this makes the controls reusable in other applications without any kind of outside support, like another panel.
In your method, you can use any controls you want, making the method quite flexible without having to modify any controls, save the panel control! The downside is that it's an all-or-nothing solution. You cannot turn off the click, or other events, for just some of the controls and leave it up for the rest. This could cause a problem if different control types have varying requirements for use of the mouse, or other events.
The other downside to this method is embedding a child modifiedpanel into a larger modifiedpanel. If the larger container panel is "ReadOnly", the mous messages won't get down to the child modifiedpanel that you might want to NOT be "ReadOnly". The opposite situation does work though. The parent panel can be Read/Write while the child panel can be ReadOnly.
|
|
|
|
|
That's basically correct, with one correction.
In order to avoid that last problem you mentioned, I run an entire form or parent container through an algorithm that specifies certain exceptions (Lock all controls except A, B, and C). The algorithm takes the entire tree or subtree of controls, and inserts those locked panels wherever needed such that they cover all controls except the ones listed as exceptions.
So if control X has children A, B, and C, and we don't want to lock up B, it would leave X alone and lock up A and C separately. This of course assumes that container controls don't themselves need to be locked, so it's not quite foolproof.
|
|
|
|
|
Hello,
Do you know how can I check the size of free space on remote disk using FTP client written in C#?
Thanks for Help
Wojtek
|
|
|
|
|
Unless the FTP Server supports some command to do so, there's no way to check for free space. Returning free space information is not part of the FTP specification, so it's very unlikely that a server will support doing so.
|
|
|
|
|
hi
i want to change the shape of button from rectangle to circle.
how i can do it?
thanks
|
|
|
|
|
|
thanks for your help
|
|
|
|
|
Something's confusing me about identifying a library whose methods I want to access. In one case I got it to work but it seems oddly difficult to find the name I need to use for that library. In another case it hasn't worked yet.
So, somebody sells a .dll whose functionality I want, and I add this .dll as a reference in the Solution Explorer window. For example, the IMSL Library (as it's called on the CD it ships on), or ImslCS.dll (as the file's named), or ImslCS (as it appears in the Solution Explorer window). And I use its Math.Erf() function by writing Imsl.Math.Erf(). Why in my code does it look like "Imsl" and not "IMSL" or "ImslCS"? It seems to have several names, and this isn't even one of them. I did find it this way in an example, and this is the only way I've tried that does work. But how are you supposed to know the name to use, and can you find the right name from within VisualStudio?
Or in my other example, the SPCIO library, which is for manipulating .spc spectral data files from laboratory instruments. This seems to go by at least a dozen different names. All the names include the phrase "spcio" in various uppercase/lowercase combinations. Some are prefixed by "G" or "g". Some are postfixed by "LIB" or "lib" or "Lib". The documentation uses various versions of this name throughout the discussion and examples, including when explaining methods, and does not even include the name when explaining properties. After some fooling around I found that using "GSpcIOLib" gives me an error message "The type or namespace 'OpenFile' does not exist in the namespace 'GSpcIOLib' (are you missing an assembly reference?)", which looks like it is at least finding a GSpcIOLib namespace. All the other versions I tried just gave me "The name 'whatever' does not exist in the current context" which doesn't sound like it's finding anything. In Solution Explorer its name is "Interop.GSpcIOLib" (which does not work).
So, how is this supposed to work? Is there one real name, and how are you supposed to find it?
My code example follows:
using System;
using System.Collections.Generic;
using System.Text;
namespace Testing
{
class Program
{
static void Main(string[] args)
{
GSpcIOLib.OpenFile(@"C:\a\spectrum_fitting\samples\09151024.spc");
double x = Imsl.Math.Sfun.Erf(2.2);
Console.WriteLine("Text Example, {0}", x);
Console.ReadLine();
}
}
}
Thanks!
|
|
|
|
|
Just try creating a class library in C# and play around with the namespace name and the class names. This will make you understand better rather than someone put it in words.
SG
|
|
|
|
|
hi,
when I click with the right button of the mouse in the datagridview,
the full row is selected, but the "pointer" (column header) of the datagridview does'nt, then, the value of the current row is passed wrong.
how I can fix it?
thank u a lot
|
|
|
|
|
Can eny one help me to make an Email Merg like that in the word using visualstodio.net
I want to drag a control
or text in atext box.
merwa
|
|
|
|
|
merwa wrote: Can eny one help me to make an Email Merg like that in the word using visualstodio.net
Sounds pretty Egyptian;P
Unfortunatly, this's C#, not MS Word..
merwa wrote: I want to drag a control
or text in atext box.
listBox1.AllowDrop = true;
private void listBox1_DragOver(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.Move;
}
private void listBox1_DragDrop(object sender, DragEventArgs e)
{
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
foreach (string file in files)
{
if (!listBox1.Items.Contains(file))
listBox1.Items.Add(file);
listBox1.SelectedIndex = listBox1.Items.Count - 1;
}
}
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi all
Where would i look to get the session ID of the program I made
I can find the session ID or other process's and i want to compare them to the session ID of my program to make sure its okay to kill them and not accidentally kill a process on another session.
|
|
|
|
|