|
Unfortunately you're going to run into a wall when trying to make the TabControl double buffered. You can get the tab area itself to double buffer by extending the TabControl and setting this.DoubleBuffered = true, but that still won't fix the flicker in the tab pages themselves.
At that point it makes more sense to write your own tab control, given the amount of effort you'd go to to extend the existing one just to double buffer it.
------------
Cheers,
Patrick
|
|
|
|
|
There seems to be growing dissatisfaction with the lack of control people have over the TabControl. It looks like it may be heading in the same direction as that nasty little piece of work, the ListView.
|
|
|
|
|
Brady Kelly wrote: There seems to be growing dissatisfaction with the lack of control people have over the TabControl. It looks like it may be heading in the same direction as that nasty little piece of work, the ListView.
Absolutely. I've already abandoned both controls and use custom solutions now (not ones I wrote, 3rd party controls, but free with source code). I just got so fed up with trying to shoehorn them into doing what I wanted that I decided to stop wasting my time and went with something that actually works the way I want it to.
The ListView in particular is nasty. It's so seductive, so seemingly easy to create a list-based data presentation, and yet if you try to do even SMALL things outside of what it was designed for you quickly run into multiple impossibilities.
------------
Cheers,
Patrick
|
|
|
|
|
Patrick Sears wrote: The ListView in particular is nasty. It's so seductive, so seemingly easy to create a list-based data presentation, and yet if you try to do even SMALL things outside of what it was designed for you quickly run into multiple impossibilities.
It's also just plain damn ugly.
|
|
|
|
|
Patrick Sears wrote: get the tab area itself to double buffer by extending the TabControl and setting this.DoubleBuffered = true, but that still won't fix the flicker in the tab pages themselves.
can u explain these statments please
thanx
Generator
|
|
|
|
|
hi all
i think that i found a method that i can use
using drawing in memory as bitmap and then draw my background in the bitmap and draw bitmap again to the screen
can any one tell me how to begin search how to use this technique
thanx
Generator
Generator
|
|
|
|
|
Hello
I wrote a string appender class in c# that appends to a string until it finds a certain
group of characters. It then fires off a delegate with the completed string after the characters have been found and clears the text from the object. I'm receiving data from sockets and the carrage returns and line feeds I'm getting are in a unicode like format such as \0a or \0d. How do I search for those characters using the below class.
#region StringAppender
public class StringAppender : TextBox
{
ErrorLogging Err = new ErrorLogging();
public StringAppender()
{
this.Multiline = true;
}
public delegate void TextReceived(string Value);
public event TextReceived TextDataReceived;
private delegate void SetTextCallBack(string Text,bool AppendText);
public string TextBox
{
get
{
return this.Text;
}
set
{
SetText(value,false);
// this.Text = value;
}
}
private void SetText(string Text,bool Append)
{
SetTextCallBack SCallBack = new SetTextCallBack(SetText);
if (Append == false)
{
if (this.InvokeRequired)
{
this.Invoke(SCallBack, new object[] { Text,Append });
}
else
{
this.Text = Text;
}
}
else
{
if (this.InvokeRequired)
{
this.Invoke(SCallBack, new object[] { Text, Append });
}
else
{
this.Text = this.Text + Text;
}
}
}
public void AppendText(string Text, string[] ValuesSearched, bool FirstRun)
{
//Text = Text.Replace("\0", "");
if (Text.Length > 0)
{
try
{
//this.Text = this.Text + Text;
SetText(Text, true);
foreach (string Str in ValuesSearched)
{
//if (this.Text.IndexOf(Str) != -1)
//{
// TextDataReceived(this.Text.Substring(0, this.Text.IndexOf(Str)));
// //this.Text = string.Empty;
// SetText(string.Empty, false);
//}
if(this.Text.Contains(Str))
{
TextDataReceived(this.Text.Substring(0, this.Text.IndexOf(Str)));
SetText(string.Empty, false);
}
}
}
catch (Exception Ex)
{
throw Ex;
}
}
}
public void AppendText(string Text, string ValueSearched, bool FirstRun)
{
//Text = Text.Replace("\0", "");
if (Text.Length > 0)
{
try
{
//this.Text = this.Text + Text;
SetText(Text, true);
if (this.Text.IndexOf(ValueSearched) != -1)
{
TextDataReceived(this.Text.Substring(0, this.Text.IndexOf(ValueSearched)));
//this.Text = string.Empty;
SetText(string.Empty, false);
}
}
catch (Exception Ex)
{
throw Ex;
}
}
}
}
Jason E Cain
|
|
|
|
|
If I want to save in a variable the name of my actual file(name which i saved it before), how I can do that?
|
|
|
|
|
once u get the complete path get the the last index of "\" and then use substring just to get the file name and store in the variable
|
|
|
|
|
When filling a dataset with a table I use first FillSchema() and then Fill().
Here is my problem:
Table A has had say 1000 records in it. Those records have no been deleted before filling the dataset with Table B. So the next ID of an autofield would be 1001. Okay, but when I fill the dataset the Table A while Table A is in memory it has a starting ID of 0. So, now if I have Table A and Table B in a dataset and I am placing the ID from Table A into Table B as a FK, when the database is then updated with Table A and Table B. Table B will have false IDs for Table A.
How can you fill the dataset with Table A so that it the ID would be set to the next ID in the database would be? So that the IDs matched.
|
|
|
|
|
I found that for a SQL database using
SELECT IDENT_CURRENT('{owner}.{tablename}') AS '{whatever}';
will return the last used/inserted ID for that table. -Not the next ID but the current/last used ID.
Here is a link:
http://msdn2.microsoft.com/en-us/library/ms175098.aspx[^]
Still need to figure out a method for Access databases.
God Bless,
Jason
Programmer: A biological machine designed to convert caffeine into code. Developer: A person who develops working systems by writing and using software.
[ ^]
|
|
|
|
|
Hi,
Basicly, i'm creating a graphical based control that displays the relationships of different data types.
The way i currently do it is to go through 2 data types in a foreach loop, which gives me data that i can use to get other data type structs.
eg - not my code just abit pf pseudo example:
foreach (Node node in MainDataType1)
{
Struct structInfo = node.GetStruct();
Node dataType1 = CreateNode(node, structInfo);
Struct structInfo2 = node.GetStruct();
Node dataType2 = CreateNode(node, structInfo2);
Relationship rel = CreateRel(dataType1, dataType2);
}
The above code would create the "left hand side" of the model. I would then go through the 2nd main data type with the same format of code to create the "right hand side".
The problem is, i need to create objects that arnt related, eg if a relationship is lost between 2 data types for some reason, then i wont create the node, because the struct wont return me any information for it.
I've throught of going through all the data types and creating the nodes after i've done the 2 above peices of code, and checking to see if i've created that node.
eg:
foreach (Node node in MainDataType1)
{
foreach (Node node1 in GraphNodes)
{
If (node1 != node)
{
CreateNode();
}
}
}
The problem i see with the above code is it will be time consuming and not practical as i'm going through all the data types more than once which seems silly to me.
Any ideas?
Regards,
Gareth.
|
|
|
|
|
One approach could be to create a list that contains all of the nodes, and then everytime you add your related nodes you would remove them from this list. Whatever is left in the list is the missing nodes.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello,
My new project is to write a Script Editor in C# using Visual Studio. The script editor should be similar to notepad, simple text editor, however, with this main features:
Syntax Highlighting (Example - http://img248.imageshack.us/img248/9230/untitledtd2.png)
Syntax Highlighting Rule:
// = A comment, anything after it shud be orange
*.gat = anything written with the extention .gat is a map name, so it shud be green
numbers = any numbers shud be colored blue
script = this text be colored red (optional)
set, mes, etc... = are script commands and shud be made bold
next, close = functions used to do something with chat window, shud be colored grey
"text" = anything inside " " should be colored brown as its text
Thats about it, one other feature if possible is this:
{ = on type and press enter, auto tab
How can i get started on writing something like this? Any idea, step up, guide on this project would be much appreciated. Thanks in advance for any help.
|
|
|
|
|
Get a copy of the ebook from the SharpDevelop team that tells you about the issues and challenges that they faced when writing SharpDevelop. It has plenty about the architecture and the decisions that they took, so it's a really good fit for your needs. Best of all, I believe that it's free.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks for the suggestions guys, i started to do some research while i was waiting for a reply and foundout about the great built-in highlighting feature in .NET
I'll post here if i come across any problem whilst using that. Thanks allot again~
|
|
|
|
|
Hi...
I have a picturebox and I want that when the user scroll the mouse, the Picture act like this.
I found some code>
MouseHelper mh=new MouseHelper(this);
mh.WheelBackward+=new MouseEventHandler(OnWheelBackward);
mh.WheelForward+=new MouseEventHandler(OnWheelForward);
But, what do I write inside this>
private void OnWheelBackward(object sender, MouseEventArgs e)
{
//???????
}
Waiting for help..
att..
("sorry for the bad english")
thanks...
|
|
|
|
|
The Brazilian One wrote: I have a picturebox and I want that when the user scroll the mouse, the Picture act like this.
You want the picture to do what?
|
|
|
|
|
I want that it scrolls on the screen... Up and Down...
Thanks..
Cheers
|
|
|
|
|
Let me explain...
I have a Panel and inside it, a PictureBox...
The Panel is set as "auto-scroll"...
I want that when the user scroll the mouse, the pic moves inside the panel..
well, that`s it...
=D
thanks all!
|
|
|
|
|
Put a panel on your form. Set it's AutoScroll property to true. Then place the picture box in there. When you set the image for the picture box, set the size of the picture box to the same size of the image. The scrollbars will appear automatically, and the mouse wheel should automatically scroll, no code required.
|
|
|
|
|
But the mouse wheel didn`t automatically scroll!!
=/
|
|
|
|
|
|
Application has encountered a problem and needs to close.
1. My code debugs and runs perfectly fine.
2. I publish my application to a shared file server.
3. I log on to the target machine and browse to the folder I published my application files.
4. I click the setup.exe
5. It begins verifying application requirements.
6. Are you sure u want to install this application dialog pops up - Install or Don't Install button
7. I click the install button.
8 Acts as if it begins to install then Error -
{APPLICATION NAME} has encountered a problem and needs to close. We are sorry for the inconvience..
9. Button that says Send Error Report and button that says Dont Send
10. Also hyperlink on form that says "What data does this error report contain"
11. If i click the link gives me some wierd information - keywords in the info below
Event Type: clr20r3 Mscorlib system.io.directorynotfound
It does not tell me what the problem is.
I am clueless. can somebody help me please.
1.0 and 2.0 .net framework installed on target machine.
Thanks in advance
Kourvoisier
|
|
|
|
|
It looks as though the directory it is attempting to install into doesn't exist.
Deja View - the feeling that you've seen this post before.
|
|
|
|