|
FIRST!
how can i setup my SQL server 2008 data base in computer that does not have SQL server?
|
|
|
|
|
REPLY!
Install SQL Server!
CCC solved so far: 2 (including a Hard One!)
|
|
|
|
|
i make a setup file that include the date base and my program,so how can i make the setup file works?
|
|
|
|
|
You need to install SQL Server to deploy the database to.
You could install SQL Server 2008 Compact, but I'm not sure what the licensing is.
CCC solved so far: 2 (including a Hard One!)
|
|
|
|
|
Try here[^]
only two letters away from being an asset
|
|
|
|
|
|
I am using a richText box to display (output) messages to the users of my application. The box fills up from top down. When messages accumulate they do not get pushed up. Here is some of my code.
<pre><code>private void btnPowerOn_Click(object sender, EventArgs e)
{
// init equipment set current limits etc
richTextBox1.Focus();
richTextBox1.Text = richTextBox1.Text + "Initializing Equipment.. \n";
InitEquipment(); // initialize Equipment
richTextBox1.Focus();
richTextBox1.Text = richTextBox1.Text + "Turning Power Supply and Current Source on.. \n";
TE.PowerSupply.TurnOutputOn(strPowerSupplyName);
TE.CurrentSource.TurnOutputOn(strCurrentSourceName);
// checking to find which UUT's are enabled
WhichUUTChecked();
}</code></pre>
The richTextBox gets called a few times. The richTextBox1.Focus() command does not seem to work they way I expect it.
Any hints appreciated.
Sophronis Mantoles<pre></pre>
|
|
|
|
|
Use richTextBox1.AppendText("Your text here") instead of richTextBox1.Text = richTextBox1.Text + "Your text here"
|
|
|
|
|
This works very well. Thank you for all your help.
Sophronis
modified on Friday, September 25, 2009 11:26 AM
|
|
|
|
|
Hi,
I think you want the textbox to scroll to the bottom line after adding new text. Make a zero length selection at the end of the text and then use the ScrollToCaret method.
e.g.
this.ResultTextBox.SelectionStart = this.ResultTextBox.TextLength;
this.ResultTextBox.SelectionLength = 0;
this.ResultTextBox.ScrollToCaret();
That's for a normal TextBox but I assume it's ok for the RichTextBox too.
Alan.
|
|
|
|
|
The RichTextBox has several methods that might help you.
Specifically: LineUp, LineDown, ScrollToHome and ScrollToEnd.
You could add a ScrollToEnd() call after adding each line, which 'should' have the desired effect, although there may be a more elegant solution.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hello,
In a professional view, which one of the below does the least cycling?
Assume these two lines of code in a button's click event and i want blabla control's enabled property to be set true at the click of the button:
1) blabla.Enabled=true;
2) if(!blabla.Enabled) blabla.Enabled=true;
First one will force an Enabled=true at every button click even if it was already true. (Or maybe there is a logic beneath that I don't know, like the framework checks it and does the work, in this case, the question is irrelevant)
Second one will first check if it is false and then set true. This one will not always run the code but instead it will do an IF check.
So the question again, is: Which one is better for CPU? (Or in another sentence: Does IF or Enabled property uses more cycle?)
Thanks in advance.
Best regards,
Anıl Yıldız.
|
|
|
|
|
hi,
the second one is better coding i would say.
but first you have to clarify whether the property does set the new value if the value changed or not.
the code below demonstrates working with no if-clause because it will be checked before setting the new value..
private bool _enabled = false;
public new bool Enabled {
get { return __enabled; }
set {
if(enabled != value)
{
enabled = value;
this.Invalidate();
}
}
}
in this case the code below shows a check if button is enabled would be a right way, because every time the value will be set the button would redraw although nothing changed.
private bool _enabled = false;
public new bool Enabled {
get { return __enabled; }
set {
enabled = value;
this.Invalidate();
}
}
hope i could help you..
bless
|
|
|
|
|
Thanks, you had a great demonstration there. I have never thought of the redrawing when setting a property that causes invalidation before.
Thank you again, that answered my question perfectly.
Best regards,
Anıl Yıldız.
|
|
|
|
|
Why would you invalidate the control?
|
|
|
|
|
guys,
this is an example of a owner drawn control.. you dont have to invalidate the control if you just use the Windows.Forms.Button.. but if you write your own control this would be a solution for creating a properties that shall react by setting a new value..
he described the control as blablubb control this could be a button or anything else like a self written control
|
|
|
|
|
rootjumper wrote: this is an example of a owner drawn control
Then, yes, check inside the Control. But he was asking about setting Enabled from outside the Control.
|
|
|
|
|
Probably the first. Try it.
P.S. Look up "premature optimization".
|
|
|
|
|
I just experimented with the DataGridView I'm playing with. When Enabled is set to true when it is already true, a DataGridView does not redraw itself. It must therefore already perform the check you're considering adding. I would assume that that is true of all controls, but you should experiment with the particular control you're using.
Bottom line: adding the check is needless and wasteful.
|
|
|
|
|
Thanks for all the answers and sorry for the delayed reply. I'm not doing anything specific right now. The question has been in my mind for a while and I wanted to see if there were any people around who knows the answer. I was going to check that out for myself but you apparantly did it.
About validating, just like you got, it was just an idea if maybe the control validates itself when the Enabled property is set to anything no matter the value it had previously. That was a great direction for me which I've never thought about before.
Now that you are saying setting the Enabled property is not validating if it is just the same value as before. But it should be doing something right? Maybe checks it before and decides not to set it since it is just the same. Pretty much what the first answer said. Considering this is the case, I assume there is an IF statement to check the value already so it is a waste of cycles to check it beforewards.
It is not a very big deal but well, I just wanted to know. Thanks to everyone who has taken the time reading and even answering. They are very valuable to me.
Best regards,
Anıl Yıldız.
|
|
|
|
|
definatly thanks man
|
|
|
|
|
no the check will be only performed if YOU code it (self written controls.. all others control i.e. from microsoft will perform the check i would suppose) ^^
try to write your own control which will be drawn white if property Active is true and black if is false by only changing the value without calling repaint methods on property change.. this is not wasteful! you need to look at the point of view
|
|
|
|
|
I've never needed to (yet), but I'm doing some drawing on this DataGridView after it draws itself.
I added a handler for the Paint event to accomplish that, and I confirmed that Paint does not get called when Enabled is unchanged.
The state is checked inside, so checking it from outside is wasteful.
Unless the Control was developed by someone who doesn't know to check it inside and just always redraws.
|
|
|
|
|
On an application that uses ID Automation logic building barcodes the same caracters passed on application are represented deifferent on another application, why could be that problem
regards!
Qendro
|
|
|
|
|
What kind of characters? How are they formatted/stored?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|