|
Hi there,
I finally got the error message not to show by doing this, but I am worried if my logic is correct, any suggestions?
Double fTempCR=0.00;
Double fTempDB=0.00;
Double fTemp=0.00;
DataTable table = ds.Tables["tbACJE"];
object sumObjectCR;
object sumObjectDB;
sumObjectCR = table.Compute("SUM(AmtCr)",string.Empty);
sumObjectDB = table.Compute("SUM(AmtDb)",string.Empty);
fTempCR=Double.Parse(sumObjectCR.ToString());
fTempDB=Double.Parse(sumObjectDB.ToString());
fTemp=fTempDB-fTempCR;
if(fTemp==0.00)
Show message
sasa
|
|
|
|
|
Hi everyone
I'm pretty new to visual studio 2005 in combination with C#... I did some GDI+ research en tried to make my own User Control (which contains a circle, a pin and a rectangle that simulates te rotations of a DC motor).
The control works fine (motor rotates, you replace te motor bij an image of an motor...) But when I place this User Control (named MotorGUI) on a form, visual studio shuts down!!!
I have a solution with 2 projects
- client (test form)
- Simulation.Motor (Motor User Control -> compiled into an DLL)
When I drag the Motor User Control which is displayed in the toolbox after building this solution on the form, VS shuts down. Also when I finally got the control on the form by luck... When this control received a focus (in visual studio @design time... VS shuts down too
Can anyone help me? Or give me a suggestion? May be I am making a critical mistake? I can always copy/paste the code of my motorGUI user control.
Thanks in advance!
Rising Sun
|
|
|
|
|
VS itself shuts down ? What if you write code to create the control dynamically and run the exe ? Does the exe work ?
VS2005 kind of sucks, it now will crash with user controls that work perfectly at run time, for example, your rendering code needs to always work, even if no properties have been provided.
There is a property you can use, but I forget it's name. IsDesign, or DesignMode, something like that. That will allow you to write code that doesn't get run in design mode, which is where the problems are.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Creating the control dynamically solved the problem half. When compiling/building the solution, VS still shuts down
After a deeper search -it must be somewhere in the code- the shut down problem arised because one property of my motor hasn't a instance variable and the name of the accessing get/set method was the same name as the veriable!
(I added the method with the class designer (I would say: dangerous)).
But after all, strange that VS just shut down on that kind of a problem? (VS kind of sucks, indeed) I guess when dropping my motor control on a form, VS 'activate' the control and shuts down because the problem above .
Is is always so that a control is running (getting active?) at design time(like my motor DLL component)? It is not a static view I guess? But a sort of 'runtime' view?
Thanks for the DesignMode property hint! That's how I came upon this solution. Everyting works fine after fixing the get/set method.
Thanks Christian!
|
|
|
|
|
Dear gurus,
I'm dealing for a while now with Enterprise Library 2.0 (EL). I'm almost totally lost.
If I search for samples I always find the same samples which seem to be created by exactly three gurus (Alois Kraus, Tom Hollander and David Hayden). This shows me that I'm not the only who does not understand this stuff. It's a greaty pity, because I think EL is nice and interesting. It seems to me as if Microsoft had created EL only for themselfs
Ok, enough complained.
Can somebody help me with classes as FileConfigurationSource or IConfigurationSource in concert with ConfigurationManager and reading from different configuration files.
Thanks a lot in advance
-- modified at 10:15 Tuesday 15th August, 2006
|
|
|
|
|
Yes, there is certainly a lack of good samples for working with enterprise libraries. Most dev shops that need an enterprise framework probably already have one in-house, so adoption of entlib is kinda low. I'm a fan of entlib but not much chance to use it. Perhaps if you post a specific question this forum can be more helpful.
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
Friends,
We all know that there are three buttons on titlebar i.e minimize, maximize and close.
I want to add my custom button on the titlebar near minimize button. How can i do so ?
Imtiaz
|
|
|
|
|
With Interop wizardry
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
But how ? What APIs to call ?
Imtiaz
|
|
|
|
|
Try typing in your question (in the subject line) as it is into Google. Take a look at the fourth or fifth result which is the first CodeProject hit. That should explain it all (but it is in C++).
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Hello
The best practice I can think of is to inherit a class from Windows.Form, and handle its drawing yourself
Otherwise putting a control outside the client area at runtime -though I think it's not impossible- would be extremely difficult
Regards
|
|
|
|
|
hi
you can use this code Smile |
private void btnmin_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}
|
|
|
|
|
Dear gurus,
I need your help.
For configuration I Sometimes see two typical files with a name as
"app.config" and "myprog.exe.config".
They seem to have similiar impact/meaning.
Can you give me some advice?
Thanks a log
|
|
|
|
|
After building, app.config gets copied to your bin folder and is renamed as myprog.exe.config. So, as a developer app.config is the one you need to modify as required.
Kevin
|
|
|
|
|
|
Hi.
using the follow code I can answer to a call, but in the while loop, I want to receive data from the calling phone, that a person is speaking.
serialPort1.BaudRate = 56000;
serialPort1.PortName = "COM3";
serialPort1.ReadTimeout = 1000000;
serialPort1.Open();
serialPort1.Write("ATA\n\r"); //Answer a call
string str;
while (true)
{
str = serialPort1.ReadExisting();
}
Best wishes
|
|
|
|
|
If you want to receive "data", then use :
while(true)
{
try
{
string receivedMessage = serialPort1.ReadLine();
Console.WriteLine(receivedMessage);
}
catch(TimeoutException)
{
}
}
Put this method in a new thread.
If you want to receive the "sound" from the person, I don't know how to do that.
I think, the "sound" is analog, that's why the modem is an analog modem.
You need something to digitalized it, something like Analog-Digital-Converter.
|
|
|
|
|
No,
now it's important for me that when the person speaking, I receive data.
no exactly sound.
in the str I receive data.
how ?
Best wishes
|
|
|
|
|
A normal analog modem doesn't do that.
If the modem receive a "sound", you receive nothing
from serial port. You can only hear from the modem
speaker that your partner say something.
|
|
|
|
|
And if he presses any key of phone device, then again I can't receive any data ?
Best wishes
|
|
|
|
|
Hello
When a caller presses a button in a voice call something called DTMF tone is generated. To learn how to handle DTMF tones revise your TAPI documentation in MSDN
Regards
|
|
|
|
|
Hello
mehrdadc48 wrote: I want to receive data from the calling phone, that a person is speaking.
Modems actually work in several modes. Two of them are
1- Voice calls
2- Data calls
You can not transfer data in a voice call. On the other hand you can transfer voice -as a data stream- in a data call. This is called Voice Over IP.
If you are making a voice call -for example an ordinary phone is calling your phone line, and you want to record this using your computer-. In this case you should capture the audio stream from the modme speaker's audio line.
If you are developing something like a messanger that works on phone line instead of the internet. Transfer your voice as an audio stream. This way you can transfer data with it-eg. files, pictures, text, etc...-
Your loop should work if it's a data call -supposing that your modem's AT command is working-. Yet take care that this loop will go forever until you call a break;
It it's not working for some reason or another, post more details on your problem, so that we could get more oriented with it.
Regards
|
|
|
|
|
"you should capture the audio stream from the modme speaker's audio line"
please tell me how to do this ?
And how this?
"Transfer your voice as an audio stream"
I prefer that do this in managed code in c#
-- modified at 11:34 Tuesday 15th August, 2006
Best wishes
|
|
|
|
|
|
My freind,
I want to capture analog sound from modem ..
"You can not transfer data in a voice call"
I want to recieve voice in voice call(not data call), in my application not on modem speaker
-- modified at 5:37 Wednesday 16th August, 2006
Best wishes
|
|
|
|