|
I didn't post a link to anything related to Windows CE. waveOutSetVolume works on Windows 95 through Windows 2003.
When did you mention anything about a modem? Where did this come from? You're not making any sense what-so-ever.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 21:23 Sunday 11th December, 2005
|
|
|
|
|
Hi Dave,
When I saw this waveOutSetVolume method is same method of coredll.dll for Windows CE in one link I saw, So I ask if it is applicable to XP. The modem is connected to the USB I mentioned earlier. I have some project as audio volume task as connecting remote server (VPN) using RAS. That is when I mentioned the modem. Pardon for any misunderstanding in your part.
denpsia
|
|
|
|
|
I still don't have a single clue what you're trying to do. What on earth does audio volume have to do with VPN and a modem on a USB port?
If you have a modem connected to a USB port, you'll communicate with the modem as if it was attached to a COM port, COM1, COM2, whatever. There's nothing "USB special" you have to do.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Currently I am writing a server program, basiclly in a Form when I click a button it starts the server in another thread.
the other thread will recieve message thru the network, and prints the recieved data onto the form. I run this code and I get an exception saying that the listbox is in another thread and cannot be accessed.
I am new to c# threads, I hope some expert can help me
heres how i did it:
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
lstStatus.Items.Clear();<br />
Thread serverthread = new Thread(new ThreadStart(serverThreadStart));<br />
serverthread.Start();<br />
}<br />
<br />
private void serverThreadStart()<br />
{<br />
myServer = new XYNetServer("", Convert.ToInt32(txtPort.Text), Convert.ToInt32(txtminthread.Text), Convert.ToInt32(txtmaxthread.Text));<br />
myServer.SetConnectionFilter(new ConnectionFilterDelegate(ConnectionFilter));<br />
myServer.SetExceptionHandler(new ExceptionHandlerDelegate(ExceptionHandler));<br />
myServer.SetBinaryInputHandler(new BinaryInputHandlerDelegate(BinaryInputHandler));<br />
myServer.SetStringInputHandler(new StringInputHandlerDelegate(StringInputHandler));<br />
if (myServer.StartServer() == false) throw myServer.GetLastException();<br />
Thread.Sleep(6000);<br />
lstStatus.Items.Add("Thread count: " + myServer.GetThreadCount().ToString());<br />
lstStatus.Items.Add("Client count: " + myServer.GetClientCount().ToString());<br />
myServer.StopServer();<br />
lstStatus.Items.Add("Done!");<br />
}<br />
|
|
|
|
|
Usually it is a bad practice to allow the worker thread to access and actually process data on the main thread. Usually what you do is you create a separate class that will contain the thread method along with some data and create an event that the worker thread may trigger when it needs to notify the main thread that it has updated some data. Then the main thread, having subscribed to the event, will learn about the changes and take a look at the data members of the other thread's class and then act on them.
Be carefull though that when two threads access the same data there is a good chance for race conditions to happen. Google for an introductory article on C# Multithreading and do some reading on locks, mutexes.. race conditions and dead locks before you start wrting multithreading code.
|
|
|
|
|
The GUI is not threadsafe therefore ALL GUI operations must be done on the GUI thread.
See Control.InvokeRequired & Control.Invoke
Typically you would want to raise an event on the form and have a thread safe
handler something like:
private void OnXXX(object source,EventArgs args)
{
if( InvokeRequired )
Invoke( new EventHandler(OnXXX), new object[] {source,args});
else
{
}
}
|
|
|
|
|
Hi Goodmorning to all,
i downloaded Nant 0.85-rc3 but NAntrunner was not dowmloaded in my system why?in my System VS-2005 beta 2 version at that time one warning is came about NAntRunner only you can dowlnload 1.1.4322 version but in my system beta 2 version is there how is it possible..
how to run NAnt build tool?,
I want to small example using Nant build tool
Thanks & Regards
Sridevi
|
|
|
|
|
Can Anybody help me in solving this COM problem
I have Created a .Net Windows application in C#.
This application has only a WebBrowser Control. On the Form load event I have navigated to a particular site. (Say www.google.com).
Now I have an Another application that is intended to send keys to this Application.
I’m Using SendKeys.Send () fn. for this.
To my Surprise the webBrowser control is not receiving any of the keystrokes, however the TAB key is working in it.
Then I Opened a normal InternetExplorer page and tried the same. Then that application is receiving keystrokes. I want to know why the webBrowser control (C# application) is not receiving keystrokes.
I will be very grateful to you if u help me in this problem.
THANK YOU
Arun Appukuttan
|
|
|
|
|
Dear all,
Newbie here.;P
I'm trying to formatting the data using BoundItem.
But as the data is retrieve from Database.
eg:
1)
02052006 (the retrieved date)
02/05/2006 (wat I need to show at column)
2)
452300 (the retrieved date)
$4523.00(wat I need to show at column)
I dun sure if I should add some code to do tht....
Can somebody helps??
Thx a lot
Winds^_^
-- modified at 2:54 Tuesday 13th December, 2005
|
|
|
|
|
Hello frends!
Im doing a web form which has a print function. I was wondering if some of you know how to use the PrintDocumentDefaultPageSettings.Landscape method. I've tried a couple of way but failed. I've tried putting it inside page load and my print button though im still clueless how it works . I hope some of you can help me coz im really in the dark here.
Thanx so much for all your help!
Aim small, miss small...
|
|
|
|
|
How are you doing the printing? The server can't set any page options for the client, so you'll have to be setting things up in client-side JavaScript. This is an environment that the .NET Framework classes won't help you with.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
yeah i figured im posting in the wrong thread but im quite desperate. i've the print function in html
<script language="javascript>
function fPrint(){
window.print();
}
</script>
though im fairly a newbie at asp.net (or programming for that matter) and since im doing this form in c# i thought about posting it here. im sori for the trouble but how do i go about this?
Thanx!
Aim small, miss small...
-- modified at 22:12 Thursday 8th December, 2005
|
|
|
|
|
Don't know. I haven't touched JavaScript in so long...
You might want to try in the Web Development forum, or Sun's site for the JavaScript documention.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
I want to make datagrid in winform like web form. Ex: edit,delete,update. How can I do that? Please help me.
Thanks.
|
|
|
|
|
|
Hi.... I'm currently doing a program using C# web application. I have some problem going on. I design a login web page, if i now need to capture the time and the date of the user once they login, how the code should be written??Below is my code:
SqlConnection conn=new SqlConnection("my connection string");
string strSql="select count(*) from Particulars where UserName=@UserName and Password=@Password";
conn.Open();
SqlCommand command=new SqlCommand(strSql,conn);
command.Parameters.Add("@UserName", SqlDbType.NVarChar,50);
command.Parameters["@UserName"].Value=TBUserName.Text;
command.Parameters.Add("@PassWord", SqlDbType.NVarChar,50);
command.Parameters["@Password"].Value=TBPassword.Text;
if(int.Parse(command.ExecuteScalar().ToString())>=1)
{
Response.Redirect("menu.aspx");
//exist,successful;
}
else
{
Response.Redirect("login.aspx");
//not exist,failed!
}
conn.Close();
Anyone can help me take a look and tell me how should i write the code to capture the user login time and date. Thanks for your help!
Cheers!
|
|
|
|
|
Surely you should be able to use DateTime.Now to capture the current date and time? Once you get this object, you can use its ToString() methods to extract the date and time in any format you want. HTH.
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
Hi..Thanks for your reply.. How should i actually write it??
Cheers!
|
|
|
|
|
A simple lookup on MSDN will help you. I suggest you do that in future before asking because
* you learn better that way
* somebody is not always going to be around to help you
Please don't think I'm being harsh or condescending.
This is what you're supposed to do, if you want the date as a string in the DD/MM/YYYY format:
DateTime dt = DateTime.Now;
string todaysDate = dt.ToString("dd/MM/yyyy");
Now you can do whatever you want with this string. Retrieving the time is very similar, just change the format string in the call to ToString() .
HTH.
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
I want produce a report that the detail will left to right and if it is more than line it will comtinue to second line
example if have 6 detail it have to show
Detail1 Detail2 Detail3 Detail4 Detail5 Detail6 - End of A4 Paper
example if have 15 detail it have to show
Detail1 Detail2 Detail3 Detail4 Detail5 Detail6 - End of A4 Paper
Detail7 Detail8 Detail9 Detail10 Detail11 Detail12 - End of A4 Paper
Detail13 - End of A4 Paper
normallly the detail will print like this right
Detail1
Detail2
Detail3
Detail4
Detail5 and so on how to get the deatail printid in the way in the top..
i know i can be done i have seen some app that is done in crystal report can do this.
any sugesstion or any side that i get more info on crystal report
thanks..
|
|
|
|
|
I want to develop and aplication to te information from 1 weigthing machine that is connected to my serial port. but the problem there is no DLL or any library that i can use from the machine vendor.
thay only let me know tha address where i can get the data from and after i get the i have to delete the data from the machine..
how do i make my a serial port listener that whenever the machin have activity i have to get notified by the machine.
thanks..
Jalil
|
|
|
|
|
Without knowing any details about the scale and how it communicates, you're going to be doing LOTS of trial-and-error testing to figure out how the thing works and what you're going to have to do to get the information you need. There's no standard to follow here.
It could be as simple and opening the Serial port the scale is attached to (with the correct communication parameters of course!) and waiting for the scale to send you a weight. Beyond that, try it and see what happens.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You can use the System.IO.Ports namespace in your project. The SerialPort class is very simple to use. I guess your weighting machine has a special way to send data on the port. If you don't know, I suggest that you use an RS-232 analyzer to see what's being sent by the weighting machine.
fred.
There is no spoon.
|
|
|
|
|
Hello gurus,
I can successfully use the serial communication in .NET 2 but I'd like to know if it is possible to communicate with a USB driver in C#?
I could do this in C++ with the CreateFile function, but I wonder if we can do this with .NET 2...
The Win32 call I wish to do in .NET 2 is the following:
<br />
strChannel=_T("\\\\.\\HPx9G+\\PIPE0");<br />
m_hInput=::CreateFile(strChannel, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING, NULL);<br />
Is it possible at last in .NET 2?
Thanks for the help.
Best regards.
Fred.
There is no spoon.
|
|
|
|
|