Search Results

Search found 3559 results on 143 pages for 'winforms interop'.

Page 14/143 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • WPF UC in Winforms occasionally has an odd border to the left / visually corrupted

    - by Ryan ONeill
    I have a WPF user control I created that is used to show the state of tasks in my UI. I get the odd report back that the control sometimes has a nasty looking border to the left and I cannot reproduce it. The control looks like this (when working) (grey tick=not run, green=OK,red cross=fail,hourglass=running); It looks like this when the problem occurs; It may have something to do with the layering of those icons, when the state changes the others are made invisible and the relevant icon is made visible. The four icons are all stacked on top of each other. It could also be the background in theory, which I'll look at next. Problem is reported on both flat panel and CRT displays. Any guidance greatly appreciated. Update: 1) SnapsToDevicePixels does not affect the issue. 2) Grid is not used, only a canvas.

    Read the article

  • WinForms equivalent of performSelectorOnMainThread in Objective-C

    - by jamone
    I haven't done much multithreading before and now find the need to do some background work and keep the UI responsive. I have the following code. data.ImportProgressChanged += new DataAccess.ImportDelegate(data_ImportProgressChanged); Thread importThread = new Thread( new ThreadStart(data.ImportPeopleFromFAD)); importThread.IsBackground = true; importThread.Start(); void data_ImportProgressChanged(int progress) { toolStripProgressBar.Value = progress; } //In my data object I have public void ImportPeopleFromFAD() { ImportProgressChanged(someInt); } But the UI doesn't get updated since the ImportProgressChanged() call is made on the background thread. In objective C I know you can use performSelectorOnMainThread and pass it a method to call using the main thread. What is the equivalent way of calling ImportProgressChanged() from the main thread?

    Read the article

  • winforms - gridview cell timespan edit problem

    - by Sharique
    I'm following this question for formatting timespan value in the gridview. Format TimeSpan in DataGridView column I'm diaplying only minutes value in grid as follows DataGridViewColumn idleTimeColumn = myGridView.Columns["IdleTime"]; idleTimeColumn.DefaultCellStyle.FormatProvider = new TimeSpanFormatter(); idleTimeColumn.DefaultCellStyle.Format = "m"; This cell is editable, so when I enter 5 (that mean 5 min) in the cell, then it should take it minute, but it take it as day value (ie, 5.00:00:00). I tried different values for format (mm,%m) but all these gives the same output.

    Read the article

  • c# winForms toolTip forever

    - by jello
    Do you guys know how to set a toolTip that doesn't go away as long as you're hovering on the control? I tried setting the "AutoPopDelay" to 999999, but the tooltip disappears after 15 seconds. Or, do you know of another way to achieve the same effect?

    Read the article

  • How come nobody wrote RadioMenuItems class for Winforms?

    - by Pavel Radzivilovsky
    Or maybe google is just not so friendly to me? What I want is this simple thing: constructor that accepts an array of menu item objects Value get/set property that would set all the Checked properties right bind to all Clicked events of the supplied items and provide One event Working DataBind facilities If you encountered such a nice thing around, please direct me. No need for manual do-it-in-your-form1.cs-class links, please. This I can do myself.

    Read the article

  • Winforms: How to display a "loading" form?

    - by Martijn
    I have a grid and when a row is double clicked a form is loaded. However a lot of data must be loaded, so I'd like to display a simple form with the text 'loading, please wait..'. And when all loading is finished, the form must disappear. This is what I have right now, but it doesn't work: Code that invokes the form with lots of data: FormWithLotData form = new FormWithLotData(); form.ShowDialog(this); Constructor of FormWithLotData: // Show load form FormIsLoading frm = new FormIsLoading(); _CloseLoadForm closeForm = new _CloseLoadForm(frm.Close); System.Threading.Thread thread = new System.Threading.Thread(frm.Show); thread.Start(); InitializeComponent(); this.Visible = false; LoadAllData(); this.Visible = true; // Close load form Invoke(closeForm); Hope you can help me out. EDIT: I'd like to show an animated gif on the loading form.

    Read the article

  • WinForms: Making a set of controls scale vertically.

    - by DonaldRay
    I have a Windows Form that displays several DataGridViews in the following layout: (No access to image hosting at work, so please pardon the ASCII art...) +-----------------------------------------+ ¦+-----------++--------------------------+¦ ¦¦ ¦¦ ¦¦ ¦+-----------+¦ ¦¦ |+-----------+¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦+-----------+¦ ¦¦ |+-----------+¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦+-----------++--------------------------+¦ +-----------------------------------------+ Unfortunately, when the user resizes the form to be taller, the form ends up looking like this: +-----------------------------------------+ ¦+-----------++--------------------------+¦ ¦¦ ¦¦ ¦¦ ¦+-----------+¦ ¦¦ | | || | | || |+-----------+¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦+-----------+¦ ¦¦ | | || | | || |+-----------+¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦+-----------++--------------------------+¦ +-----------------------------------------+ Instead of this: +-----------------------------------------+ ¦+-----------++--------------------------+¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦+-----------+¦ ¦¦ |+-----------+¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦+-----------+¦ ¦¦ |+-----------+¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦+-----------++--------------------------+¦ +-----------------------------------------+ To reproduce this, anchor the Top-Left DataGridView to Top-Left, the Center-Left DataGridView to Left, and the Bottom-Left DataGridView to Bottom-Left, and the big DataGridView to all 4. What can I do to get the behavior I want?

    Read the article

  • Unselect Databound Combobox Winforms .NET

    - by joedotnot
    The problem: combobox is databound to a DataView, first item in the dataview is DataRowView whose fields are DBNull.Value; Combo DropdownStyle = ComboBoxStyle.DropDownList Loads fine, displays fine, selects fine, problem is to Unselect via code. Setting the SelectedIndex to 0 throws an exception. (Setting to -1 is a no-no as per msdn doco that says dont set SelectedIndex=-1 if databound) So how to unselect without throwing an exception ? For now i wrapped it into a try/catch to just ignore the error! EDIT: As asked by Hubeza, i worked on sample code to post. Did a stripped down version of the original code in C# (original is in VB.NET) and could NOT reproduce it either. Converted to VB.NET and could NOT reproduce it either ! In other words, SelectedIndex = 0 does work in the stripped down version! Currently further investigating what else could be wrong with the original code. EDIT2: Case Closed. Call me a stupid fool if you like, and apologies for wasting anyone's time - The error was originating from MyComboBox_SelectedIndexChanged event, which i neglected to check ! May as well post the sample in case anyone finds useful. private void LoadComboMethod() { DataTable dtFruit = new DataTable("FruitTable"); //define columns DataColumn colID = new DataColumn(); colID.DataType = typeof(Int32); //VB.NET GetType(Int32) colID.ColumnName = "ID"; DataColumn colDesc = new DataColumn(); colDesc.DataType = typeof(String); colDesc.ColumnName = "Description"; //add columns to table dtFruit.Columns.AddRange(new DataColumn[] { colID, colDesc }); //add rows DataRow row = dtFruit.NewRow(); row[colID] = 1; row[colDesc] = "Apples"; dtFruit.Rows.Add(row); row = dtFruit.NewRow(); row[colID] = 1; row[colDesc] = "Bananas"; dtFruit.Rows.Add(row); row = dtFruit.NewRow(); row[colID] = 1; row[colDesc] = "Oranges"; dtFruit.Rows.Add(row); //add extra blank row. DataRowView drv = dtFruit.DefaultView.AddNew(); drv.EndEdit(); //Bind combo box DataView dv = new DataView(dtFruit); dv.Sort = "ID ASC"; //ensure blank item on top cboFruit.DataSource = dv; cboFruit.DisplayMember = "Description"; cboFruit.ValueMember = "ID"; } private void UnselectComboMethod() { if (cboFruit.SelectedIndex > 0) { cboFruit.SelectedIndex = 0; } else { MessageBox.Show("no fruit selected"); } }

    Read the article

  • WinForms form freezes

    - by andrew
    On a form (F1) i have a button, from which if i create another form (lets call it F2) and show it there's no problem but i'd like to do something like this Some thread in my app is running a connection and listens for messages from a server. when a message arrives, my main form is registered to get an event that runs a function. From that function i'm trying to create and show the F2 type form (empty, nothing modified in it): it shows it but then it freezes my application. more exactly: public partial class Form1 : Form { public Form1() { InitializeComponent(); ConnectionManagerThread.getResponseListener().MessageReceived += Form1_OnMessageReceived; } private void Form1_OnMessageReceived(object sender, MessageEventArgs e) { Form2 f2 = new Form2(); f2.Show(); } }

    Read the article

  • WinForms binding

    - by Anthony
    I have some controls bound to a BindingSource control. I want to do a calculation when the value changes in one control and set the result on another control. Do i update the textbox the property is bound to or do i update the underlying entity which would update the control anyway(i hope)? When i change textbox A...textbox B is updated with the new calculated result..this works fine...but i have noticed that when i Leave textbox A..textbox B reverts back to its original value...what is going on here!

    Read the article

  • Not able to capture Enter key in WinForms text box

    - by Michael Hermes
    When the user is entering a number into a text box, I would like them to be able to press Enter and simulate pressing an Update button elsewhere on the form. I have looked this up several places online, and this seems to be the code I want, but it's not working. When data has been put in the text box and Enter is pressed, all I get is a ding. What am I doing wrong? (Visual Studio 2008) private void tbxMod_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { btnMod.PerformClick(); } }

    Read the article

  • Winforms - Visually remove button click event

    - by Wayne Koorts
    .NET newbie alert Using Visual C# 2008 Express Edition I have accidentally created a click event for a button. I then deleted the automatically-created method code, which resulted in an error saying that the function, which had now been referenced in the form loading code, could no longer be found. Deleting the following line from the Form1.Designer.cs file's InitializeComponent() function... this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click); ... seems to do the trick, however, it makes me feel very dirty because of the following warning at the beginning of the #region: /// Required method for Designer support - do not modify /// the contents of this method with the code editor. I haven't been able to find a way to do this using the form designer, which I assume is the means implied by this warning. What is the correct way to do this?

    Read the article

  • DIY intellisense on XPath - design approach? (WinForms app)

    - by Cheeso
    I read the DIY Intellisense article on code project, which was referenced from the Mimic Intellisense? question here on SO. I wanna do something similar, DIY intellisense, but for XPath not C#. The design approach used there makes sense to me: maintain a tree of terms, and when the "completion character" is pressed, in the case of C#, a dot, pop up the list of possible completions in a textfield. Then allow the user to select a term from the textfield either through typing, arrow keys, or double-click. How would you apply this to XPath autocompletion? should there be an autocomplete key? In XPath there is no obvious separator key like "dot" in C#. should the popup be triggered explicitly in some other way, let's say ctrl-. ? or should the parser try to autocomplete continuously? If I do the autocomplete continuously, how to scale it properly? There are 93 xpath functions, not counting overloads. I certainly don't want to popup a list of 93 choices. How do I decide when I've narrowed it enough to offer a useful lsit of possible completions? How to populate the tree of possible completions? For C#, it's easy: walk the type space via reflection. At a first level, the "syntax tree" for C# seems like a single tree, and the list of completions at any point depends on the graph of nodes you've traversed to that point. Typing System.Console. traverses to a certain node in that tree, and the list of completions is the set of child nodes available at that node in the tree. On the other hand, the xpath syntax seems like it is a "flatter" tree - function names, axis names, literals. Does this make sense? what have I not considered?

    Read the article

  • How to get the height of Label control in Winforms

    - by bmutch
    My label is wrapping the text due to the length of the text. The height property returns the correct value only if there is a single line. How can I get the correct height? Thanks. Solution: I was creating the label dynamically and checking the height then. Later the panel on which the label was residing was added to a form, changing the panel's font and thus also changing the label's font and height.

    Read the article

  • Spell check in winforms

    - by j-t-s
    In my win forms c# app, I want to be able to add spell check functionality. But, I want to do it my own way, and NOT use any other components. All I need is just an online service where i can send a request or something and it tells me whether or not the word i sent was spelled correctly. Preferred but not required: The ability for that online sevrice to also send back suggestions.

    Read the article

  • Winforms: Enabling Localization by default

    - by Obalix
    Is there an easy way to set the Localizable property to true for newly created usercontrols / forms? The scope of the setting should ideally be a solution or a project. In other words I want to say that this project/solution should be localizable, and then if I add a new form or control VS should automatically set the property to true.

    Read the article

  • Adding Events To WinForms?

    - by Soo
    Happy Friday! :D I have a TextBox on a WinForm and I want to execute some code every time someone presses a key inside of that TextBox. I'm looking at the events properties menu, and see the "KeyDown" event, but don't know how to add code to it. Happy coding

    Read the article

  • C# winforms: DataSet with multiple levels of related tables

    - by Jake
    Hi, I am trying to use DataSet and DataAdapter to "filter" and "navigate" DataRows in DataTables. THE SITUATION: I have multiple logical objects, e.g. Car, Door and Hinge. I am loading a Form which will display complete Car information including each Door and their respective Hinges. In this senario, The form should display info for 1 car, 4 doors and 2 hinges for each door. Is it possible to use a SINGLE DataSet to navigate this Data? i.e. 1 DataRow in car_table, 4 DataRow in door_table and 8 DataRow in hinge_table, and still be able to navigate correctly between the different object and their relations? AND, able to DataAdapter.Update() easily? I have read about DataRelation but don't really understand how to use it. Not sure if it is the correct direction for my problem. Appreciate any advise. Thanks!

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >