C#, fontdialog doesn't show up on windows XP - c#

I have a weird problem.
I am developing an application where the user can select a font from a fontdialog by clicking on a button.
The problem is when running on win XP the fontdialog doesn't show up. If I press ALT key it shows up (after I click on the font button).
I searched web for a solution and found a guy with similar problem and his quick solution was programmatically press ALT. Of course, how could I press ALT during/after fontdialog.ShowDialog()? It's not really clean, thought.
Thanks for any advice.
Petr

[resolved]
I had the buttons and stuff on a tabpage.
And in it's paint method I had something which didn't belonged there. After I commented it out, it works!
Thanks
Petr

Related

A display defect about keyboard shortcuts on buttons in a WinForm application developed by VS2013 and C#

I developed a simple WinForm application with C# & Visual Studio 2013.
For the Text property for every button on the only form, I put a '&' in front of whatever letter I want to use as shortcut letter. For example, I set the Text property of a Save button to '&Save'. Now, the hotkey 'Alt + S' will work for that Save button.
It seems to work well.
But I found a small & interesting display issue. There is no underline under the shortcut letter 'S'. All any other shortcut letters are displayed in this way, too.
To my surprise, once I have pressed any button with shortcut keyboard(i.e: Alt + 'S'), all shortcut letters of these buttons will become underlined soon! :-)
What's wrong? Is it a small bug of VS2013? Or anything else?
Any ideas? Thank you in advance.

Not getting tootip for devexpress form

Hi all,
Please help me,
i have already attached screen shot for problem
Screen 1:
on windows 7 if run cmd or Firefox or vs 2012 and on task bar on mouse hover it shows tool tip on top.
Screen 2:
but if we run any devexpress form then it is not showing tooltip for form .
please help me for the same. is their any property need to set or is their any code for that.
please help me.
Thanks in advanced.
Go to design view, select properties toolbar and look for Text and TitleText.
The same goes for WinForms with the exclusion of TitleText which is added by DevExpress.
The tooltip is automatic. It displays the window's title/caption. If your window does not have a title/caption, then nothing will be displayed.
To fix it, set a title/caption for your window. I'd tell you exactly how to do it, but the DevExpress online documentation is terrible and your question doesn't say which of their packages you're actually using.

Vista Style DropDownMenu with TrackBar

In Windows Vista/7's windows explorer, the Icon Size selector has got a track bar in the DropDownMenu (see Fig. 1)
Fig. 1: DropDownMenu with TrackBar in Windows Vista
Does anyone know where I can get a similar UserControl or show me how to replicate it in .NET?
NOTE: If anyone's wondering where the image came from, I captured it from Windows Vista's Windows Explorer when I clicked on the Views Button.
Edit
I realised that Trilian 5 beta also has something similar. I'll try to get a screenshot of it soon enough.
I have found an article at CodeProject. It allows such a menu. This will be of assistance to you.
WPF Slider Menu
http://www.codeproject.com/KB/WPF/WPF_Slider_Menu.aspx

How to display ok button at bottom in .net compact framework?

I am developing mobile application in C#. I am using the following code in my application to display the messagebox but the button ok is displayed at the top right corner. I want to display the ok button at the bottom. This is my code
MessageBox.Show("Records successfully inserted","Customer Entry",MessageBoxButtons.OK,MessageBoxIcon.None,MessageBoxDefaultButton.Button1);
Is anything wrong in my code? or should I need to do different things ? Can you please provide me any code or link through which I can resolve the above issue?
It is the standard MessageBox behaviour in the compact framework to display the OK button at the top right corner (unless, I think, you are on a Windows Mobile 6.5.x, in that case it would be displayed at the bottom).
The only way I can see of "moving" that OK button at the bottom would be to create a form and use it instead of the MessageBox. That means creating a kind of custom MessageBox class.
This is quite annoying i agree. Especially when working on small touchscreens where pressing the OK in the top right is difficult.
Since you just want to present the OK button id suggest using MessageBox.OKCancel instead and just treat any button press as OK. Setting anything other than OK will show the buttons at the bottom.
MessageBox.Show("Records successfully inserted","Customer Entry",MessageBoxButtons.OKCancel,MessageBoxIcon.None,MessageBoxDefaultButton.Button1);

How to Detect Right Click on the Taskbar

I've got a Windows Forms application in C# that starts off with a loading dialog. As expected, a button for the app shows up in the Windows taskbar.
I would like to detect right-clicks that might be done to that button.
Ultimately, I hope to disable the right-click or simply have the loading dialog regain focus. I've seen that some people use custom libraries and packages (interop, for example) to achieve some Win32 functionality, but I'd personally like to avoid this. Is it impossible to do without such libraries/packages?
How about just not showing the form in the taskbar by setting Form.ShowInTaskbar to false?

Categories