Is there anyway to prevent the cursor (IBeam) of a read-only RichRextBox from blinking whenever the textbox got focus?
I've tried to block the WM_SETFOCUS message from the WndProc but it causes the form to hang.
if( m.Msg == 0x0007 ) return;
...
I'm trying to print out a DataGridView using a PrintDocument. In my PrintPage event handler, I use the e.Graphics object to draw some grid lines, then print some text in the "cells" created -- as an aside, this really should have been done by Microsoft, but I digress.
Anyway, this works just fine. The PrintDocument is tied to a PrintP...
Hi,
is it possible to overlay a control (lets say a rich text box or a link label) over onother control at a specific position on a Winform?
I have did some test with GDI+ but without luck...
...
I have a strange bug, please, let me know if you have any clues about the reason.
I have a Timer (System.Windows.Forms.Timer) on my main form, which fires some updates, which also eventually update the main form UI. Then I have an editor, which is opened from the main form using the ShowDialog() method. On this editor I have a PropertyG...
How can I properly access the web browser control from within myFunct()? Main.myWebBrowserControl & Main::myWebBrowserControl don't work.
namespace foo{
public partial class Main : Form{
public Main(){
InitializeComponent();
// Do some things...
MyFunct();
}
public static void MyFunct(){
myW...
I have a stand-alone WinForms application, let's call it "Program A." Program A let's a user create a file and save some information to it. Program A also exposes some public classes.
Another stand-alone WinForms application ("Program B") references Program A, and uses some of its public classes.
However, some of Program A's classes n...
We are developing an RetailPOS .net (windows) application.
One of the customer asks 'What will happen to current data being processed in the application when a power went off suddenly?', 'Will the application able to recover the unsaved data?'
I am wondering, how this feature can be included in the .net application?
Can some help m...
Yesterday I wrote a piece of code to remove all the controls in a form that fulfills certain criteria. Writing it naively, this is what I come up with.
for (int i = 0; i < this.Controls.Count; ++i)
{
if (this.Controls[i].Name.Length == 2)
{
this.Controls.Remove(this.Controls[i);
}
}
But it so happens that the code ...
Hi all,
i have this code to show in a panel images with a pIctureBox :
private void ARR(int cNumber, string exc)
{
int Xpos = 8;
int Ypos = 8;
Image img;
Image.GetThumbnailImageAbort myCallback =
new Image.GetThumbnailImageAbort(ThumbnailCallback);
imgArray = new System.Windows.Forms.Pi...
If we export to Excel from the ReportingServices reports web site, the user gets an option to Open/Save/Cancel. However, the reportviewer control for winforms does not give the Open option. The user has to save the file and then open it manually.
I'm wondering if someone else has already crossed this bridge and might be able to save me...
My client wants that when tabbing through DataGridView cells the next current cell to be other than the default one. What's the best way to accomplish this?
...
(my first question!) Can anyone tell me why, in winforms, layered transparent regions lose their transparency and show black in formerly transparent areas?
These forms are shown as a modal dialog that has been launched from a modal dialog. (2 deep) In this application, modal dialogs are shown in a shadow box effect, so the entire sc...
I have the following code under a TabConttrols DrawItem event that I am trying to extract into a class file. I am having trouble since it is tied to an event. Any hints or pointers would be greatly appreciated.
private void tabCaseNotes_DrawItem(object sender, DrawItemEventArgs e)
{
TabPage currentTab = tabCaseNot...
There is a timer on the form and in its Tick event there is this line of code:
this.BackColor = ColorTranslator.FromHtml("#" + ColorCodesBack[_index]);
CurrentColor = ColorTranslator.FromHtml("#" + ColorCodesFore[_index]);
SolidBrush sb = new SolidBrush(CurrentColor);
g.FillEllipse(sb, this.Width/2 -200...
In IE7 there's a "zoom" feature built-in (show in the status bar), allowing you to zoom in up to 400%. I'm using the WebBrowser .NET control in a demo/simulation app, and need to zoom in on a web page. Is this at all possible?
(I don't want to simply take a picture of the page and enlarge it, as I need to use the links and buttons on th...
I'm running a (mostly) single threaded program (there's a main thread that does everything, the others only read stuff). I can get the application to run fine in VS2008 after a minor change (I changed the text of a form, and tab order of another form), but I can no longer get it to work outside of the debugger. Does anyone know what woul...
I am working with a WinForm application that was designed by the previous, now unreachable, develeper. In this app farms are embedded in TabControls through some custom code. My question is, Can anyone help to try and explain why there is a custom _Paint() function in each form that is called from the Load event for that form.
This ...
Ok, I have googled, but maybe I put my search in weirdly. :/
I have a VB.NET WinForms application. I have the anchor properties set for all the controls so that it will resize all the controls to look decent when the form is maximized. (Haven't gotten around to manual resizing yet however).
Anyway, the problem:
I go to set the same pr...
Question says it all - is there a class somewhere in Windows Forms that has the same functionality as the WPF System.Windows.Input.Keyboard? Or am I stuck always having to handle the keyboard events and keep my own state? (I'm specifically interested in a Forms analogue to IsKeyDown).
Alternatively, is there a no-fuss way to use this ...
How do I bind a ProgressBar to a property of a class updated in another thread?
The following code example shows my first naive attempt. It doesn't work because I get runtime errors about cross thread communication. I think I need to use Invoke in some way, but I'm not sure how to do it with the Binding class.
using System;
using Syste...