Hello,
I'm trying to build my own "PictureBox like" control adding some functionalities. For example, I want to be able to pan over a big image by simply clicking and dragging with the mouse.
The problem seems to be on my OnMouseMove method. If I use the following code I get the drag speed and precision I want, but of course, when I re...
I'm having trouble handling the scenario whereby an event is being raised to a closed form and was hoping to get some help.
Scenario (see below code for reference):
Form1 opens Form2
Form1 subscribes to an event on Form2 (let's call the event FormAction)
Form1 is closed and Form2 remains open
Form2 raises the FormAction event
In For...
Does anyone know where Control.ShouldSerializeVisible is called from? The Reflector does not show it used by anything and google came up empty.
...
I have a grid containing rows flagged with different priorities. I want to color the high priority rows red, low ones blue, etc.
I'd like to set the shade based on a mathmatically calculated gradient rather than arbitrarily assigning colors to specific priorities. How can I extract a single color from a single point along gradient?
...
This page indicates that TabPage has a GotFocus event, but in Visual Studio 2008 I don't see that option on the TabPage (it says it is inherited from the control, i.e. the TabControl).
What event would I use to write some code that runs each time a user clicks on a different tab? Would I use the GotFocus of the TabControl - but in tha...
With several forms of mine, I occasionally run into the following issue: I edit the form using the designer (Visual Studio 2008, Windows Forms, .NET 2.0, VB.NET) to add components, only to find out later that some minor adjustments were made (e.g. the form's size is suddenly changed by a few pixels), and controls get deleted. This happen...
I am running a Windows form application and I need to execute a piece of code when I switch to design mode. I have a handler for the OnEnterDesignMode debugger event and this gets hit if I am debugging the application and then switch to design mode. However, this does not get hit if I initially start without debugging and then switch to ...
I have Winform app I am writing in C#. On my form, I have a TabControl with seven pages, each full of elements (TextBoxes and DropDownLists, primarily). I pull some information in with a DataReader, populate a DataTable, and use the elements' DataBindings.Add method to fill those elements with the current values.
The user is able to ent...
In Visual Studio 2008, develop legacy windows form (not wpf), I wrote customized resource manager which fetched data from sql server rather than assembly. In windows form, there is property related to language setting. Once I change language, I want to form being updated automatically.
Is there any elegant way to hook up my resource ...
I have simple WinForms application where modifying Windows Registry. The problem is that in Vista / Windows 7 I need to force user to switch to administrator.
I do not want to force user to Run as Administrator form start of the application. I want him to do it when there is necessity to write to registry.
Best case scenario would be ...
hi
is it possible to paint line every empty line in DataGridView ?
ex:
123 | 444 | 555
123 | 555 | 666
333 | 555 | 666
666 | 777 | 888
it will be:
123 | 444 | 555
123 | 555 | 666
---------------
333 | 555 | 666
---------------
666 | 777 | 888
in WinForm - C#
thank's in advance
...
hi
consider we have 2 data entry win forms : form1 (parent) and form 2 child of that parent.
As all we know, we can simply declare virtual methods in order to be overridden by any child
in future.
my question is how to construct blueprint of the parent form methods? I mean every method should be virtual? or what?
Thank you
...
i have a event handler that moves the selected treenode up. I don't know why is crash in the line with comented.
treeviewdocxml is a treeview object, from System.Windows.Forms
treeViewDocXml.BeginUpdate();
TreeNode sourceNode = treeViewDocXml.SelectedNode;
if (sourceNode.Parent == null)
{
ret...
Hi,
I want to validate and commit the value entered in the DataGridViewCell ONLY when the user presses the 'Enter' key.
If the users presses any other key or mouse button (Arrow keys, Pressing a different cell using the mouse...), I want the behavior to be similar to the 'ESC' key: Move the focus to the new cell and revert the edited c...
Now my team working in a project using windows application(c#).
The application have a option for saving the username & password in the client machine for the current login user.so the user can start the application without entering username & password.I didn't have any knowledge in the windows application.Please check the snapshot of m...
I am using Yahoo Answers API to build a c# desktop application which goes to Yahoo Answers and search for any keyword you enter and it brings the list of questions and their users. I need to get Email Address of those users so that I can send message to them.
Anyone tried it ? It is possible ?
...
Hi, I have a really strange problem with Graphics.DrawImage method.
I have the PictureBox control in the Panel control with AllowScroll property = true.
The program cuts the image on small parts basing on the area selected by the user.
I load the image 300x547 and select the area (the red rectangle):
program properly cuts the image:...
I have an webbrowser control on my form. I am able display html files in that control. But my page contains some images if i give absolute path to it then images are displayed. But if i give relative path then images are not shown in the pages.
I have HtmlPages folder located at bin folder.
And i am assigning
FileStream source = new Fi...
Hi
Does anyone know if there is a way to get a list of controls that have the ErrorProvider icon active. ie. any controls that failed validation. I'm trying to avoid looping all controls in the form.
I'd like to display some sort of message indicating how many errors there are on the form. As my form contains tabs I'm trying to make...
I'm using Visual Basic 2010 Express.
I have a form that can be minimized.
There's also a tray icon.
I've coded it so that if you double-click on the tray icon, the form's FormWindowState becomes set to Normal; this restores the form to where was before it became minimized, but the form does not become the active window on my desktop.
Ho...