I have noticed an undesirable behavior with .net winforms applications. I have a wide screen monitor rotated 90 degrees to the portrait orientation. When .net winforms applications display on it, the window appears, but it is all blank, white. I can fix the window by hitting ctrl-alt-delete and when the dialog comes up, hitting cancel, t...
My goal is to have one main richtextbox in the form, and then several different richtextbox's in the backround, the backround textbox's get added, removed, and edited behind the scences all the time... and i need a way to swap my richtextbox in the form with the richtextbox's in the backround. what i origannally had was a Dictionary
Di...
Currently I have a DataGridView in my app which I fill from my Linq-to-SQL classes like so ...
/// <summary>
/// Delegate to update datagrid, fixes threading issue
/// </summary>
private void updateInfo()
{
// Linq to datagridview; display all
var query = from n in dbh.Items select n;
itemData...
I am using C#, Winforms, and .Net 3.5
My form has a custom DataGridView (double-buffered to prevent flickering during my cellformatting events, as seen here). When I perform a database search, I bind the resulting dataset to the datagridview.
I handle the CellFormatting event to paint rows a certain color, depending on their data.
My ...
I want to be able to access whatever Form hosts my control within the code of my Control, so like:
myControl.ParentForm
Is this possible? If so, how?
...
Hi All,
I have written and tested a WinForms application and everything works fine on my machine (cliche, I know). When I created a setup project and installed it on a co-worker's machine, he receives the following message:
************** Exception Text **************
System.IndexOutOfRangeException: There is no row at position ...
Is there a direct way to do this, or do I need to iterate over the DataGridView.SelectedRows, and then access DataGridViewRow.DataBoundItem for each row to create one?
...
Is there any way of changing the icon for an XNA game form (i.e. the one that appears in the top left corner of the form, and on the taskbar)?
I currently have a multi-icon with a variety of sizes embedded, including a 16x16 one. Unfortunately the project property "Application -> Resources -> Icon and manifest" uses the 32x32 one and sc...
Hi all,
I found a question that I belive is what I was looking for, but there were certain things that I was not following in the answers. Therefore, I'd like to ask the question in a different way (Thanks for your patience). Here is the link I am referring to:
http://stackoverflow.com/questions/259508/how-to-avoid-duplicating-logic-...
Hello, firstly I would like to thank you in advance for any assistance provided.
I am new to software development and have designed several Client/Server applications over the last 12 months or so, I am currently working on a project that involves a user logging in to gain access to the application and I am looking at the most efficient ...
Suppose I have a custom control like:
MyControl : Control
if I have code like this:
List<Control> list = new ...
list.Add (myControl);
RolloutAnimation anim = list[0];
I know I can do it at compile time but I wanna do it at runtime and access MyControl specific functionality.
...
Background
I have a Windows Form with the following items
ComboBox
TextBox
Two Buttons: Forward and Back
A class - Items which holds a string int and double members
if (ComboBox1.SelectedIndex == 2 && Items[index].Price > 50.00 )
{
txtManu.Text = Items[index].Manu;
txtPrice.Text = Convert.ToString(Items[index].Price);
}
...
I've dynamically added 20 pictureboxes to a panel. i would like to see the panel scroll when I use the mousewheel. I set the autoscroll = true on panel control. Here is the code.
For i As Integer = 1 To 20
Dim b As New PictureBox()
b.Image = Nothing
b.BorderStyle = BorderStyle.FixedSingle
b.Text =...
What is the proper way to replace one winform element with another element when something is triggered? For example, I would like to replace a button with a text box in the same position and the same dimensions.
...
On my main window I have a DataGridView that I wish to display my data. My application allows users to input, change, and delete data. I asked my friend the best method of doing this he said storing the information in an XML file. So now I am wondering on HOW to use XmlSerializer. Can I make an XML document or DataSet and give it values,...
I'm using msiexec.exe /x {GUID} to unistall my application, but it only shows "Are you sure you want to uninstall this product", how can I show the product name?
...
I need to know the exact point location in my window where the caret currently resides so that I can pop up a small window under the text (similar to intellisense or a spellchecker). The issue is that GetPositionFromCharIndex doesn't seem to work on TextBoxes. This is what I'm trying to do:
Point pt = mTextBox.GetPositionFromCharIndex...
I have written a simple program(Winforms.NET), that selects a random word from a dictionary (DB table) everyday. When the DB is embedded its fine, but if I want to make the program take the data from a remote server.
I suppose I have to put the ip address of SQL Server host into my connection string, but if host allows remote connectio...
changing the text of a label (or sophisticatedly we can say a text-based progress bar).
in winforms you just Invalidate / Update.
But how to do this in WPF without using Background Threads. ???
...
I am using SplitContainer and it contains only 2 panels but I need 3(panels).
QUESTIONS:
Is it possible to add more panels to SplitContainer?
if YES
how?
else
why not?
Thanks :-)
...