|
Yes Friend.
Fortunately you can do that by interlopping Tapi.Dll in your system32 . it is A com file . You can search msdn for its global classes and enumerations and then drag it into your solution.You can listening on incoming calls and answer them and also you can make calls but to have the number of the caller , It is also supported but you have to have this service from your PSTN service provider To give you the ability to show the caller ID phone number.
If you have that service you can show the number of the caller so easily.
Human knowledge belongs to the world.
|
|
|
|
|
We are a group of spanish students who want to make a system to detect an
excess of decibel level in a medical center. We have been searching for a long long time with no luck. The system is for a college proyect, and we have not found any useful
code or hint to get the incoming audio level from a microphone. We are using .NET and have tried Directsound, MCI etc.. with no luck. We need to have the system finished in a week, so if someone could help us..
Thank you and excuse me for my poor English.
|
|
|
|
|
Nothing exists to do so? We´re still searching
|
|
|
|
|
Hi!
So you're recording PCM sound samples and you want to find out the volume? I assume you're using 16bit samples, then the volume is the amplitude of the signal.
The 16bit samples you get usually are signed 16bits, i.e. a value of '0' is silence and a value of -32767/32768 is the maximum volume...
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Hi
Im trying to develop a C# application which interacts with a Fingerprint scanner.
The appliaction is going to run in the background (and as trayicon).
When my applicatons catches an event from the finger scanner i want to paste a text into "what ever active textbox control is focused" and the execute a "press enter command". Eg. a focused textbox control in Internet Explorer.
1. Is this possible in pure managed C#? (If so what direction?)
2. If not. Can I do it unmanged through interop? (If so what direction?)
I really look forward to hear from you
Thanks in regards
Anders Jacobsen
|
|
|
|
|
I have code Authenticated user by LDAP
i have GetGroups() method but it has _filterAttribute but i dont know it "_filterAttribute"
Some body help me !!
private String _path;
private String _filterAttribute;
public Form1(String path)
{
_path = "LDAP://cctvs1/CN=Users,DC=TESTLDAP,DC=com";
}
public bool IsAuthenticated(String domain, String username, String pwd)
{
String domainAndUsername = domain + @"\" + username;
DirectoryEntry entry = new DirectoryEntry("LDAP://cctvs1/CN=Users,DC=TESTLDAP,DC=com", domainAndUsername, pwd);
try
{ //Bind to the native AdsObject to force authentication.
Object obj = entry.NativeObject;
DirectorySearcher search = new DirectorySearcher(entry);
search.Filter = "(SAMAccountName=" + username + ")";
search.PropertiesToLoad.Add("cn");
SearchResult result = search.FindOne();
if(null == result)
{
return false;
}
//Update the new path to the user in the directory.
_path = result.Path;
_filterAttribute = (String)result.Properties["cn"][0];
}
catch (Exception ex)
{
throw new Exception("Error authenticating user. " + ex.Message);
}
return true;
}
public String GetGroups()
{
DirectorySearcher search = new DirectorySearcher("LDAP://cctvs1/CN=Users,DC=TESTLDAP,DC=com");
search.Filter = "(cn=" + _filterAttribute + ")";
search.PropertiesToLoad.Add("memberOf");
StringBuilder groupNames = new StringBuilder();
try
{
SearchResult result = search.FindOne();
int propertyCount = result.Properties["memberOf"].Count;
String dn;
int equalsIndex, commaIndex;
for(int propertyCounter = 0; propertyCounter < propertyCount; propertyCounter++)
{
dn = (String)result.Properties["memberOf"][propertyCounter];
equalsIndex = dn.IndexOf("=", 1);
commaIndex = dn.IndexOf(",", 1);
if(-1 == equalsIndex)
{
return null;
}
groupNames.Append(dn.Substring((equalsIndex + 1), (commaIndex - equalsIndex) - 1));
groupNames.Append("|");
}
}
catch(Exception ex)
{
throw new Exception("Error obtaining group names. " + ex.Message);
}
return groupNames.ToString();
}
}
|
|
|
|
|
hi have one siple problem if you have time pleas tell me how to solve it
so i have printer name in one dropdownlist
and printer models in other so i whant when change printer name
the printer models ddl to show me only this models which are for this printer i done sql function i link it ddl but problem is becaus when i change ddl i doing some delay for example if i choose hp and then cannon i see printers of ph when i choose canno where to put my code to be done exacly in time of post back ???
best regards
thank's lot
|
|
|
|
|
First check that you have written the code to populate the printer name ddl inside
if (!Page.IsPostBack)
{
}
block
Secondly you have to put the code to populate the printer model ddl in the SelectedIndexChanged method
-
बुरा जो देखण मै चला, बुरा न िमलया कोय,
जो मन खोजा आपणा तो मुझसे बुरा न कोय।
Translation
|
|
|
|
|
ok but i have it delay with one turn.When is insert one bottom all is ok
but u shout choose ddl mark and than click the bottom.Or if you have not button you when you chouse canon and than hp u se models for canon???
How to solve it???
|
|
|
|
|
|
Hi,
I would like to add a record in the last row of a database from a c# program. I have a database with the first column called ID which is unique. I tried doing this by finding the maximum number in that column and then adding 1 to it but it doesn' work.
Thanks
|
|
|
|
|
Standard questions
1) What database?
2) "doesnt work" - what doesnt work and what error if any
3) show your code.
|
|
|
|
|
I have a database with some questions and each question has a unique ID.
In my c# program I have a form with a datagrid showing all these questions and 2 textboxes, 1 showing the id of the question (txtQstID) and the other showing the question (txtQst).
Then I have a button (btnAdd) that when I clicks it a new question is added in the datagrid. The new question is entered by the user in the txtQst textbox. But the ID of the question textbox is readonly so the user cannot enter anything in it.
So I did the following in the add button: -
//getting the maximum ID from the Qst_ID column
System.Data.OleDb.OleDbCommand oCommandMax = new System.Data.OleDb.OleDbCommand("SELECT MAX(Qst_ID) FROM Questions", conn);
object objMax = oCommandMax.ExecuteScalar();
string maxValue = objMax.ToString();
//parsing the maxValue to integer
int newRecord = (int.Parse(maxValue));
//adding 1 to the maximum number
newRecord++;
//displaying the new ID in the txtQstID textbox
this.txtQstID.Text = (newRecord.ToString());
//CreateNewQuestion is a method found in Class 1
Class1.CreateNewQuestion(txtQstID.Text, txtQst.Text);
//The following is the code found in Class1: -
public static void CreateNewQuestion(string ID, string Question)
{
DataRow drNew = DS.Tables["Questions"].NewRow();
drNew["Question_ID"] = ID;
drNew["Question"] = Question;
DS.Tables["Questions"].Rows.Add(drNew);
}
|
|
|
|
|
See Guffa's response below...the key in the database should generate itself - generating that key by adding 1 to the highest number will be errorprone.
-- modified at 4:37 Thursday 13th April, 2006
|
|
|
|
|
.
.
.
System.Data.OleDb.OleDbCommand oCommandMax = new System.Data.OleDb.OleDbCommand("SELECT top1 * FROM Questions order by Question_ID desc", conn);
.
.
.
//insetead newRecord++; increase by one
int newRecord = (int.Parse(maxValue)+1);
|
|
|
|
|
And then what happens when 2 users execute this code simultaneously?
|
|
|
|
|
One of them will get an error message because they try to create a record with the same key.
---
b { font-weight: normal; }
|
|
|
|
|
Correct, next question for 10 points
|
|
|
|
|
Set the id field to be a counter/identifier/auto_increment (depending on the flavour of database you are using). Then you just add a record without specifying the id at all, and it automatically gets a new unique id, without any risks of conflicts.
---
b { font-weight: normal; }
|
|
|
|
|
Please help my coding
How can I modify my loop to get a random number in the ArrayList which has values from 1 to 1000?
I use 5 threads running concurrently to get 2 random nuumbers from ArrayList, remove those 2 numbers, add together, and put the result back to ArrayList.
Thanks so much everyone.
using System;<br />
using System.Collections;<br />
using System.Text;<br />
using System.Threading;<br />
<br />
namespace A1_SS<br />
{<br />
class Program<br />
{<br />
static object lockObject;<br />
static ArrayList space;<br />
<br />
static void Main()<br />
{<br />
<br />
space = new ArrayList();<br />
<br />
for (int i = 1; i <= 10; i++)<br />
{<br />
space.Add(i);<br />
<br />
}<br />
<br />
lockObject = new object();<br />
<br />
<br />
Thread t1 = new Thread(new ParameterizedThreadStart(Program.AccessData));<br />
t1.Start(space);<br />
<br />
Thread t2 = new Thread(new ParameterizedThreadStart(Program.AccessData));<br />
t2.Start(space);<br />
<br />
Thread t3 = new Thread(new ParameterizedThreadStart(Program.AccessData));<br />
t3.Start(space);<br />
<br />
Thread t4 = new Thread(new ParameterizedThreadStart(Program.AccessData));<br />
t4.Start(space);<br />
<br />
Thread t5 = new Thread(new ParameterizedThreadStart(Program.AccessData));<br />
t5.Start(space);<br />
<br />
<br />
Thread.Sleep(20 * 1000);<br />
}<br />
<br />
<br />
<br />
public static void AccessData(object param)<br />
{<br />
<br />
ArrayList list = (ArrayList)param;<br />
<br />
lock (list)<br />
{<br />
<br />
Random rand = new Random();<br />
<br />
for (int i = 0; i <= list.Count; i++)<br />
{<br />
<br />
int x = rand.Next(list[i], list[list.]);<br />
list.Remove(x);<br />
Console.WriteLine("x = " + x);<br />
<br />
int y = rand.Next(1, list.Count);<br />
list.Remove(y);<br />
Console.WriteLine("y = " + y);<br />
<br />
int newNumber = x + y;<br />
Console.WriteLine("newNumber = " + newNumber);<br />
<br />
list.Add(newNumber);<br />
<br />
}<br />
<br />
foreach (object obj in list)<br />
Console.WriteLine(obj);<br />
<br />
<br />
}<br />
<br />
<br />
<br />
}<br />
}<br />
}
Eric
|
|
|
|
|
Please dont post the same question 2 hours later.
|
|
|
|
|
Sorry. I won't
I really need help
Thanks
eric
|
|
|
|
|
Please help me how to create a random number in the ArrayList which has values from 1 to 1000.
Thanks
eric
|
|
|
|
|
There is a Random class Random[^]
hope this helps...
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
How do you determine if a value of a comboxbox was changed by being clicked on? I have set databinding on the combobox and the values in it change when i scroll a datagrid.
Please help
|
|
|
|