|
I have developed a TAPI application using voice modem (UNIMODEM TSP). The application is working fine except that when the person on other side (receiver) disconnects the call, TAPI application is unable to prompt the disconnection.
After some research, it came in to my knowledge, that is a limitation of UNIMODEM TSP, which does not forwards the message to TAPI.
Later, after having a conversation with my modem vendor, he told me that the only way to know when the receiver disconnected the call is to activate the modem's Inactivity Timer. Which will automatically disconnect the call if there is no conversation for a given time. To activate this timer, i have to pass this AT command to my device.
AT+VIT=60
The question is, how can i pass this command to modem, when i am using TAPI, or can i open comm connection in parallel to tapi.
*************************
SetNewGoal:
while (GoalNotAchieved){}
goto SetNewGoal;
*************************
|
|
|
|
|
I need to pass 2 int values to a function and call it on load of a div. How can i create these int variables and call this javascript function with C# coding?
I thank you infront
|
|
|
|
|
Set your DIV tag to run server-side. In your Page_Load event, do something like:
myDiv.Attributes.Add("onload", String.Format("myfunc({0}, {1});", value1, value2));
This will attach a function call to the onload event for your DIV.
Replace value1 and value2 with your own variable names.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks for your suggestion. I think that the function is not being accessed. how can i access the breakpoint that i made on the jscriptfile so that to check if the code is being executed?
|
|
|
|
|
jonhbt wrote: how can i access the breakpoint that i made on the jscriptfile so that to check if the code is being executed?
No need to. I can tell you right away that the function is not called.
There is no onload event for the div element.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
this try only
i`m sorry
we are comming!
|
|
|
|
|
Hello jonhbt,
You have not indicated why you want an onload for a DIV, but here is an explanation of how to do it:
http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget-addEventListener
and you can try like this
set two variables for script from ur page and access them in function.
as you can not directly access onload of div but if you write script tag in div and name of your function it will call up on load of it.
aspx page like
--------------
function getValues()
{
alert(a);
alert(b);
}
getValues();
<asp:label text="this is div" runat="server">
and in on Page_Load .cs file
-----------------------------
protected void Page_Load(object sender, EventArgs e)
{
int a= 3;
int b=4;
Page.ClientScript.RegisterClientScriptBlock(this.GetType(),
"onLoad", "var a =" + a + ";
b=" + b + ";", false);
}
|
|
|
|
|
Creating Spalsh Screen from an Image in C#
Hi I need to create a Splash Screen from an Image file. The Splash Screen form should be of the same dimensions as the image file. The program should hide the Splash Screen when my MainForm is displayed.
Here is what I'm doing
class SplashScreen : Form
{
Image splashImage;
public SplashScreen()
{
this.TopMost = true;
this.ShowInTaskbar = false;
this.FormBorderStyle = FormBorderStyle.None;
this.StartPosition = FormStartPosition.CenterScreen;
this.BackColor = this.TransparencyKey = Color.White;
Image img = Bitmap.FromFile("splash.png");
Bitmap b = new Bitmap(img);
b.MakeTransparent(b.GetPixel(1,1));
this.BackgroundImage = splashImage = (Image) b;
this.Size = this.splashImage.Size;
}
}
class MainForm : Form
{
public static void main(String[] args)
{
SplashScreen splash = new SplashScreen();
splash.Show();
MainForm mainForm = new MainForm();
mainForm.Shown += delegate(object o, EventArgs ev)
{
splash.Hide();
splash.Dispose();
mainForm.GetFocus();
};
}
}
The Splash File to be used is available here.
With the above code I do get the splash screen and the behaviour as expected but before the splash screen is drawn I see a Black Rectangle flashing, with same dimensions as the splash image.
Please suggest. If you have a different approach please go ahead. All I want is to see a nice Splash Screen
Thanks
Sukhjinder
http://sukhjinder.cn/
|
|
|
|
|
Sukhjinder_K wrote: this.BackColor = this.TransparencyKey = Color.White;
Image img = Bitmap.FromFile("splash.png");
Bitmap b = new Bitmap(img);
b.MakeTransparent(b.GetPixel(1,1));
this.BackgroundImage = splashImage = (Image) b;
I don't really get what you're trying to achieve here. Why not just use
this.BackColor = Color.Transparent;
this.BackgroundImage = Bitmap.FromFile"splash.png");
If you include the tranparency in your image you should be pretty much done. If that doesn't work, you can always fill up the form with a PictureBox control.
Oh, as for the flicer problem, try using this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); on your form.
Standards are great! Everybody should have one!
|
|
|
|
|
[DllImport("user32.dll")]<br />
public static extern bool LockWindowUpdate(IntPtr hWndLock);<br />
<br />
<br />
public SplashScreen()<br />
{<br />
<br />
this.TopMost = true;<br />
this.ShowInTaskbar = false;<br />
this.FormBorderStyle = FormBorderStyle.None;<br />
this.StartPosition = FormStartPosition.CenterScreen;<br />
<br />
Image img = Bitmap.FromFile(LetsYoConfig.SplashFileName);<br />
this.Size = img.Size;<br />
<br />
LockWindowUpdate(this.Handle);<br />
<br />
try<br />
{<br />
this.BackColor = this.TransparencyKey = Color.White;<br />
<br />
Bitmap b = new Bitmap(img);<br />
this.BackgroundImage = splashImage = (Image) b;<br />
}<br />
finally<br />
{<br />
LockWindowUpdate(IntPtr.Zero);<br />
}<br />
}<br />
|
|
|
|
|
Hellow
would you please help me to erase a line in C#.Here I used Drawline(x1,y1,x2,y2) method to draw a line in a panel.I need to create a tool just like in MS paint to erase it.Is there any way to do like that.I tried to erase with by drawing a rectangle with back ground color same to the panel...but its not working fine.would you pls also post code for that...it will be very helpful
Here is my e-mail ID --subinraju007@gmail.com
modified on Friday, March 28, 2008 6:22 AM
|
|
|
|
|
create a rectangle with these color
Color.Empty
or
Color.Transparent
i havent check these code
hope it will help
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
|
Subin Raju wrote: hello no reply ?
Are you paying anyone on this forum for their help? No? Then don't be so impatient. Be prepared to wait for an answer.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
|
Subin Raju wrote: ha ha Paul Marfleet...
I dont want be polite infront of you people....I will be polite infront of beggers but not infront of you..I never asked you question. I just posted my question in this forum..okeee huh..so dont try to be over smart he he
Is this usually how you ask for help? By insulting the people that you want to help you?
If so, good luck because you'll get no further help from me.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
you'll also get no help from me.
|
|
|
|
|
Subin Raju wrote: I also expect code for that...it will be very helpful
You can expect what you want. Seeing as you're not paying anyone for their help though, I suggest you try and be a bit more polite when posting questions.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
sorry brother...it may because of my lack of knowledge in english
|
|
|
|
|
ha ha Paul Marfleet...
I dont want be polite infront of you people....I will be polite infront of beggers but not infront of you..I never asked you question. I just posted my question in this forum..okeee huh..so dont try to be over smart he he
|
|
|
|
|
You seem to know english well enough to be insulting and rude.
|
|
|
|
|
Subin Raju wrote: ha ha Paul Marfleet...
I dont want be polite infront of you people....I will be polite infront of beggers but not infront of you..I never asked you question. I just posted my question in this forum..okeee huh..so dont try to be over smart he he
I see your social skills are as poorly developed as your software development skills.
It's interesting that you mention begging. Sounds like a future career option for you as IT is obviously too challenging.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi,
Can we build an C# application which can post Data to a HTTP web form??
And maybe it can also post information to a asp.net web server??
Is both of them possible or only one of them?
Treat them as two separate questions..
How can we achieve this?
Can anyone help me??
Its really urgent..
Thanks..
Som
modified on Friday, March 28, 2008 4:17 AM
|
|
|
|
|
The two questions you have asked,I am not clear about it.
Is posting data to HTTP Form means calling any C# class which returns some data that has to be posted in the Form?
And the second question ,You can add HTTP Headers and Post data to the Web Server.
Please be functional about the first question,so that the exact requirements can be understood.
|
|
|
|
|
Som.Paul wrote: build an C# application which can post Data to a HTTP web form??
Yes[^].
/ravi
|
|
|
|