|
Hello every body.
How can I catch Key press but not like event for a Form or other component.
For exapmle:
if my program is started end is presed keys F1,F2,... and etc. I want to catch this Keys presed.
Thanks for all.
|
|
|
|
|
Set your form's KeyPreview property to true then use the form's KeyDown, KeyPress or KeyUp events.
|
|
|
|
|
Thanks DaveyM69 it works!!!
|
|
|
|
|
I am out of my element when doing graphics. Can someone give me hand.
<br />
<br />
private void draw()<br />
{<br />
if (end == 0)
{<br />
g = pictureBox1.CreateGraphics();<br />
pictureBox1.Image = bitmap;<br />
}<br />
<br />
g.DrawRectangle(new Pen(border, (int)n_size.Value), startX, startY, endX - startX, endY - startY);<br />
<br />
if (end == 1)
{<br />
<br />
bitmap = pictureBox1.Image;
<br />
} <br />
}<br />
<br />
TNX
|
|
|
|
|
Bitmap class has several constructs. Choose the one that meets your needs
|
|
|
|
|
A snippet of code would be helpful.
|
|
|
|
|
|
electriac wrote: pictureBox1.Image = bitmap;
set
pictureBox1.BackgroundImage = bitmap
and Try to use this concept
<br />
Bitmap bm = new Bitmap(600, 600);<br />
Graphics g = Graphics.FromImage(bm);<br />
g.DrawRectangle(new Pen(border, (int)n_size.Value), startX, startY, endX - startX, endY - startY);<br />
pictureBox1.BackgroundImage = bm;<br />
bm.Save("bm.jpg", ImageFormat.Jpeg);<br />
Hope this will help
|
|
|
|
|
How to Import + Export Excel file to MS SQL Server? Write C#.
Not using MS SQL 2005 and .Net 2005.
Help me....
Thanks.
|
|
|
|
|
You can use either Excel object Model or OleDb provider to read and write from excel document. As for sql server, you can use ADO.NET
|
|
|
|
|
I'm beging C#, pls write details code.
|
|
|
|
|
No one will write it for you. If you are new to it I suggest you search google for the terms I mentioned and read documentation
|
|
|
|
|
|
Why would you want to do this? I find processes that don't terminate when I want them to, well, rather annoying.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
There is generally no legitimate need to do this. There are some of the critical operating system processes that are protected like this but user processes shouldn't need to do this.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
is there any datepicker control in .net?if not can anyone tell me the code for the datepicker control to use in the application.
pintoo
|
|
|
|
|
As far as I know there isn't a DatePicker control like you can use in Windows Applications (the one that looks like a ComboBox, and when dropped down, you see a calendar).
There is, however, a calendar control that can be used. The control can be added to your webform by adding:
<asp:calendar runat="server" id="myCalendar"></asp:calendar>
|
|
|
|
|
Hi,
I am new to .NET windows appln. I have 1 form frmadditem. frmadditem contains 1 textbox(txtcategory) and 1 Command Button(cmdselect). when I click cmdselect a window should pop up displaying list of categories and a select command button.when I select a category and click select command button, the category should go into the textbox(txtcategory).
Pls help me in doing this.
|
|
|
|
|
You need to create another form (frmpopup or something). Add a variable (_target) to hold the target text box. Ammend the constructor to take a TextBox argument and assign to this in the constructor i.e.
public partial class frmpopup : Form
{
private TextBox _target;
public frmpopup(TextBox target)
{
InitializeComponent();
_target = target;
}
}
Add your controls to this form and in the button's click event set _target.Text to whatever is correct.
In the cmdselect's click event on frmadditem, simply declare a new instance of frmpopup passing the textbox to the target argument.
|
|
|
|
|
Hi friends im using the code given below.but im not able to send sms.
try
{
SmsTesting.net.webservicex.www.SendSMS smsIndia= new SmsTesting.net.webservicex.www.SendSMS();
SmsTesting.com.webservicex.www.SendSMSWorld smsWorld = new SmsTesting.com.webservicex.www.SendSMSWorld();
if(rdoType.SelectedValue == "1")
smsIndia.SendSMSToIndia(txtMobileNo.Text.Trim(), txtEmailId.Text.Trim(), txtMessage.Text);
else
smsWorld.sendSMS(txtEmailId.Text.Trim(), txtCountryCode.Text.Trim(), txtMobileNo.Text.Trim(), txtMessage.Text);
lblMessage.Visible = true;
lblMessage.Text="Message Sent Succesfully";
}
catch(Exception ex)
{
lblMessage.Visible = true;
lblMessage.Text="Error in Sending message"+ex.ToString();
}
Hi,Im Razana
|
|
|
|
|
razanabanu wrote: Hi friends im using the code given below.but im not able to send sms
Well, Since we are most unlikely to know much about the proprietary framework you are using to send SMS it is unlikely we can help. Does the company that produce the SMS framework not provide support? And if they do, they will need more information about the problem than "but im not able to send sms" - How exactly are you not able to send them? Do you get an error? If so, what is it? If not what happens?
|
|
|
|
|
razanabanu wrote: SmsTesting.net.webservicex.www.SendSMS smsIndia= new SmsTesting.net.webservicex.www.SendSMS();
SmsTesting.com.webservicex.www.SendSMSWorld smsWorld = new SmsTesting.com.webservicex.www.SendSMSWorld();
are you able to access this things????
|
|
|
|
|
Hi all,
how to install windows service programmatically in c#.
Please help me.
Thanks in advance
Narendra
|
|
|
|
|
There is an article about self-installing windows service on codeproject. Find it and it will help you
|
|
|
|
|
Hi all,
Im trying to list all the System DSN Names. How can this be done in C#??
Please help.
Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|