|
fracalifa wrote: form.BeginRebuild()...form.EndRebuild()
form.SuspendLayout()
...
form.ResumeLayout()
|
|
|
|
|
Thank you for your quick answer,
I tried your suggestion, but the code doesn't changes anything on the reaction.
You can see the clearing and rebuilding of every tab of the tabcontrol.
Try this:
this.SuspendLayout();
this.TabControl.SuspendLayout();
TabControl.TabPages.Remove(Tab0);
TabControl.TabPages.Remove(Tab1);
TabControl.TabPages.Add(Tab0);
TabControl.TabPages.Add(Tab1);
this.TabControl.ResumeLayout();
this.ResumeLayout();
It doesn't suppresses the visible rebuild process.
Some ideas
Thanks
-- modified at 14:26 Monday 6th March, 2006
|
|
|
|
|
I have a button and the forms transparecy key is set to gray so any instances of the color gray and the form will set that so its transparant. BUT I have a button on top of a picture box and want the button to be transparent so you can see the picture box but not whats behind the form?
The button has an image and I want the grays areas to not be showen. How would you do this?
In the end we're all just the same
|
|
|
|
|
I have made a program to play video file in directx (directx.AudioVideoplayback)! It worked well ! But I couldn't find the way to handle the video.owner !
when I did set the video.Owner = (name of my panel); I wanted to set video to full screen mode by double click on the video (in bool property video.FullScreen).
I tried to add Double Click EventHandler to my panel or video.Owner but It didn't work !
How can I do this ? Any ideas ... ?
|
|
|
|
|
My understanding is that when you run an EXE, it gets compiled by NET in chunks as you use various parts of the application. This method of execution has advantages for some types of computing. But i have the NEED for SPEEED! This app needs to respond quickly to user interaction at all times as if it was already compiled. My app runs great once it is fully compiled, but is unacceptably slow until it gets to this fully compiled state.
Is there a way to instruct NET to precompile your EXE so that it runs at 100% speed from the start? If this causes the application loading to take longer, i accept this tradeoff as the app will start when the computer starts and i do not anticipate the user interacting with the app during this time.
|
|
|
|
|
try ngen.exe (native image generator)...it precompiles an assembly...
call it like this: ngen - install NameOfAssembly
|
|
|
|
|
redfish34 wrote: My app runs great once it is fully compiled, but is unacceptably slow until it gets to this fully compiled state.
There are various stages you are not considering, beside JIT compilation.
- initialization of static data
- initialaztion of instances
- CPU cache
To get everything precompiled (JIT'ed), use ngen on your assembly. I doubt that that will make as much difference as you hope for.
Static data is by far the biggest bottleneck.
|
|
|
|
|
leppie, thanks for your advice.
I precompiled my exe using Ngen.exe and no performance gain was observed. It makes sense since most of the assemblies used by my app are already precompiled NET assemblies. So i add Ngen.exe to my long book of Microsoft urban legends (myths).
I then tried a hack. I attempted to force precaching of forms by automating user interaction off-screen. I click buttons and cause forms to appear so they get cached. After this is done, the precached forms are presented to the user. Requires some dancing in the WndProc with custom messages. You need to wait until after the paint event to get the cached form. This works as long as the form is mostly visible on screen. When form is mostly offscreen, it does not work. This was a hopeful hack, but it came to a dead end.
So after a long trip i have concluded that C# and all the NET languages, is not significantly different than VB6 in GUI performance. This is a disappointment. Luckily i used mostly Win32 calls in my app and not NET equivalents and so porting to C++ will not be to much of a problem.
|
|
|
|
|
redfish34 wrote: So after a long trip i have concluded that C# and all the NET languages, is not significantly different than VB6 in GUI performance. This is a disappointment.
This not true.
|
|
|
|
|
If you really need perfomance, VC++ should be your choice, not .NET.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
Hi all
i am trying to use font to create a region then use it to draw a shaped
windows form, but it didnt work
is there any sample code or tutorial that can give me help
thx all
|
|
|
|
|
Search the articles for "shaped window" and you will find a bunch of stuff...
like this one:
http://www.codeproject.com/csharp/shapedwinform.asp[^]
----------
There go my people. I must find out where they are going so I can lead them.
- Alexander Ledru-Rollin
|
|
|
|
|
How to create a connection with SQL server using vc++?
how to get data from database using vc++?
thanks in advance.
JAYARAJ
|
|
|
|
|
|
Hi, Dear All!
I have to sort the treenodes in my treeView.
Before sort:
-Counters
|_AAA
|_BBB
|_CCC
after the sort proceedure:
-Counters
|_CCC
|_BBB
|_AAA
I use the IComparer. The problem is: after the Node are sorted they are duplicate too.
So:
-Counters
|_CCC
|_BBB
|_AAA
|_AAA
|_BBB
|_CCC
Here is the sourcecode:
public class Form1 : System.Windows.Forms.Form
{
...
private void SortNodes(TreeNodeCollection nodes)
{
ArrayList arl = ArrayList.Adapter(nodes);
arl.Sort(new NodeComparer());
}
private void button3_Click(object sender, System.EventArgs e)
{
SortNodes(treeView2.Nodes[0].Nodes);
}
...
} //Form1
public class NodeComparer: IComparer
{
public int Compare( Object a, Object b )
{
TreeNode tn1 = (TreeNode) a;
TreeNode tn2 = (TreeNode) b;
return tn1.Text.CompareTo(tn2.Text);
}
}//NodeComparer
Could somebody tell me why are the nodes duplicated?
Thanks!
|
|
|
|
|
So, anybody, I have it now. Its not so automatical as I wanted to be, but it do what I had expected. It do reverse sort of all the Nodes of selected node. here is the code.
[CSHARP]
private void button3_Click(object sender, System.EventArgs e)
{
TreeNode sortRootNode = treeView2.SelectedNode;
int nodeCount = sortRootNode.Nodes.Count;
for (int j = 0; j < nodeCount-1; j++)
for (int i= 0; i< nodeCount-j-1; i++)
{
if(String.Compare(sortRootNode.Nodes[i].Text, sortRootNode.Nodes[i+1].Text)<0)
{
TreeNode tmpnode = sortRootNode.Nodes[i];
int index1 = sortRootNode.Nodes[i].Index;
TreeNode tmpnode2 = sortRootNode.Nodes[i+1];
sortRootNode.Nodes.Remove(sortRootNode.Nodes[i]);
sortRootNode.Nodes.Remove(sortRootNode.Nodes[i]);
sortRootNode.Nodes.Insert(index1,tmpnode2);
sortRootNode.Nodes.Insert(index1+1,tmpnode);
}
}
}
[/CSHARP]
-- modified at 4:24 Tuesday 7th March, 2006
|
|
|
|
|
Hi.
Is there anywhere to get addons for C# .net 2003? Like project solutions, Designer templates ect...?
Just wondering.
In the end we're all just the same
|
|
|
|
|
Hello,
I have a DataTable dt, And when I am trying to Select so:
dt.Select("name='ddd\'ddd'");
It returns error. How it is possible to solve this problem?
Thanks.
|
|
|
|
|
You don't need a \ because it's a single quote, not a double one.
dt.Select("name='ddd'");
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for answer. But I have in my DataTable such a row
name | value
ddd'aaa | 1.0
And I need to select: ddd'aaa. And when I type dt.Select("name='ddd'aaa'"); It returns error
For example in SQL I have to add backslash before '. In SQL it must looks like this: SELECT * FROM dt WHERE name='ddd\'aaa';
Is it possible to do the same with DataTables?
-- modified at 7:25 Monday 6th March, 2006
|
|
|
|
|
For MSSQL / Access:
dt.Select("name='ddd''aaa'");
For MySQL:
dt.Select("name='ddd\\'aaa'");
---
b { font-weight: normal; }
|
|
|
|
|
I have a button called btnSearchMP3 and I want in C# .net 2003 and I want when its clicked to display all the MP3's on a users computer in a list box called lstsearch. How would you do this?
In the end we're all just the same
|
|
|
|
|
By enumerating all drives, then recursively searching through them for files.
System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() is what you need.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I understnad that. Could you give me the full code to place in the Button so when its clicked it will fill the list box?
Aslo I want if you click on the item after its found, it will open the file... how would you do that?
In the end we're all just the same
|
|
|
|
|
There's a selected item changed event on the list box, you'd use that to respond to a click on an item.
I'm not sure what you're after exactly if you know about the methods to recurse ? Do you need to know how to add an item ? It's list listBox.Items.Add, I believe.
Christian Graus - Microsoft MVP - C++
|
|
|
|