|
The property form.Visible determines whether a form is visible (shown).Greetings - Jacek
|
|
|
|
|
Great. It works. tks Jacek
|
|
|
|
|
you can put global bool var. and when you hide the form put it True else false
(it is just an idea)
|
|
|
|
|
Tks. alternative idea for visible method.
|
|
|
|
|
this how i hide a form and open a new one
Form1 form = new Form1();
this.Visible = false;
if(form.ShowDialog() == DialogResult.OK)
{
}
this.Visible = true; / on close of the form you opened the one you started from shows
|
|
|
|
|
Dear Experts!
I am using xml in my project to store a list of objects of different types derived from the same base object.
[XmlArray("parts"), XmlArrayItem("part", typeof(Cpart))]
public ArrayList parts;
This approach works only if all objects are of the same type.
Can it be dome with objects of different types in the array?
Thanks!modified on Tuesday, February 9, 2010 4:43 AM
|
|
|
|
|
I want to fill a combobox with System.Windows.Forms.Keys Emun!
So how can i do that?
|
|
|
|
|
You can fill combo box like this
comboBox1.DataSource = Enum.GetNames(typeof(System.Windows.Forms.Keys));-----------------------------
Shakeel Iqbal
------------------------------
My New Article
Task Manager
|
|
|
|
|
Hi,
What's the equivalent of final keyword(Java) in C# ?
Thanks.
|
|
|
|
|
From the subclassing point of view, use the sealed keyword.
If you talking about declaring a final instance variable in Java, use the const or readonly keyword in C#.Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
|
I am building a GUI for a UART to communicate to a MC and then to a I/O expander. Right now I have the data going thru the RTS and DTS and my switches monitored by CTS DSR DCD and RI. How could I change this to be implemented to use only TX and RX for all of this without having to start all over. I am not real great with programming but I do know enough to understand. I have included the piece of code that I use for this part.
#region Initialization
public enum LEDColor { RedOn, RedOff, GreenOn, GreenOff }
private bool RTSState = false;
private bool DTRState = false;
private bool RingIndicator = false;
public Form1()
{
InitializeComponent();
pictureBoxRTS.BackgroundImage = imageList1.Images[(int)LEDColor.RedOff];
pictureBoxDTR.BackgroundImage = imageList1.Images[(int)LEDColor.RedOff];
pictureBoxCTS.BackgroundImage = imageList1.Images[(int)LEDColor.RedOff];
pictureBoxDSR.BackgroundImage = imageList1.Images[(int)LEDColor.RedOff];
pictureBoxDCD.BackgroundImage = imageList1.Images[(int)LEDColor.RedOff];
pictureBoxRI.BackgroundImage = imageList1.Images[(int)LEDColor.RedOff];
}
#endregion
#region Modem lines
private void serialPort1_PinChanged(object sender, System.IO.Ports.SerialPinChangedEventArgs e)
{
if (e.EventType == SerialPinChange.Ring) RingIndicator = !RingIndicator;
showCTS_DSR_CD();
}
private void showCTS_DSR_CD()
{
if (serialPort1.IsOpen)
{
if (serialPort1.CtsHolding) this.pictureBoxCTS.BackgroundImage = this.imageList1.Images[(int)LEDColor.GreenOn];
else this.pictureBoxCTS.BackgroundImage = this.imageList1.Images[(int)LEDColor.RedOn];
if (serialPort1.DsrHolding) this.pictureBoxDSR.BackgroundImage = this.imageList1.Images[(int)LEDColor.GreenOn];
else this.pictureBoxDSR.BackgroundImage = this.imageList1.Images[(int)LEDColor.RedOn];
if (serialPort1.CDHolding) this.pictureBoxDCD.BackgroundImage = this.imageList1.Images[(int)LEDColor.GreenOn];
else this.pictureBoxDCD.BackgroundImage = this.imageList1.Images[(int)LEDColor.RedOn];
if (RingIndicator) this.pictureBoxRI.BackgroundImage = this.imageList1.Images[(int)LEDColor.GreenOn];
else this.pictureBoxRI.BackgroundImage = this.imageList1.Images[(int)LEDColor.RedOn];
}
else MessageBox.Show("Error in showCTS_DSR_CD - serailPort1 not open.");
}
#endregion
#region Buttons
private void buttonRTS_Click_1(object sender, EventArgs e)
{
RTSState = !RTSState;
if (RTSState)
{
serialPort1.RtsEnable = true;
pictureBoxRTS.BackgroundImage = this.imageList1.Images[(int)LEDColor.GreenOn];
}
else
{
serialPort1.RtsEnable = false;
this.pictureBoxRTS.BackgroundImage = this.imageList1.Images[(int)LEDColor.RedOn];
}
}
private void buttonDTR_Click_1(object sender, EventArgs e)
{
DTRState = !DTRState;
if (DTRState)
{
serialPort1.DtrEnable = true;
pictureBoxDTR.BackgroundImage = this.imageList1.Images[(int)LEDColor.GreenOn];
}
else
{
serialPort1.DtrEnable = false;
this.pictureBoxDTR.BackgroundImage = this.imageList1.Images[(int)LEDColor.RedOn];
}
}
private void buttonCheck_Click_1(object sender, EventArgs e)
{
showCTS_DSR_CD();
}
#endregion
|
|
|
|
|
|
sallam
iam iran
mikhastam bebinam kasi hast ke betone mano komak kone
man miham ke barname benevisam ke vaghti ejra besh betone tamam adade dubel
jabeja kone masalan 3/4 convert 4/3
ba estefade az barname c#
|
|
|
|
|
Please post your questions/queries with proper language so that the other can read and give you feedback as well. Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
نیتروژن مایع
Translation here.[^]
Please post in English, most people speak that here, and you'll get an answer more quickly....Cpianism: I have a negative number in my Rep so please fix it.
Chris Maunder: That isn't a bug.
|
|
|
|
|
wait.. hwo did Liquid Nitrogen get into the equation?Personally, I love the idea that Raymond spends his nights posting bad regexs to mailing lists under the pseudonym of Jane Smith. He'd be like a super hero, only more nerdy and less useful. [Trevel] | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server
|
|
|
|
|
hi
who can you help
languech c#
i function whil can 3/4 dobel 4/3 convert
|
|
|
|
|
Read a book on C#; I am sure there are versions in Arabic and/or Farsi. MVP 2010 - are they mad?
|
|
|
|
|
|
|
How can I convert
ResXResourceReader rsxr = new ResXResourceReader(@"C:\Resource1.resx");
TO
ComponentResourceManager res = new ComponentResourceManager(typeof(Properties.Resources));
I mean How can i reference res with rsxr :
res = rsxr;
|
|
|
|
|
Please don't repost the same question; I already responded here[^]. Try reading the link that I gave you. MVP 2010 - are they mad?
|
|
|
|
|
it doesnt help me !!!!!!!!!!
Please do something for me?
>
|
|
|
|
|
If it didn't help you, then I have to assume you didn't read it. It certainly gave me enough pointers to start working with dynamic resource files, if I actually wanted to - which I don't.
What do you want - your hand held while we tell you "press the 'A' key, now the 'r', then 's'..."?If Barbie is so popular, why do you have to buy her friends?
Eagles may soar, but weasels don't get sucked into jet engines.
If at first you don't succeed, destroy all evidence that you tried.
|
|
|
|