Search Results

Search found 2806 results on 113 pages for 'winforms'.

Page 45/113 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • Information Label

    - by caisenm
    I am trying to make an information label that should display the events the application doing. deleting data, reading data, writing data, connection to db. etc.. I've added a label to my form and I am changing its text property for each operation like: label1.Text = "stored procedure is being executed.."; But, in the run time the text of the label does not change. I've tried to add the method Application.DoEvents(); to every place I've changed the label's text property. It works fine. But it looks silly. So I've tried to add this method to my label's "TextChanged" event. But it does not work! Am I doing something wrong? Or, is there any efficient way to make an information label?

    Read the article

  • VS2008 Windows Form Designer does not like my control.

    - by Thedric Walker
    I have a control that is created like so: public partial class MYControl : MyControlBase { public string InnerText { get { return textBox1.Text; } set { textBox1.Text = value; } } public MYControl() { InitializeComponent(); } } partial class MYControl { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Component Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.textBox1 = new System.Windows.Forms.TextBox(); this.listBox1 = new System.Windows.Forms.ListBox(); this.label1 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // textBox1 // this.textBox1.Location = new System.Drawing.Point(28, 61); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(100, 20); this.textBox1.TabIndex = 0; // // listBox1 // this.listBox1.FormattingEnabled = true; this.listBox1.Location = new System.Drawing.Point(7, 106); this.listBox1.Name = "listBox1"; this.listBox1.Size = new System.Drawing.Size(120, 95); this.listBox1.TabIndex = 1; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(91, 42); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(35, 13); this.label1.TabIndex = 2; this.label1.Text = "label1"; // // MYControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.label1); this.Controls.Add(this.listBox1); this.Controls.Add(this.textBox1); this.Name = "MYControl"; this.Size = new System.Drawing.Size(135, 214); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Label label1; } MyControlBase contains the definition for the ListBox and TextBox. Now when I try to view this control in the Form Designer it gives me these errors: The variable 'listBox1' is either undeclared or was never assigned. The variable 'textBox1' is either undeclared or was never assigned. This is obviously wrong as they are defined in MyControlBase with public access. Is there any way to massage Form Designer into allowing me to visually edit my control?

    Read the article

  • Creating user control with dock.Full property giving me a problem

    - by Royson
    Hi, My application has several controls. Like in one screen has treeview on left side,gridview with paging in the middle and 4 buttons at right side. the controls are properly appears when the form is in maximize state. but if i minimize it the controls are not properly fits in the screen. i tried with different different tricks like table layout.. in dat i added panel...etc.. but i could not solve the problem. How can i create such type of screens which fits independent of size of my window. Thanks

    Read the article

  • RegEx for the <li></li> tags

    - by Abu
    Hi All, i am working on the C# WinForm application. In that application, i have snippet like this: <ul> <li>abc <li>bbc <li>xyz <li>pqr </li></li></li></li> </ul> but, i want to get output like.. <ul> <li>abc</li> <li>bbc</li> <li>xyz</li> <li>pqr</li> </ul> Is there any method using which this thing can be done? Can anybody suggest me any RegEx for this problem? Thanks. Regards.

    Read the article

  • Combo box in a scrollable panel causing problems

    - by Dennis
    I have a panel with AutoScroll set to true. In it, I am programmatically adding ComboBox controls. If I add enough controls to exceed the viewable size of the panel a scroll bar appears (so far so good). However, if I open one of the combo boxes near the bottom of the viewable area the combo list isn't properly displayed and the scrollable area seems to be expanded. This results in all of the controls being "pulled" to the new bottom of the panel with some new blank space at the top. If I continue to tap on the drop down at the bottom of the panel the scrollable area will continue to expand indefinitely. I'm anchoring the controls to the left, right and top so I don't think anchoring is involved. Is there something obvious that could be causing this? Update: It looks like the problem lies with anchoring the controls to the right. If I don't anchor to the right then I don't get the strange behavior. However, without right anchoring the control gets cut off by the scroll bar. Here's a simplified test case I built that shows the issue: public Form1() { InitializeComponent(); Panel panel = new Panel(); panel.Size = new Size(80, 200); panel.AutoScroll = true; for (int i = 0; i < 10; ++i) { ComboBox cb = new ComboBox(); cb.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; cb.Items.Add("Option 1"); cb.Items.Add("Option 2"); cb.Items.Add("Option 3"); cb.Items.Add("Option 4"); cb.Location = new Point(0, i * 24); panel.Controls.Add(cb); } Controls.Add(panel); } If you scroll the bottom of the panel and tap on the combo boxes near the bottom you'll notice the strange behavior.

    Read the article

  • Binding to filtered version of collection

    - by Shane Fulmer
    I have a collection that contains all the items that I want to keep track of. I want to display 3 different grids, and in each one I want to display a different filtered version of the items. Is there a way to bind to a filtered version of the main collection without having to maintain 3 separate collections to bind to?

    Read the article

  • Current Line For Visual Studio Macros

    - by Vadim
    How can I read text of a current line (where cursor is situated) from Macros? I'm going to use such a fucntion: Public Sub AddTextToChangeLogFile() Dim textOnACurrentLine As ??? textOnACurrentLine = ??? If textOnACurrentLine.Text <> String.Empty Then Dim sw As New StreamWriter("C:\###\Changes.txt", True) sw.WriteLine(textOnACurrentLine + ". file: " + DTE.ActiveDocument.Name) sw.Close() End If End Sub

    Read the article

  • Passing data to a non-static listBox, by calling function from another class

    - by Andrew A
    I have a simple forms program that I have been fighting with for a while now. I simply want to be able to call a method from a different class file (when a certain step is triggered in the code in that class file) in order to insert a string in the listBox. Here is my main method, pretty standard: class Program { [STAThread] static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm()); } } Here is the function which resides in my MainForm.cs file, which I can call just fine from that class file (via 'TextToBox(myString);'): public partial class MainForm : Form { ... // Function to output results to main Listbox window public void TextToBox(string aString) { // Place messages in Main Display list box window this.listBox1.Items.Insert(0, aString); } ... } But my problem is when I am in another class and I want to call 'TextToBox(myString);'. If I create another object reference of the MainForm, the code compiles fine but nothing will show up in the listBox. How do I do this? I cannot simply make TextToBox() static. I know I must create the object reference but I can't figure out how to reference the ORIGINAL MainForm, the one that was created in the Main method. Thanks in advance...

    Read the article

  • C#, Display plain text in a form

    - by daemonfire300
    I ve made this simple drawing to explain my needs: Plain Text in C# I can only find rather "complex" functions, like RTF Text box etc. I couldn't figure out how to display "plain text" in a Form1.cs (I do not talk about HTML to WinForm) (Search did not return any useful results)

    Read the article

  • SmtpClient.SendAsync(); Not working on my new (64bit) computer.

    - by j-t-s
    Hi All, Okay, Only a couple weeks ago I had an old 32bit computer, but had to buy a new computer, which happens to be 64bit. I've rewritten the method that sends e-mails asynchonously and it just does not work. And does NOT throw any exceptions either. What gives? I have also tried the Async method code found iin MSDN, and the BlackWasp tutorial code, and MANY others. They're all the same! The only difference here seems to be the fact that I'm now on a 64bit computer. How can I get around this? Google/MSDN has been of zero help. Thanks

    Read the article

  • Invalid URI: The format of the URI could not be determined.

    - by j-t-s
    Hi ALl I keep getting this error. Invalid URI: The format of the URI could not be determined. the code I have is: Uri uri = new Uri(slct.Text); if (DeleteFileOnServer(uri)) { nn.BalloonTipText = slct.Text + " has been deleted."; nn.ShowBalloonTip(30); } What gives? How is that not a valid URI format? It's plain text.

    Read the article

  • How to develop asp.net web service to create the web method which can take the parameter of type win

    - by Shailesh Jaiswal
    I am developing asp.net web service. I am developing this web service so that OPC ( OLE for process control) client application can use it. In this web service I am using the built-in functions provided by the namespaces using OPC, using OPCDA, using OPCDA.NET. I have also added the namespace using System.Windows.Forms in this web service so that I can use the windows form control. In that we service I have created on web method which takes the parameter of type windows form control as given below. public void getOPCServerItems(TreeView tvServerItems, ListView lvBranchItems) { ArrayList ArrlstObj = new ArrayList(); ItemShowTreeList = OpcSrv.ShowBrowseTreeList(tvServerItems, lvBranchItems); ItemShowTreeList.BrowseModeOneLevel = true; // browse hierachy levels when selected. (default) ItemShowTreeList.Show(OpcSrv.ServerName); } In the above web method I need to pass the values to the built-in function ShowBrowseTreeList() (found in OPC, OPCDA, OPCDA.NET namespaces). This function takes the two parameter of windows form control type. These parameters are Treeview & ListView control of the windows form. In the above web method ShowBrowseTreeList() method automatically create the treeview & listview structure of the available items. Now as I am consuming the web service so I need to pass the values to the webmethod getOPCServerItems(). But as I my consuming application is asp.net application there is no such windows form control. In asp.net application there are also & control. I want to display The data returned in these asp.net controls rather than windows form control. I am not getting the way what should I need to do or how should I pass the values form my client application to this web service ? In the above method getOPCServerItems() when I use the parameter of type treeview & listview it generate s error "Cannot serialize member System.ComponentModel.Component.Site of type System.ComponentModel.ISite because it is an interface.". Can you provide me the the way In which I can write the above web method & how should I pass parameter to the Treeview & Listview control (windows form control) from my asp.net application ? which controls I should use to pass parameters ? Is there any need to do any type of casting ? Can you provide me the the code for above web method so that I can resolve the above issue ?

    Read the article

  • Optimizing Smart Client Performance

    - by Burt
    I have a smart client (WPF) that makes calls to the server va services (WCF). The screen I am working on holds a list of objects that it loads when the constructor is called. I am able to add, edit and delete records in the list. Typically what I am doing is after every add or delete I am reloading the entire model from the service again, there are a number off reasons for this including the fact that the data may have changed on the server between calls. This approach has proved to be a big hit on perfomance because I am loading everything sending the list up and down the wire on Add and Edit. What other options are open to me, should I only be send the required information to the server and how would I go about not reloading all the data again ever time an add or delete is performed?

    Read the article

  • Parsing or Extracting the content of html table.

    - by Harikrishna
    Can I parse the html tables by giving only column name ? Like only those data should be extracted from the table which matches those column names I give. Like for example I have table of column names like serial no., name, address, phone no,total Rs.. And I want to extract the information about only name, phone no and total Rs.. Then how can I do it?

    Read the article

  • Grouping Windows Forms Radiobuttons with different parent controls in C#

    - by Jerry
    Hi, I've got a Windows Forms application in which I have a number of RadioButtons. These RadioButtons are placed within a FlowLayoutPanel which automatically arranges them for me. All RadioButtons that are directly added to the FlowLayoutPanel are grouped, meaning I can select only one of them. However, some of these RadioButtons are paired up with a TextBox so I can supply some argument there. But to have all this arranged properly, I add a Panel control to the FlowLayoutPanel so I can control the alignment of the RadioButton and TextBox relatively to each other myself. These RadioButtons now have their own respective Panels as parent controls and thus are no longer included in the radio group with the other RadioButtons. I read that the the RadioButtons that are in the System.Web.UI namespace have a GroupName property, but unfortunately their System.Windows.Forms counterparts lack this property. Is there some other way I can group these radio buttons are am I going to have to handle onClick events myself? Thanks, Jerry

    Read the article

  • Propertygrid changes not picked up when using menu shortcut for saving

    - by Ebbe
    I am trying to implement a simple windows forms application, where the user can edit instances of a simple Person class. The application makes use of the standard propertygrid, assigning instances of the Person class to the SelectedObject property of the propertygrid. When the user clicks the menu item Save, the application gets the selected item from the propertygrid and saves it. This works fine. However, if a shortcut such as ctrl+S, assigned to the menu item, is used for saving the SelectedObject of the propertygrid, then the changes are not picked up. It appears to be related to the fact that the properties of the Person object are not updated unless the field in the propertygrid looses focus, and the ctrl+S shortcut doesn’t take away focus from fields in the propertygrid. Other developers, such as Mark Gilbert, have solved this issue by forcing away focus from the propertygrid, but this seems to be a bit of a hack, especially since it would be nice to keep the focus at the field. The Visual Studio developers apparently got it right, but I haven’t figured out how.

    Read the article

  • Html tidy pack replaces `&lt` instead of `< `and `&gt` instead of `>` for html tag.

    - by Harikrishna
    I am tidying the html page by html tidy pack because there are some pages with missing ending tags So I can add the missing closing tags by html agility pack. But some times when I use the html tidy pack then that web page has changes like : If original table is <table><tr><td>first row</td></table> After using html tidy pack the table is : <table> is now &lt table &gt. But I want like <table>. In this particular example it works perfectly but in some html page it replace &lt instead of <and &gt instead of >.

    Read the article

  • Error : while creating a file.

    - by Harikrishna
    I am storing records of datatable to csv file with the help of the following code : // we'll use these to check for rows with nulls var columns = yourTable.Columns .Cast<DataColumn>(); using (var writer = new StreamWriter(yourPath)) { for (int i = 0; i < yourTable.Rows.Count; i++) { DataRow row = yourTable.Rows[i]; // check for any null cells if (columns.Any(column => row.IsNull(column))) continue; string[] textCells = row.ItemArray .Select(cell => cell.ToString()) // may need to pick a text qualifier here .ToArray(); // check for non-null but EMPTY cells if (textCells.Any(text => string.IsNullOrEmpty(text))) continue; writer.WriteLine(string.Join(",", textCells)); } } But I get the error like System.UnauthorizedAccessException was unhandled Message="Access to the path 'D:\\Harikrishna\\Monthly Reports' is denied." What can be the problem and solution ?

    Read the article

  • datagridview winform tag only brings back the first row value

    - by jvcoach23
    I'm using visual studio 2008. I have a datagridview in a winform. I've bound to it using an object Private Sub LoadAllCampers() Dim Os As List(Of LE.Camper) = Nothing Dim Oc As New LE.Camper_Controller Os = Oc.GetCamperData(0) With Me.dgResults .DataSource = Os End With CamperBindingSource.DataSource = Os End Sub I have a tag setup on the ID property within the Camper class. when i double click on a row in teh datagridview, i do a me.dgResults.tag and it always shows the first rows ID value. If i change the ordering within the class, it will display a different value, but it's always the first value in the datagridview. I'm missing something simple to get this working.. just don't know what it is. Hopefully someone can spare a minute.

    Read the article

  • A good way in Visual Studio to have user entered time frame?

    - by Ben
    Hi, Does anyone know of a good way to have a user enter an amount of time (hours and minutes) using visual studio controls? At the moment i have two numeric up downs, one for time and one for minutes that i then parse to create a timespan. The only other idea i have is a text box that a user can enter a "00:00" time in, and validate the input. Both of these ways seem a bit bad (in UI terms) though. Any ideas? Thanks

    Read the article

  • Implementing Read Only view in Winform App

    - by Refracted Paladin
    I have an in house winform app for viewing, editing, and inserting member data. There are about 40 sepertate form pages that they use to manipulate different portions of the data. My question is this; What is the best way of implementing a read only view for a form page? My thoughts were to cycle through the controls setting Enabled = False or leave them be but not allow any data changes(no Save Button etc) unless it is "unlocked". I am curious how others handle this with WinForm apps?

    Read the article

  • User controls do not properly fit on the screen

    - by Royson
    Hi, My application has several controls. Like in one screen has TreeView on left side, GridView with paging in the middle and 4 buttons at right side. The controls properly appear when the form is in a maximized state, but if I minimize it the controls do not properly fit on the screen. I tried with different different tricks like table layout.. in dat I added a panel, etc... But I could not solve the problem. How can I create such type of screens which fits independently of size of my window? Thanks

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >