Subject |
Author |
Date |
|
Gunter Avenius
|
Jul 22, 2010 - 1:28 AM
|
Hello Support Team, vb2005, Elegant UI 3.7 I want a Linebreak in a Button with Image I set the Text: Button1.Text= "AAAAAAAA" & vbcrlf & "BBB" I want: AAAAAAAA
BBB I get: AAAAAAAA
BBB Thanks for yor help
Gunter
|
|
Technical Support
|
Jul 22, 2010 - 6:45 AM
|
Which value is assigned to the Button.TextAlign property?
|
|
Gunter Avenius
|
Jul 22, 2010 - 7:02 AM
|
Hello, here are a screenshot: 
Thanks
Gunter
|
|
Technical Support
|
Jul 22, 2010 - 7:14 AM
|
Thank you. We need 1..2 days to fix this issue.
|
|
Gunter Avenius
|
Jul 22, 2010 - 7:20 AM
|
Hello, Thanks, do you need a sample project? always the smaller Line are "Center" the Long Line are "Left"
Button1.Text= "AAAAAAAA" & vbcrlf & "BBB"
I get: AAAAAAAA BBB
Button1.Text= "BBB" & vbcrlf & "AAAAAAAA" I get:
BBB
AAAAAAAA Best regrads
Gunter
|
|
Gunter Avenius
|
Jul 22, 2010 - 6:53 AM
|
Hello, Button.TextAlign = MiddleLeft
Button.ImageAlign = MiddleLeft
Button.TextImageRelation = ImageBeforeText
Thanks
Gunter
|
|
Sublight Developer
|
Jul 21, 2010 - 12:12 PM
|
Ribbon tabs can be switched with combination ALT + shortcut key. Problem is that this switching works also with Alt Gr + shortcut key and this is wrong. For example, if you have shortcut "ALT + V" for View ribbon tab, and on some other tab you have textbox for entering email address and users enters Alt Gr + V for @ character, tab is switched :) I already reported this bug but it is still there.
|
|
Technical Support
|
Jul 22, 2010 - 5:19 AM
|
Thank you for reporting this issue. We are working on the fix.
|
|
Gunter Avenius
|
Jul 21, 2010 - 12:07 PM
|
Hello Support Team, vb2005, Elegant Ribbon 3.7 I have a BackstageView with 3 pages and 4 Buttons: Button "New"
Page "Open"
Page "Save"
Button "Edit"
Page "Help"
Button "Options"
Button "Exit" when I open the BackstageView the Page "Save" is selected. 1. How can I set Page "Open" as the default Page, when I open the BackStageView? 2. How can I select a Page via Code (vb2005) if I open the BackStageView? Thanks Best Regards
Gunter
|
|
Technical Support
|
Jul 22, 2010 - 5:18 AM
|
Please use BackstageView.CurrentPage property for both cases.
|
|
Gunter Avenius
|
Jul 22, 2010 - 5:23 AM
|
Hello, Thanks. Best regards
Gunter
|
|
Aleksander HribŔek
|
Jul 21, 2010 - 2:21 AM
|
I would like to place a TextBox (of course, Elegant.Ui.TextBox) inside a GroupBox so it would be in a center (vertically). If I try to change it’s location (.Location) it changes right back. Here’s a screenshot for a better understanding.
i31.tinypic.com/241a4px.jpg
Thank you.
|
|
Technical Support
|
Jul 21, 2010 - 8:57 AM
|
The RibbonGroup uses the flow layout so all the controls are grouped in columns. Though you can achieve your goal by setting a custom margin to the text box as follows:
textBox1.Margin = new Padding( 1, 25, 1, 5 );
|
|
Paddy
|
Jul 20, 2010 - 3:08 AM
|
Hi: I am using the Elegant.Ui.Label and also the System.Windows.Forms.GroupBox and I would like to know how I can apply the ForeColor of the Elegant.Ui.Label to the ForeColor of the System.Windows.Forms.Groupbox? The code I am trying to use is not changing anything for me. Any ideas? For Each ctrl As Control In Me.Controls
If TypeOf ctrl Is System.Windows.Forms.GroupBox Then
’Take the ForeColor of the Elegant Label and apply it to the
’Windows Forms GroupBox ForeColor.
ctrl.ForeColor = Elegant.Ui.Label.DefaultForeColor
End If
Next ctrl
|
|
Technical Support
|
Jul 20, 2010 - 4:54 AM
|
Actually, the DefaultForeColor property is not part of the Elegant.Ui.Label class. It belongs to the System.Windows.Forms.Control class.
|
|
Paddy
|
Jul 20, 2010 - 5:11 AM
|
If I type in Elegant.Ui.Label., intellisense gives me the property DefaultForeColor in the drop down menu. How am I going to be able to assign the ForeColor of the Elegant.Ui.Label to the ForeColor of the System.Windows.Forms.GroupBox?
|
|
Technical Support
|
Jul 20, 2010 - 5:34 AM
|
You can do that by using the following code instead: ControlSkin skin1;
Color color = Color.Empty;
if (SkinManager.TryGetSkin("Label", out skin1))
color = skin1.GetPaintInformation(ControlState.Normal).ForegroundColor;
|
|
Paddy
|
Jul 20, 2010 - 2:41 PM
|
This code doesn’t look like VB.net and when trying to use it, I get errors of undefined values all over the place.
|
|
Technical Support
|
Jul 21, 2010 - 4:10 AM
|
Here is the code in VB.NET:
Dim skin1 As ControlSkin = Nothing
Dim color As Color = color.Empty
If SkinManager.TryGetSkin("Label", skin1) Then
color = skin1.GetPaintInformation(ControlState.Normal).ForegroundColor
End If
GroupBox1.ForeColor = color
|
|
Paddy
|
Jul 17, 2010 - 2:03 AM
|
Hi: If I use the Visual Basic TextBoxBase class, I can access the .SelectAll member for TextBox and MaskedTextBox without an issue. However, if I try to do the same thing with your control, I am unable to access the .SelectAll() member. Any ideas?
Thanks!
|
|
Technical Support
|
Jul 19, 2010 - 7:44 AM
|
We have a bit different class hierarchy in Elegant Ui: ComboBox and NumericUpDown controls are also inherited from TextBoxBase class and it makes no sense for the latter two to have this method. Alternatively you can access this functionality as follows: Elegant.Ui.TextBoxBase myTextBoxBase = new Elegant.Ui.TextBox();
........
myTextBoxBase.TextEditor.SelectAll();
|
|
Shaine MaGuire
|
Jul 16, 2010 - 11:34 AM
|
I need to add a multiline text box to my form. I can do it with the Visual Basic TextBox by setting the MultiLine property to true; however, I am unable to find this in the Elegant.Ui.TextBox properties window. Please advise,
Thanks in advance.
|
|
Technical Support
|
Jul 19, 2010 - 9:12 AM
|
Elegant Ui TextBox has been featured with a multiline layout starting from version 3.3.
|
|
Paddy
|
Jul 16, 2010 - 5:01 PM
|
|
|
Technical Support
|
Jul 19, 2010 - 9:11 AM
|
It it should work in the way you described. You will not have to redo your application.
|
|
Paddy
|
Jul 20, 2010 - 3:04 AM
|
When I upgraded from v3.1 to v3.6, it blew up my whole application. No control references could be found so I deleted my project and started fresh.
|
|
Technical Support
|
Jul 20, 2010 - 4:53 AM
|
The only thing you should do is to update project references. There is no need to start the new project again.
|
|
Paddy
|
Jul 16, 2010 - 4:58 PM
|
Hi: I have just gone and purchased v3.6 of Elegant Ribbon.
|
|
Paddy
|
Jul 16, 2010 - 4:49 PM
|
I am using an old version it looks like. v3.1.
|
|
Technical Support
|
Jul 16, 2010 - 1:37 PM
|
The Elegant.Ui.TextBox does have the Multiline property. Which version of Elegant Ui are you using?
|
|
Ian Hinde
|
Jul 9, 2010 - 2:09 PM
|
When attaching a context menu to a ribbon button, if the application is running on a secondary monitor, then the context menu pops up on the primary monitor. Is there a fix for this?
|
|
Technical Support
|
Jul 10, 2010 - 2:08 AM
|
This bug is fixed in version 3.7, which is coming soon.
|
|
John Howe
|
Jul 8, 2010 - 12:48 AM
|
Hi Guys, Is there a zoom bar for the ribbon?. Traditionally this would go in Status bar in the Controls Area and get used to control the ’zoom’ on what is being displayed on the main form. Most of the ’opposition’ have one but I can’t find one in Elegant Ribbon. If you do not have one and do not intend to provide one, is there a suitable control ’out there’ that could be adapted?
|
|
Technical Support
|
Jul 8, 2010 - 2:51 AM
|
The control (slider/track bar) will be available in version 3.7, which should be released within a week or so. See the screenshot below.

|
|
John Howe
|
Jul 8, 2010 - 8:45 AM
|
Hi Guys, Excellent news, any hints at what else is comming? John
|
|
Technical Support
|
Jul 8, 2010 - 2:00 PM
|
The major new features of version 3.7 include:
1. Backstage view 2. Slider 3. Message box 4. PictureBox control 5. Memory usage optimization
|
|
John Howe
|
Jul 16, 2010 - 1:24 PM
|
|
|
Ian Hinde
|
Jul 6, 2010 - 11:33 AM
|
I have a ribbon control that contains one tab and several groups. As I only have one tab, is it possible to disable or hide the tab selector at the top, as it is redundant? Thanks
Ian
|
|
Technical Support
|
Jul 8, 2010 - 4:48 AM
|
This functionality is not supported at the moment. It is possible that we’ll add it in version 3.7 which is almost finished so please stay tuned.
|
|
Muhammad Siddique
|
Jul 6, 2010 - 2:16 AM
|
i am using the Elegent Ribbon controls in my desktop project but here the tap page show() method does not work , I want to show the tape page tabpageEmployee when i click on btnNew, but it does not work , can anyone help me
|
|
Paddy
|
Dec 30, 2010 - 11:28 PM
|
i am wanting to do something similar and the tabpage is not selected. any ideas? Private Sub pbAddReferrerType_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pbAddReferrerType.Click
’launch the form and auto select the TabPage
’frmApplicationSettings.TabControl_UserSettings.TabPage_ReferrerType
ShowFormInMDI(frmApplicationSettings, frmMain)
frmApplicationSettings.TabControl_UserSettings.SelectedTabPage.TabIndex = 6
End Sub
|
|
Paddy
|
Dec 31, 2010 - 4:28 AM
|
|
|
Technical Support
|
Jul 6, 2010 - 11:19 AM
|
If you mean a ribbon tab page, just use the code below: ribbon1.CurrentTabPage = tabpageEmployee; If you mean a tab control: tabControl1.SelectedTabPage = tabpageEmployee;
|
|
Alexander Kaay
|
Jul 4, 2010 - 7:40 AM
|
Greetings and Happy Fourth of July - The fix from last Monday eliminated all of the null reference exceptions and many of the cross-threaded control calls, however, some are still sneaking through. Please see the stack trace below. This one seems to be related to the tab page component. Also, Elegand Grid v3.6 CellButtons are still broken [in our application]: the grid does not emit CellButtonClick event when they are clicked, and when they are clicked, they get stuck in depressed state forever. -Alex
************** Exception Text **************
System.InvalidOperationException: Cross-thread operation not valid: Control ’TabControl1’ accessed from a thread other than the thread it was created on.
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.PointToClientInternal(Point p)
at System.Windows.Forms.Control.PointToClient(Point p)
at Elegant.Ui.Control.UpdateControlAffectedByMouse()
at Elegant.Ui.Control.ControlAffectedByMouseParent_LocationChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnLocationChanged(EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
----------------------------------------
Elegant.Ui.Common
Assembly Version: 3.6.0.0
Win32 Version: 3.6.0.0
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Elegant.Ui.Common/3.6.0.0__3a2b400713aae6e0/Elegant.Ui.Common.dll
----------------------------------------
Elegant.Ui.Grid
Assembly Version: 3.6.0.0
Win32 Version: 3.6.0.0
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Elegant.Ui.Grid/3.6.0.0__3a2b400713aae6e0/Elegant.Ui.Grid.dll
----------------------------------------
Elegant.Ui.Ribbon
Assembly Version: 3.6.0.0
Win32 Version: 3.6.0.0
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Elegant.Ui.Ribbon/3.6.0.0__3a2b400713aae6e0/Elegant.Ui.Ribbon.dll
----------------------------------------
Elegant.Ui.Ribbon.Theme.Office2007Black
Assembly Version: 3.6.0.0
Win32 Version: 3.6.0.0
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Elegant.Ui.Ribbon.Theme.Office2007Black/3.6.0.0__3a2b400713aae6e0/Elegant.Ui.Ribbon.Theme.Office2007Black.dll
----------------------------------------
Elegant.Ui.Common.Theme.Office2007Black
Assembly Version: 3.6.0.0
Win32 Version: 3.6.0.0
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Elegant.Ui.Common.Theme.Office2007Black/3.6.0.0__3a2b400713aae6e0/Elegant.Ui.Common.Theme.Office2007Black.dll
|
|
Technical Support
|
Jul 12, 2010 - 2:26 AM
|
Thank you for the bug report. This will be fixed in version 3.7, which is coming soon.
|
|
Reini ka
|
Jun 25, 2010 - 10:27 AM
|
Hi! I am dynamically adding controls to an Elegant.Ui.Panel and for making the controls outside the currently visible panel reachable I wanted to set the AutoScroll property. Unfortunately there is no such property. Is there an other way to make the panel scrollable? Or how do i modify a ’normal’ panel to appear like an Elegant.Ui.Panel? Regards, Reini
|
|
Reini ka
|
Jun 29, 2010 - 5:02 AM
|
|
|
Technical Support
|
Jun 28, 2010 - 10:21 AM
|
Unfortunately there is no way to make Elegant.Ui.Panel auto-scrollable now. We are going to add this functionality later in v.3.8. If you want Elegant.Ui.Panel to have scrollbars you can put Elegant.Ui.Vertical or Elegant.Ui.Horizontal scrollbars onto the panel and layout the scrollable content of the panel manually.
|
|
Alexander Kaay
|
Jun 25, 2010 - 8:25 AM
|
Hi, The previous fix for calls to controls from wrong threads has successfully eliminated the invalid control call exception, however, it now produces a different exception, although with somewhat reduced frequency: System.NullReferenceException occurred
Message=Object reference not set to an instance of an object.
Source=Elegant.Ui.Common
StackTrace:
at Elegant.Ui.Control.OnMouseMove(IControlInternal control, MouseEventArgs e)
at Elegant.Ui.Control.OnMouseMove(MouseEventArgs e)
at Elegant.Ui.FormFrame.OnMouseMove(MouseEventArgs e)
at Elegant.Ui.Control.Elegant.Ui.IControlInternal.InvokeMouseMove(MouseEventArgs e)
at Elegant.Ui.FormFrameSkinner.ProcessMouseMove(Message& m)
at Elegant.Ui.FormFrameSkinner.ProcessFormWndProc(Message& m)
at Elegant.Ui.FormFrameSkinnerMessagesSink.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at AVue.XUILogTableMulti.TIStart(LaunchSettings ASettings) in C:\AutoFET\AutoFET5\AutoMotion\X\UIForms\XUILogTableMulti.vb:line 196
InnerException: The end result is the same - the message pump thread bails out of Application.Run. The rest of the test case code is the same from last week. -Alex
|
|
Technical Support
|
Jul 5, 2010 - 2:01 AM
|
We tried but failed to get cell buttons stuck in pressed state. We would appreciate if you provide a test project illustrating this issue.
|
|
Alexander Kaay
|
Jul 5, 2010 - 4:51 AM
|
One more note re: test code that was emailed: you can easily modify it to make 20 or 50 forms as opposed to 2, which will make it fairly close to our test case for control thread safety issues.
|
|
Alexander Kaay
|
Jul 5, 2010 - 4:36 AM
|
I have emailed the sample code to support@prof-uis.com ... this forum does not appear to have a way to attach files. Thank you
|
|
Technical Support
|
Jun 28, 2010 - 10:59 AM
|
Thank you again for the bug report. Please try the updated assemblies below which include the fixes for the ribbon and grid:
elegant-ui-67978.zip
|
|
Alexander Kaay
|
Jun 30, 2010 - 3:58 PM
|
Thank you for getting the update out quickly - it appears to have cured the null reference errors completely. I have not seen the other exceptions either, but I haven’t not run the test cases yet (tomorrow). However, the CellButton click event is still not working on the grid v3.6, and the buttons still get stuck in the "pressed" state unless they somehow get refreshed (e.g. by disabling and turning them on again).The "regular" click event (inherited from Control) is working properly. -A
|
|
Alexander Kaay
|
Jun 25, 2010 - 9:04 AM
|
And one more detail (in case T.M.I. has not occurred yet) - the cell buttons on elegant.grid v3.6 are not working properly (or rather at all most of the time), maybe that’s related. They press, get stuck in pressed state and fail to produce the expected CellButtonClick event, although that is partially rectifiable by using the Click event (which does come) and then calling GetRenderableFromPoint to get to the cell. Is Elegant grid 3.6 some I ought to be even using? And if not, how do I make the old grid v1.3 look consistent with the new ribbon control?
|
|
Alexander Kaay
|
Jun 25, 2010 - 8:57 AM
|
Greetings again - I spoke too soon. The old exception is still around, except for in more limited circumstances:
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.PointToClientInternal(Point p)
at System.Windows.Forms.Control.PointToClient(Point p)
at Elegant.Ui.Control.PointToClient(IControlInternal control, Point point)
at Elegant.Ui.Control.PointToClient(Point point)
at Elegant.Ui.Grid.GridButton.OnInputSpyMouseUp(InputSpyMouseEventArgs e)
at Elegant.Ui.InputSpy.NotifyAboutMouseUpEvent(IInputSpyMouseListener[] listeners, MouseButtons buttons, Int32 x, Int32 y, IntPtr hwnd)
at Elegant.Ui.InputSpy.MouseHookProc(Int32 nCode, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at AVue.XFTimerCtrl.XTimerControlStart(delXStartupDelegate AStartupDelegate, Object[] AStartupArgs) This one appears to be related to button on a elegant grid that sits within a form with elegant controls. The grid is V3.6 from the elegant ribbon package. -A
|
|
Helmut Wahrmann
|
Jun 23, 2010 - 11:30 AM
|
I put a Elegant.Ui.Textbox as the last control into a Button Group and give it a minimum size of 25, so that i can see at least 3 digits, which have entered.
The TextBox overlaps the Control on the right side. Set the Right Margin of the TextBox to 5.
This is immediately reflected in the Designer. But when i run it, it is still the same problem, as if the margin wouldn’t be set.
|
|
Technical Support
|
Jun 25, 2010 - 3:11 AM
|
|
|
Technical Support
|
Jun 24, 2010 - 4:19 AM
|
Actually, a Button Group is supposed to contain only the following controls: Button, DropDown, SplitButton, and ToggleButton. Other controls may not work properly when they are put in a button group. Please send us a sample illustrating what you want to achieve.
|
|
Helmut Wahrmann
|
Jun 24, 2010 - 10:49 AM
|
In fact i have a button group with 2 buttons and a Textbox containing a maximum 4 digit number. When pressing the second button, which is left from the textbox, i want to use the number which has been entered in the textbox.
To be able to see all the 4 digits, i’ve set the MinimumSize for the TextBox to 25. Then i changed the Right Padding of the Button Group to 8, which was reflected in the designer. When running the code, the Padding of the button group is no longer there and the textbox overlaps the Ribbon Group and the next control, which is right of it.
I have a sample application built, but cannot attach here.
|
|
Gennadiy Stakhovskiy
|
Jun 18, 2010 - 12:35 AM
|
Good day, I need to insert a big picture in my screen tip. This will be some kind of help to user, when he moves the mouse over a button. But it looks like the image size is limitet. Maximum what it allows me to show is 294*432 px. Is there a way to increase image size? Thank you, Gennadiy
|
|
Gennadiy Stakhovskiy
|
Jun 21, 2010 - 11:36 PM
|
|
|
Technical Support
|
Jun 21, 2010 - 10:36 AM
|
Currently the image in a screen tip cannot be wider than 100 pixels. If the image width exceeds this limit, it is resized proportionally to fit the limitation. In the next release (3.7) we will add the feature of keeping the original image size. The new version is coming soon.
|
|
Alexander Kaay
|
Jun 14, 2010 - 9:25 AM
|
Hi, I have a multithreaded WinForms application, and there are multiple windows that run on their own message pump threads, that is, the window is created with code like this (start in NewTI): Public Class LaunchSettings
Public Self As FUIFaultTable
Public Title As String
End Class Public Shared Function NewTI(Optional ByVal ATitle As String = "Console") As FUIFaultTable
Dim tthread As System.Threading.Thread = New System.Threading.Thread(New System.Threading.ParameterizedThreadStart(AddressOf TIStart))
Dim tsettings As New LaunchSettings
tsettings.Title = ATitle
tthread.Start(tsettings)
Threading.Thread.Sleep(100)
SyncLock tsettings
Threading.Monitor.Wait(tsettings, 5000)
End SyncLock
NewTI = tsettings.Self
End Function
Private Shared Sub TIStart(ByVal ASettings As LaunchSettings)
Try
SyncLock ASettings
ASettings.Self = New FUIFaultTable
Threading.Monitor.Pulse(ASettings)
End SyncLock
ASettings.Self.Text = ASettings.Title
Application.Run(ASettings.Self)
Catch ex As Exception
X.AssertSoft(False, "Unhandled Console error", Nothing, , ex)
End Try
End Sub
In other words, the calling threads creates a new thread, which runs TIStart method, which runs the message pump in Application.Run, which exits only when the window is closed. There is also a simple notification to the calling thread that the window creation process in complete. This code is compliant with Microsoft’s guidelines, and all the methods within this form are suitably protected against cross-threaded class by InvokeRequired() ... BeginInvoke() constructs, again as prescribed by MS. Now to the problem: when Elegant.UI components (not necessarily the Ribbon, but for example a ToggleButton) are placed on this form, Application.Run throws an occasional exception with the following stack trace (always the same, always on the message pump thread, bounces out of Application.Run in the code snippet above): at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.PointToClientInternal(Point p)
at System.Windows.Forms.Control.PointToClient(Point p)
at Elegant.Ui.Control.PointToClient(IControlInternal control, Point point)
at Elegant.Ui.Control.OnPreviewMouseLeave(PreviewEventArgs e)
at Elegant.Ui.Control.Elegant.Ui.IControlInternal.InvokePreviewMouseLeave(PreviewEventArgs e)
at Elegant.Ui.Control.TunnelPreviewEvent(IControlInternal control, PreviewEventType eventType)
at Elegant.Ui.Control.OnMouseMove(IControlInternal control, MouseEventArgs e)
at Elegant.Ui.Control.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) This happens infrequently, but regularly enough, when mouse is moved over the controls. Frequency tends to be the highest when the window is being closed, for example if the "X" button is clicked and the mouse is accidentally moved over one of Elegant controls. Same for application shutdown, often times an exception will be thrown around the time when Form.Close is called. Overlapped windows increase the probability. It appears that, somehow, a mouse move event from one message pump/window is passed onto another window (which runs on a different message pump thread), and then the recipient window tries to process it, and that’s when the form throws the exception. I know of no way that the form that is running on the same message pump can throw this exception. And lastly, to answer the question as to why do we use multiple message pumps: we have a soft real-time application that regularly spikes the CPU. Lesser important GUIs are delegated to lower priority threads, that way the critical GUI elements do not get queued up behind long updates, such as table redraws. Thank you in advance, -Alex
|
|
Alexander Kaay
|
Jun 16, 2010 - 11:31 AM
|
Hi, The fix is installed and was added to GAC with gacutil, but it has no effect. I am getting exactly the same errors with exactly the same frequency, stack traces and locatons. It would seem to me that this is not a thread safety issue per se, this is an issue of routing the preview events from correct message pumps to correct windows, even though there may be only one thread involved. Do you need any more information from my side? Thanks, -A
|
|
Alexander Kaay
|
Jun 14, 2010 - 11:39 AM
|
I have another essentially similar stack trace, slightly more complete, this one happened when my application was trying to quit and close the windows, and the notable bit information here is that the main application thread was in Sleep(1000), which it does while waiting for the multithreaded windows to shut down. System.InvalidOperationException: {"Cross-thread operation not valid: Control ’’ accessed from a thread other than the thread it was created on."} at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.PointToClientInternal(Point p)
at System.Windows.Forms.Control.PointToClient(Point p)
at Elegant.Ui.Control.PointToClient(IControlInternal control, Point point)
at Elegant.Ui.Control.OnPreviewMouseLeave(PreviewEventArgs e)
at Elegant.Ui.Control.Elegant.Ui.IControlInternal.InvokePreviewMouseLeave(PreviewEventArgs e)
at Elegant.Ui.Control.TunnelPreviewEvent(IControlInternal control, PreviewEventType eventType)
at Elegant.Ui.Control.OnMouseMove(IControlInternal control, MouseEventArgs e)
at Elegant.Ui.Control.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at AVue.XUILogTableMulti.TIStart(LaunchSettings ASettings)
|
|
Technical Support
|
Jun 15, 2010 - 10:04 AM
|
Thank you for reporting this issue. We made some changes to the code to make PreviewXXX events thread safe. Please check the following fix (you should add it to the GAC manually). If something is wrong, just let us know.
elegant-ui-3.6-maximize-restore-button-fix.zip
|
|
Alexander Kaay
|
Jun 16, 2010 - 11:32 AM
|
Hi, The fix is installed and was added to GAC with gacutil, but it has no effect. I am getting exactly the same errors with exactly the same frequency, stack traces and locatons. It would seem to me that this is not a thread safety issue per se, this is an issue of routing the preview events from correct message pumps to correct windows, even though there may be only one thread involved. Do you need any more information from my side? Thanks, -A
|
|
Andre Schardong
|
Jul 25, 2011 - 10:18 AM
|
Hi Alexander,
Did you solve your problem? Im getting same error msg with version 4.2
Thank you,
|
|
Technical Support
|
Jun 18, 2010 - 5:30 AM
|
We made some additional fixes to improve interoperability between Elegant Ui controls in multi-thread environment. Please try out the updated assemblies.
elegant-ui-3.6-multithreading-fix2.zip
|
|
Alexander Kaay
|
Jun 14, 2010 - 9:29 AM
|
Oops... I forgot the exception type, it is
InvalidOperationException "Control xxx accessed from a thread other than the thread it was created on."
|
|
Marc B.
|
Jun 6, 2010 - 7:44 AM
|
Is there any way to use the Elegant UI ContextMenu combinated with a System.Windows.Forms.NotifyIcon? I just used ContextMenu.ShowWithoutOwner(), but there’s no way to position the ContextMenu at a specified place?
Marc
|
|
Technical Support
|
Jun 9, 2010 - 4:20 AM
|
We’ll probably add this functionality in a later release rather than in 3.7.
|
|
Marc B.
|
Jun 8, 2010 - 1:48 PM
|
Thank you very much, that helped me out!
But, is there any way to implement this little future in the next update? This would make it a little easier to handle for something like that...
Mark
|
|
Technical Support
|
Jun 7, 2010 - 7:42 AM
|
Please download this sample project that demonstrates what you would like to achieve.
|
|
Helmut Wahrmann
|
Jun 4, 2010 - 9:04 AM
|
A ToggleButton has the Command Property, because it inherits from Button.
But the assigned Command is not executed.
I know that i can listen on the PressedChanged event, but being a Button it should also fire a Command
|
|
Technical Support
|
Jun 7, 2010 - 6:52 AM
|
Actually the Command property is inherited from the Elegant.Ui.Control class which is the base class for most of Elegant Ui controls. Though, each control has a Command property, it does not necessarily means it supports commands. As for ToggleButton, it supports command in a different way than the Button: it doesn’t raise the Command.Execute event, instead it raises the Command.DataChanged event. This is because ToggleButton doesn’t start an action, it holds and changes its boolean state.
|
|
Helmut Wahrmann
|
Jun 1, 2010 - 4:21 PM
|
I have the ribbon in a UserControl, which is placed on the Main Form.
in my Main Form i have: "protected override void OnKeyPress(KeyPressEventArgs e)" and "protected override void OnKeyDown(KeyEventArgs e)" to capture various key strokes.
Seems the ribbon is consuming all keypress and keydown events. I’m not getting them in my form anymore.
|
|
Technical Support
|
Jun 2, 2010 - 4:39 AM
|
We think that the problem isn’t related to the ribbon. The keyboard events are only passed to the control which currently has a focus. When you put different controls onto the form they can gain focus and receive keyboard strokes instead. Try using ProcessDialogKeyMethod like it is shown below: protected override bool ProcessDialogKey(Keys keyData)
{
KeyEventArgs e = new KeyEventArgs(keyData);
Keys myKey = e.KeyCode;
return base.ProcessDialogKey(keyData);
}
|
|
Helmut Wahrmann
|
Jun 2, 2010 - 1:50 PM
|
Yeah, it was another control stealing focus. However your suggested method didn’t solve my problem.
I found 2 other solutions, which both worked for me:
1. On the Mainform set the KeyPreview property to true, then the form will receive keys before any other
2. use "protected override bool ProcessCmdKey(ref Message msg, Keys keyData)" in stead of OnkeyDown and OnKeyPress overrides
thanks anyway for your support
|