|
If you are developing in C#, then the Code Jock components would not be the best way to go. There are other vendors with calender type controls available here[^]. On the left side you can further filter the list depending on whether you are developing a WinForms or Web app.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Try Infragistics controls. They gel well with C# applications.
|
|
|
|
|
I've heard good things about Telerik RAD controls, both for Win.Forms and Web.Forms, the common criticism about Infragistics is that the controls are bloated.
|
|
|
|
|
I went with Devexpress. I'm very impressed with their product and especially their website tutorial support.
|
|
|
|
|
Hy,
How can I simulate a BackSpace on a RichTextBox in OnKeyPress or OnKeyDown methods?
thx
|
|
|
|
|
Write the following code in the RichTextBox's OnKeyPress or OnKeyDown event handler:
SendKeys.Send("{BACKSPACE}"); And that's it.
If you don't want the user to write text in the RichTextBox, just set it's property ReadOnly to true instead of doing this.
-- modified at 11:16 Thursday 27th September, 2007
Virtual1ty
"Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
Hello,
I think I've had it with trying to find topics that discuss this or either that I'm just simply lost. Posting here to see if someone can just point me in the right direction to at least get me started.
What I'm trying to do is take a common windows menu item (i.e. "New", with all of its subitems, "Folder", "Shortcut", seperator, "Bitmap Image", etc.) and take that entire MenuItem and insert that MenuItem (and it's functionality) into a Menu control on my C# form.
Looked at this article, which I think is what I want to be looking at.... but got hopelessly lost real fast: http://www.developerfusion.co.uk/show/3413/[^]
Note: I'm using C# 2008 Express - However, I use the System.Windows.Forms.MainMenu control instead of the MenuStrip control because I wanted to acheive the Vista look, and got it to work with the MainMenu, but just couldn't get the menuStrip control to work. So anywho, my code so far is revolving around the MainMenu control.
Thank you to anyone that can at least get me going in the right direction to figure this out.
-Jess
|
|
|
|
|
So you have a Menu control on a Form that has a New menu item with sub-menu items. And you want to include the New menu item in the system menu (e.g. the menu that has Restore, Maximize, etc.)?
If so this article[^] does a little better job of explaining it. But basically, you won't be able to just take the existing New menu and use it in the system menu. You will have to recreate the items in the system menu.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Almost, but not exactly, I have a Menu control on a form and I want to insert certain Windows Menus from such windows like explorer into this Menu. (The "New" menu with its subitems was an example, there's also other menu's in explorer that would be nice to grab like "Send To" and others.
A slight variation of what I'm trying was really well described within this incredible article which helped me out a lot during my project and it seems this guy did kinda what I'm looking to do with a contextmenu via right-cliking in a listview or folderview (explorer style application): Article[^]
Either way, you mention that I can't just pull the existing menu's in Windows into my Menu controls, which is what I was afraid of
Problem then is if I wanted a "Send to" or "New" menuitem in my menu control, then how the heck do I know what Items to display within those ... I guess I'd have to go out and read the registry, then insert them one by one through my code. Bleh, wanted the simple way out
Anyways. I think this helps me know better what I exactly can and can't do.
Thanks for the help Tom, much appreciated.
I'll probably abandon my idea of stealing the Window's menus into my application and just make them manually.
-Jess
|
|
|
|
|
i'm looking for a free site to download MCP exam details and model papers and also s ome meterials
|
|
|
|
|
How about here[^]?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
The main window of my application contains a large GroupBox, which itself contains a large "grid" of controls.
The number of "rows" and "columns" of controls varies, and sometimes I need to shift whole rows of them up and down as I insert new rows. I may have as many as 100 rows of controls, 10 controls to a row.
During this process, I'd like to delay redrawing of the Group Box while I reposition the controls. How can I do this?
I've checked out the GroupBox properties and methods; SuspendLayout() and ResumeLayout() are similar, but they only impact the Layout engine, not the repainting engine.
What's my best approach, here?
|
|
|
|
|
Create a inherited control from groupbox. Add a property to control the delay and if it can be repainted and on Paint overrided method check these properties...
Is this a valid solution? Ask me if you don't know how do it
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
Well, it's beyond what I *want* to do, yes... . I was certainly hoping that I was missing an obvious built-in solution. Perhaps setting a flag while I'm doing my layout, and putting some code into the existing GroupBox Paint event handler...
I'm probably not up to creating an inherited control at this point. Or too lazy to struggle through reading up on it, implementing it, and debugging it...
Thanks, though.
|
|
|
|
|
Did you try setting the visible property to false, rearrange the controls, then set it to true? This may produce a flicker though.
Are you laying out the controls once (e.g. during the load) or many times (e.g. based on user interaction)?
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
That causes the whole area of the GroupBox to flash at least once.
|
|
|
|
|
Try using the SuspendLayout and ResumeLayout methods. Call SuspendLayout before you add all of the controls and then ResumeLayout once you're done.
|
|
|
|
|
That's why I mentioned it in my post. It doesn't prevent painting, it prevents the Layout events from being fired. Since what I am doing doesn't normally cause Layout events for the group box (unless I cause it to autogrow), this doesn't prevent the controls from being visibly redrawn...
|
|
|
|
|
Sorry about that. I must not have seen the reference in your original post. You mention that you are placing controls in the group box in a "grid", what are you using to do this?
It sounds like you're doing this in order to prevent the control from flashing as you add new rows. Without handling the paint method yourself, I don't think there will be a way to do this.
You can do this pretty easily by creating your own GroupBox control. It should look something like this:
public class DelayPaintGroupBox : GroupBox
{
private bool paintAllowed;
public DelayPaintGroupBox()
: base()
{
}
protected override void OnPaint(PaintEventArgs e)
{
if (paintAllowed)
{
base.OnPaint(e);
}
}
public bool PaintAllowed
{
get
{
return this.paintAllowed;
}
set
{
if (this.paintAllowed != value)
{
this.paintAllowed = value;
}
}
}
}
|
|
|
|
|
Can anyone explain to me a simple way to write to controls from a thread that didn't create them. I've viewed the MSDN article and I just can't get it to work.
|
|
|
|
|
Here is an example using anonymous delegate:
public Boolean SafeEnabled {
get {
if (true == this.InvokeRequired) {
Boolean enabled = false;
MethodInvoker method = new MethodInvoker(
delegate {
enabled = this.Enabled;
});
Invoke(method);
return enabled;
}
else {
return this.Enabled;
}
}
set {
if (true == this.InvokeRequired) {
MethodInvoker method = new MethodInvoker(
delegate {
this.Enabled = value;
});
Invoke(method);
}
else {
this.Enabled = value;
}
}
}
Basically, you need to "Invoke" the method on the thread that created the control. You can use the Invoke method or the BeginInvoke/EndInvoke pair. The latter works like PostMessage in C++, the former works like SendMessage (if you are familiar with those).
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Use delegates to change control text.
public delegate void ChangeControlTextDelegate(string _NewText, Control _Control);<br />
<br />
private void ChangeControlText(string _Newtext, Control _Control)<br />
<br />
<br />
if (control.InvokeRequired)<br />
{<br />
ChangeControlTextDelegatedCallback dCallback = <br />
new ChangeControlTextDelegate(ChangeControlText);<br />
<br />
this.Invoke(dCallback, new object[] { "newtext", control});<br />
}<br />
else<br />
{<br />
control.Text = "newText";<br />
}
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
I do what the other two have said. I used delegates, and I use BeginInvoke().
The reason I use BeginInvoke is - if your method which contains Invoke gets called again before the first Invoke has returned, your application can hang.
BeginInvoke() is asynchronous. So if you aren't super worried about performance, or don't need complete synchronicity, I recommend this approach.
|
|
|
|
|
Thanks everyone, this seems clearer. For some reason microsoft's examples just confuse me. This is probably because I'm so inexperianced. Thanks again.
|
|
|
|