|
The FlowLayoutPanel is moving the control back to 3,3 (top-left) so no matter where you try to place it, the panel will put it back. If you add a second button that will go to the right of the first, and if you add another that will go to the right of... and so on until you reach the edge of the panel when it starts on the next line.
I've not really used the FlowLayoutPanel before, so i'm not sure what you can do about it, why not use a regular panel?
My current favourite word is: Bacon!
-SK Genius
|
|
|
|
|
I created a custom control textbox in WinForm which have another value field called "fullValue" which is a little different than the .text value. Is there a way where I can make it to where when I mouse over this textbox, it show fullValue as a tooltip?
Any help would be highly appreciated, thanks in advance!
|
|
|
|
|
Well, if you check what events are available, you will see MouseEnter and MouseLeave for when the mouse moves over the control in question.
So in the MouseEnter event you would have this.Text = this.fullValue; or something and in MouseLeave i guess you would restore the text.
My current favourite word is: Bacon!
-SK Genius
|
|
|
|
|
My question is related with VBScript.
But i didn't saw any topic with that one.
I have a small problem with a script.
Used this command : ret=objShell.run (strCommand ,0 ,true). Where strCommand runs 7-zip to do an archive. The problem appears if some files are in use by another process. 7-zip return and error code and the program stops there. I want the program to continue the execution because even with this error.
If I put the last parameter false the problem is that that the program doesn't wait for the archive to be done.
I searched for some hours on the net but didn't find anything so I'm a little desperate.
I really appreciate any help,
Thanks
|
|
|
|
|
Why don't you use a GZipStream and cut 7zip out altogether?
Scott P
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
I'm not sure if GZIPStream exists in vbscripts and how I'll could use it.
Seems very simple to me to run a shell with a some parameters for 7-zip
|
|
|
|
|
Please do not post questions in multiple forums when it is not necessary.Link[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
can any one please tell me how to put skins/templates on ur C# winforms
(desktop application) , so that it will be applied to all winforms
thanx
asd
|
|
|
|
|
Another quality post from the sub-continent.
|
|
|
|
|
You will probably have to buy a third party tool for that.
|
|
|
|
|
Hallo,
I am working with numericUpDown control in .net c#. The value of numericupdown changes on mouse wheel depending on number of spins mentioned in control panel->mouse->wheel.
I want to overide this function such that value of numericupdown should not depend on control panel value.And always increment/decrement by value of 1.Irreespective of value mention at control panel, mouse wheel.
I have used MouseWheel event
numericUpDown1.MouseWheel += new MouseEventHandler(numericUpDown1_MouseWheel);
private void numericUpDown1_MouseWheel(object sender, MouseEventArgs e)
{
if (e.Delta > 0)
{
numericUpDown1.Value = numericUpDown1.Value + 1;
}
else if (e.Delta < 0)
{
numericUpDown1.Value = numericUpDown1.Value - 1;
}
}
but this snippet instead of incrementing/decrement by 1, adds 1 to the number of spins mention in control panel, mouse wheel .
Any kind of help will be appreciated.
|
|
|
|
|
Its because the numericUpDown's value gets changes by the mouse wheel, and then you handle the event for the mouss wheel and plus/minus 1 to the value. So your actually changing the value twice, if you see what i mean.
What you need to do is something like this:
if (e.Delta > 0) {
numericUpDown1.Value -= e.Delta;
numericUpDown1.Value++;
}
else if (e.Delta < 0) {
numericUpDown1.Value += e.Delta;
numericUpDiwn1.Value--;
}
That way you undo what the mouse wheel did, and then change the value yourself.
EDIT:Never mind, that doesn't quite work, other way around, mouse event handled first, which may cause problems with minimum and maximum for the numreicUpDown. I'm not sure what you could do then. Even the ValueChanged event gets handled before the value has actually changed.
My current favourite word is: Bacon!
-SK Genius
modified on Thursday, April 24, 2008 9:47 AM
|
|
|
|
|
Thanks for your effort and help .
|
|
|
|
|
|
Hi all!!
Is there a way to use forms with buttons in rtf files??
Or, does richTextBox supports buttons, like ms word?
If I am not clear, I know that in ms word you can create sosmething like a form with command buttons and everything, and I want to use this kind of ability in an editor I am trying to make. And these 2 are the only things I can imagine to accomplish this.
Any suggestions??
Thanks all!!!!
modified on Thursday, April 24, 2008 8:19 AM
|
|
|
|
|
No, you can't do that.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
No - but the WPF classes like FlowDocument can have rich text and buttons (and in fact any kind of WPF control) embedded in them...
|
|
|
|
|
How can I save the current TreeView nodes into a new TreeNode, apply my modification to that treeNode and then set it back to the TreeView control..
Please help
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Just do exactly what you just said
// Create the new node.
TreeNode newNode = new TreeNode();
// Copy any appropriate properties.
newNode.Text = oldNode.Text;
newNode.OtherStuff = oldNode.OtherStuff;
// Apply your modification
newNode.Text += "This text has been changed by me";
// Add the new node to the treeview.
treeView.Nodes.Add(newNode);
Simon
|
|
|
|
|
|
When saving the TreeNode as a new object you should use the Clone() member.
TreeNode workNode=TreeView.Nodes[0].Clone();
When setting it back to the TreeView you should remove the old node and add the new.
TreeView.Nodes.RemoveAt(0);<br />
TreeView.Nodes.AddAt(0,workNode);
/Ruben
RJJournal
|
|
|
|
|
I've put a SQL Data Access class together which returns a DataSet.
I wanted it to be generic, therefore wrote a method to return a dataset. I am using typed datasets within my application however and the cast throws an error;
MyDefinedSchemaDataSet myDS = (MyDefinedSchemaDataSet)myDataAccessClass.DoSelectStoredProcedure("procStoredProcedureName");
If i use DataAdapter.Fill on a MyDefinedSchemaDataSet.MyDefinedDataTable everything works and there are no errors, however that would throw the idea of a generic method out of the window...
what to do!?
|
|
|
|
|
Try this
DataSet utDataset = myDataAccessClass.DoSelectStoredProcedure("procStoredProcedureName");
MyDefinedSchemaDataSet myDS = new MyDefinedSchemaDataSet();
myDS.Load(utDataset.Tables[0].CreateDataReader(), LoadOption.OverwriteChanges, myDS.myTableName);
Just change the values where appropriate.
Broken Bokken
You can't carry out a ninja-style assasination dressed as an astronaut. It's the luminous fabric; too visible. - Tripod
http://www.brokenbokken.com
|
|
|
|
|
works perfectly! thanks thats what i've been looking for!!!!
think i'll pass parameters in as an arraylist... although not certain yet...
|
|
|
|
|
you should look into using the params keyword instead of an arraylist.
public void MyMethod(params object[] parameters)
{
}
When you call it you can pass them in without having to create a list. You can add as many parameters as you want and is great when you need to pass a list as a parameter to a method.
Broken Bokken
You can't carry out a ninja-style assasination dressed as an astronaut. It's the luminous fabric; too visible. - Tripod
http://www.brokenbokken.com
|
|
|
|