Hello,
I was wondering whether it would be possible to have a ListView, in which items can be selected as usual with one difference. When a ListViewItem is selected, I would like to see the selection in the text label, however I would prefer the image to remain the same. The reason for this is, that currently the blue selection drawn o...
My C# application has a comboBox with a SelectedIndexChanged event. Usually, I want this event to fire, but but sometimes I need the event to not fire. My comboBox is an MRU file list. If a file in the list is found to not exist, the item is removed from the comboBox, and the comboBox SelectedIndex is set to zero. However, setting th...
I'm having an issue on a C# project where when I click on the text box, the cursor always moves to the first position. Text can not be selected by click-dragging across the text either. Double clicking words will select text.
The only event I'm catching on the text box is Textchanged.
Anyone know what could be causing this?
Relevant C...
Hey All,
I am using WinForms & C# to access a SQL Server 2008 on my site which's hosted by winhost.com.
I am using the following code to connect to the database, which I figured out for myself:
try
{
SqlConnection scon = new SqlConnection(
"My ConnectionString Info is in here.");
scon.Open();
MessageBox.Show(scon.D...
What is the proportion of .NET developers who do WinForms/desktop development vs ASP.NET development? Is there very much overlap? Are they very different skill-sets?
...
Hi. I'm making simple image editer by C# winform.
I'm trouble with make zoom function. in other similar questions, many people simply suggest that 'change the size' such like..
Bitmap newImg = new Bitmap(oldImg, newWidth, newHeight);
But In this way, the picture become blured(is it cauesed by antialisng? I don't know well..) I need pix...
I am trying to load a custom column (code below) in datagridview in winforms, the custom column binds a integer value into it and displays the integer value along with a unchecked checkbox in it:
public class LabelledCheckBoxColumn : DataGridViewCheckBoxColumn
{
public LabelledCheckBoxColumn()
{
this.DefaultCellStyle.Ali...
Hi All,
I am successfully connecting to my sql 2008 server hosted on winhost.com. But I am following this tutorial: http://www.codeproject.com/KB/database/sql_in_csharp.aspx which was suggested in an answer from: http://stackoverflow.com/questions/3357374/connecting-to-sql-server-database-c-winforms and I keep getting the exact same err...
I know that when a drag/drop operation is completed, upon receiving a MouseUp or Esc key event, it returns an enum that indicates what happened (Move, Copy, None, etc.) My question is this: is there a way to send back status information to the form/control that initiated the drag event, while it is going on?
The use case is as follows (...
This is a winform C# problem.
I have an data object, say, Person. It has a property called Age and if Age is set to a negative value an exception will be thrown from its property setter.
On the form, the Age property is bound to a textbox using:
var binding = tbAge.DataBindings.Add("Text", person, "Age", true, DataSourceUpdateMode.OnV...
In WinForms I used the following block of code to stop the application gaining focus by being clicked on:
private const int WM_MOUSEACTIVATE = 0x0021;
private const int MA_NOACTIVATEANDEAT = 0x0004;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_MOUSEACTIVATE)
{
m.Result = (IntPtr)MA_NOACTIVATEANDEAT;
...
I have some Events I created on my own and was wondering on how to raise them when I want.
Probably my application design is also messed up, might take a look at that if you like.
This is the Structure
ProgramContext
- Form MainWindow
+ Control TextBox
+ Control Button
+ ...
In this case, the MainWindow.TextBox holds some inf...
I have an intermittent problem where I cannot create an instance of the System.Windows.Forms.Form class in my C# library. I log exceptions in my program, but unfortunately nothing was recorded for this problem. It might not be relevant, but my library, called via COM (i.e. there is no Main method).
So I threw a test exception, and it wa...
Hello everyone
In .NET Framework, there is only SplitContainer which contains 2 panels. I need a container which can contain multiple splitters and panels.
See my picture:
Please help me. Thanks.
...
Hi
Dows anyone know how I can build a timeout feature into a windows forms app.
The app is event driven, but I am thinking of somehow using a timer which counts down for say 10minutes, and one the timer ticks then we time out the user.
The problem I have is how can I reset the timer each time the mouse is moved or clicked.
Any help a...
Does anybody if there is a fisheye (menu/pane) windows forms control like it is often seen in Ajax applications:
example: http://interface.eyecon.ro/demos/fisheye.html
A googled around, but I only found this one at codeprojece:
http://www.codeproject.com/KB/menus/FishEyeMenu.aspx
...
I created a usercontrol with a treeview inside it. The treeview will be populated if I add nodes in the onload handler of the usercontrol. But after that(for example, I click a button in its parent form), the treeview will not refresh. I can see the nodes was updated in memory, but it just cannot display on the screen. I called refresh/u...
I would like to provide a textbox in a client WinForms application for setting up the body text of an email and I know there's the excellent Freetextbox for asp.net, but is there anything like it for Winforms?
...
I have a graphical application in which I move a graphic object with the mouse.
In some conditions, the object stops moving. I need then to stop moving the mouse cursor too.
Is it possible? MousePosition property seems to be in ReadOnly.
Eg.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
...
Hello,
I'm converting an app from ASP.NET WebForms to WinForms. There is one asp.net page which contains a ListView/Repeater that contains several custom controls, which in turn contain a ListView with other custom controls. Basically the layout looks like a TreeView, but on each node/leaf there are few controls like comboboxes, etc.
Wh...