|
I fianly knew how to add c a mschart to my form but i still don't knwo how to deal with it, i want to label the axis and pass the array whose data will be represented, cananyone help me!?!
|
|
|
|
|
When I add a string to a RichTextBox like this one:
"Rickard Andersson: Hello to you too, dude!"
Then I want to make the "Rickard Andersson:" bold (yes, I'm making a chat program) to give it a nice look... but how to make it bold!?!?!?!?!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
This is my sample code:
private void btnBold_Click(object sender, System.EventArgs e)
{
Font oldFont;
Font newFont;
oldFont = this.rtfText.SelectionFont;
if (oldFont.Bold)
newFont = new Font(oldFont, oldFont.Style & ~FontStyle.Bold);
else
newFont = new Font(oldFont, oldFont.Style | FontStyle.Bold);
this.rtfText.SelectionFont = newFont;
this.rtfText.Focus();
}
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Where in this code does "Rickard Andersson:" being bold?
I don't realy understand it... but I haven't tried it yet...
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Never mind!
I have figured it out how you mean with your code!
Now I know how!
Thank you Mazy!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Thanks!
In fact, I have several user controls, each one with different controls inside. I would like to create a loop for each user control, to go through inside controls one by one, no matter how many in there, and what they are, try to set readonly to true, catch exceptions if there is no such property. But such as combobox, does not have this property, but I still need to set it to readonly, how can I do it, and do you think this loop methodoligy will work?
Thanks a lot!
chris#
|
|
|
|
|
I have an idea for a program that would run in the background and then, when the user presses the windows key (in any application), it would come to the foreground.
Anyone know how I can do this?
|
|
|
|
|
http://www.codeproject.com/useritems/nishhotkeys01.asp
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
How to make Combobox, Radio buttons (group) read only?
Thanks!
|
|
|
|
|
I know that the RadioButton has an "AutoCheck" property. Setting that to "false" will make it so that the radio button won't change state when the user clicks on it.
I don't know how to make a ComboBox read only. Hopefully some of the more experienced developers will know.
Good luck.
- Sabran
|
|
|
|
|
Sabran wrote:
I don't know how to make a ComboBox read only
Combo boxes are read-only by default! Even if they have that edit box on top [which is easily removed by changing the style], the actual contents of the combo cannot be changed. Of course if someone wants to make it un-clickable, he can make it disabled.
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
My problem is regarding the refresh of the controls in .net (tree view).
In MFC I had a tool that loaded up all the folders of a drive and there size. This was done with a tree view control, in the main loop where all the folders were read, after that the new folder was added to the control or any text was changed, I just process any pending messages and the end result was excellent.
But in .net when I do the exact same thing each time that I add a new node or change the text of an old node (to update the size of the folder) the entire tree view is redrawn, I get the nice flickering effect… I process any pending messages with the “Application.DoEvents()” function, is that my problem? Is it a property I have to change?? I mean why in MFC I didn’t have to take this in consideration but in .net I have to??? In MFC when I added a new node or change the text of a node it just updated that node.
I’m kind of disappointed.
|
|
|
|
|
Try enabling double buffering and see if that helps.
The cause of flicker is that you can see each part of the window being redrawn, starting with erasing the current contents. If you enable double-buffering all the drawing will be done off screen, then once the drawing is done it will draw that image to the screen.
James
Simplicity Rules!
|
|
|
|
|
Thanks...
Did MFC had the double-buffering embedded in the controls? I never heard of double-buffering for MFC controls and they never flickered...
|
|
|
|
|
Don't know, both are wrappers around the Tree control provided by Windows so I would assume it wouldn't interfere too much.
James
Simplicity Rules!
|
|
|
|
|
I'm disappointed that I have to do extra stuff in .net to make the control look as they usually looked...
|
|
|
|
|
If you are adding many items, try using the BeginUpdate and EndUpdate methods on the TreeView.
|
|
|
|
|
It would work, but I want to see the list grow because I can take a while to read all the folders on a drive and I want browse them while the rest is loading.
|
|
|
|
|
I have an app that does something similar, and I think it's a lot nicer to load-on-demand rather that fill in the full control. To do this, you need to put a "pretend" node underneath each directory and then handle the expand event.
|
|
|
|
|
hi guys
i want to call ana exe when i press a button
i know that it's too easy bit i dont kn it !!!!
doudou
|
|
|
|
|
This should do it:
System.Diagnostics.Process.Start("ana.exe");
Nick Parker
|
|
|
|
|
I want to make a report in Crystal Report dynamicly. Anybody have some tips on how Can I create one directly by my C# program ??
I try to print a window form and it's work fine but the text in my TextBox is limited so I think I can get it using Crystal Report , but I don't know how to use it.
any documentation,Tutorial,Sample ???
Thanks
Jonathan Pouliot
|
|
|
|
|
|
Hi,
How do I create a COM component in C~ when i know the CLSID of the component, this CLSID is discovered in real-time so i can not add a reference to the DLL at compile time.
Cheers
|
|
|
|
|
The answer is....
Type comType = Type.GetTypeFromCLSID( new Guid( "12345678-0000-....") );
object comObj = Activator.CreateInstance( comType );
// if you have type infos (tlbimp/reference), try to cast:
YourCOMClass yourObj = (YourCOMClass) comObj;
// or for some special imported types, wrap:
// YourCOMClass yourObj = (YourCOMClass) Marshal.CreateWrapperOfType( comObj, typeof(YourCOMClass) );
To access remote by DCOM:
Type dcomType = Type.GetTypeFromCLSID( guid, "REMOTE_PC", false );
|
|
|
|