|
If you really tried so hard, then you should be able to present at least the tiniest little bit of input from yourself, and not just pasting in the homework assignment.
There are a lot of people here that can give you useful hints, but for that you have to present what you have done, and where you are stuck.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hello! I've made a animation of ball, flying on the form, from the edge to edge. But i've put a PictureBox,and the ball isn't seen anymore. It is flying in the backwards of my picttureBox. I've tryed to BringToTheBack the pictureBox, but it is not working. What should i do?
One nation - underground
|
|
|
|
|
AFAIK you can do nothing, since the PictureBox is a Control of the Form and you cannot overwrite its area when drawing inside OnPaint. As workarounds you can:
(1) use a another PictureBox to represent the bouncing ball.
or
(2) Build a customized PictureBox (deriving from the original one), and override the paint method to make it aware of the overlapping ball.
hope that helps.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hello Dear Friends !!!
I have a window with a button, which calls other window. There i call function
public void ShowOneInListView(ListView L, string N, string M, string S)<br />
{<br />
ListViewItem item = new ListViewItem(N);<br />
item.SubItems.Add(M);<br />
item.SubItems.Add(S);<br />
item.ForeColor = Color.Violet;<br />
L.Items.Add(item);<br />
}
which uses the listview(L) from another form. How can i access that listview, or that form ?
-- modified at 5:58 Sunday 1st April, 2007
One nation - underground
|
|
|
|
|
|
Thanks !!!!!!!!!!!!!!!!!
One nation - underground
|
|
|
|
|
Sir, can I have a doubt that If C# does not support Pointers then how C# is able to Support Runtime Polymorphism ? Pls help me in understandig the concepts better.
Thanking You
Fly Like An Eagle With MIGHTY POWER.
|
|
|
|
|
|
You should've been here yesterday
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
I created a small Windows form using C# that add and remove text from a file. To run the Windows form a user just need to click on the "Enablelog.exe." The "Enablelog.exe" only has a name attached to it(Enablelog.exe) which make it looks very plain. Can some one show me how I can add an image to it so that it will be on the "Enablelog.exe" and make it looks more professional. I am using Visual Studio 2005.
Any help will greatly be appreciated,
Donjuanwu
|
|
|
|
|
Try using an Icon
If you created the project with Visual Studio then you should have a "app.ico" or something like this into the project files
protected internal static readonly ... and I wish the list could continue ...
|
|
|
|
|
In your project's property => Application pane => you'll find a ComboBox to choose an icon for your application.
Regards
|
|
|
|
|
Vlad Stanciu and Nader Elshehabi thank you very much.
|
|
|
|
|
Hi
I'm trying to send mail through the MailMessage object.
I know that the body property of the message receives a string.
I wanted to know if there is a way to set the body of my mail to load an HTML file (or any other file, for that matter) so that the mail will not consistof a text only.
thanks
|
|
|
|
|
System.Web.Mail.MailMessage msg;
System.Web.Mail.SmtpMail.SmtpServer = "your.smtp.server.com";
msg = new System.Web.Mail.MailMessage();
msg.BodyEncoding = System.Text.Encoding.ASCII;
msg.From = txtFrom.Text;
msg.To = txtTo.Text;
msg.Cc = txtCc.Text;
msg.Bcc = txtBcc.Text;
msg.Subject = txtSubject.Text;
msg.Body = txtBody.Text;
System.Web.Mail.SmtpMail.Send(msg);
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi everybody,
Is there an attribute or some other way to validate that a property has a unique value.
To illustrate what i mean, watch the "Name" property in the property grid of each control added to a windows form. It is unique!
How can i achieve this capability too?
Thanks in advanced,
elaj
|
|
|
|
|
Hi all,
i am going to write window form application in C# that has TextBox and other control on it. i want to support two languages input for same one textbox depending on user selection via some radio buttons. i have searched on internet but all the posts say language can be changed for current thread. this means it will change language for all the controls on the from. please help me how can i change language on one particular textbox on run time.
Regards,
Omar Lodhi
|
|
|
|
|
first you must know you can not install/uninstall language supports in windows itself. That means that you can only support these languages only if they are supported by the user's windows.
Now to the issue. You can handle two events to manage that: Enter , and Leave .
In the Enter event handler you set Application.CurrentInputLanguage property to whatever you want, then on Leave event handler you change it back to the original.
Regards
|
|
|
|
|
Hello friends need help here..
Before this I have learn to create password validating form.Which is user have to key in password to enter another form. The password is default that have set in the coding.Now I need help how to connect to MY Sql database from C# from and compare the password that already I set in MY Sql database,table name Security and Field name password and the password is "ABCD".I dont know how to use SQL server 2005.
Below are the coding for the first form that validate to enter to form2.
//////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace cubaan1
{
public partial class Form1 : Form
{
Form2 form1 = new Form2();
public Form1()
{
InitializeComponent();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
textBox1.PasswordChar = '*'; //Masking Char
textBox1.MaxLength = 14;//Max Length is 14
}
private void button1_Click(object sender, EventArgs e)
{
string strDefaultPassword = "security"; //Keep the default password
string strEnteredPassword = textBox1.Text;
if (strEnteredPassword == strDefaultPassword)
{
this.Hide();
form1.ShowDialog();
}
else
{
MessageBox.Show("Wrong password entered");
this.Close();
}
}
}
}
//////////////////////////////////////////////////////////
How to change this to connect to MY Sql Database and compare the password from the database.
Tq in advance......
|
|
|
|
|
In the validation procedure (button1_Click) connect to the mysql database with a special driver (either odbc or a dedicated one from the mysql site) - check http://www.connectionstrings.com/[^] for aditional info.
Use ado.net to retrive the password for your user (dataTable, dataTableAdaptor and other stuff like this - check articles for this on codeproject).
The database querry should return only one value (the password) for the specified user. And olso, try to use parameters with regex in the querry to aviod insertion attacks.
Good luck.
protected internal static readonly ... and I wish the list could continue ...
|
|
|
|
|
Can you show me where to put the coding , I can understand.
Tq very much.
|
|
|
|
|
i am trying to access methods of windows Service from another project or Application is it possible? except Start, Stop method of Windows service.
suppose in my window service i have method like this for Creating a folder in C: drive.
// this service class one Method.
public void mthCreateFolder()
{
//logic for creating folder
}
When i use System.ServiceProcess class using The name of the Service i can access Start, Stop, Restart Method of That Service. But now i want to Access method mthCreateFolder of that service. Plz help me?
Sanjit.rajbanshi@wlinktech.com
|
|
|
|
|
If you programmed that service you can use Remoting to communicate between your application and that service, and then call that method.
If not!! Then I don't think you'd be able to do it.
Regards
|
|
|
|
|
I have the RichTextBox. And I was wondering how would I be able to how the user to place a table into the RichTextBox?
|
|
|
|
|
Hello everyone,
I need some idea since I am running out of my own and haven't been able to get it working.
I have a file called temp.txt which hold temparary data and will be deleted at the end of the Windows Application life. I have another file called perm.txt which is similar to the temp.txt file but it hold the saved data.
In order to avoid multipler data registration I would like to check to see if a particular data from temp.txt file has already been registered or not. If it hasn't then I will go ahead to save/register it into save.txt file. That is if the user choses to Save its temp.txt content by clicking on the SAVE button.
Any suggestion in this issue will be greatdly appriciated. Thank you very much and have a great day.
Khoramdin
|
|
|
|