Search Results

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

Page 78/113 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • How to access parents' members from a inner class in WPF?

    - by black sensei
    Hello Experts! I'm trying to do scheduled operation let's say to check for user's credit left via web service call and update the user interface. i've tried with quartz.net to implement the scheduling bit.i created an inner class in the window class i need to update.That inner class has the method that calls the webservice and the result needs to be displayed back to the UI. here is an example of what i did. public partial class Window2 : Window { private int i; public Window2() { InitializeComponent(); } public class Myclass :IJob { public void Execute(JobExecutionContext context) { string result = doMyOperation(); //i'll like to call parent label member of name lblNotif //is something like parent.lblNotif.Content = result; //possible? } public string doMyOperation() { //calling the wermethod to retreive user's balance return result = service.GetUsersBalace(user); } } } Well the quartz bit is working and this post is not about quartz. here are my questions Question 1 : How is it possible to access Window2 controls, for instace lable lblNotif? Question 2 : If my thinking about this is wrong, what is done as best practice to solve my kind of problem, where an application need to do an operation let's say every 5mn and update the the UI. Question 3 : i at first tried to use the backgroundworker and i felt like i can't do the scheduling bit with it.Is that correct or i'm wrong. thanks for those who commented already and sorry for those who didn't get the meaning of my post.I hope this will be a bit clearer.Thanks for reading

    Read the article

  • how to place windows control to html

    - by cerebrus
    Hi. I need to create a class Toolbar : Windows.Worm.UserControl (Framework 2.0) and to place it into HTML page. This page must work in IE6+. I found some examples and created my toolbar, but IE doesn't want to display it. Site with examples: http://feishunji.blog.51cto.com/237830/45990 Please, help to solve this problem.

    Read the article

  • How to determine whether there is date in the string or not with different date format ?

    - by Harikrishna
    I am parsing table information from the html table.Now I want to check whether there is date in the records for one particular column.Means I want to check whether there is date in the string or not .And date can be in different format like the string can be FUTIDX 26FEB2009 NIFTY 0 -- There is date in the string. FUTIDX MINIFTY 30 Jul 2009 -- There is date in the string. FUTSTK ONGC 27 Mar 2008 -- There is date in the string. How can I do that ?

    Read the article

  • Displaying image in RDLC

    - by stackBest2
    I am working on a c# windows application. My problem is, I have stored jpg images in a folder. I need to retrieve the image from that folder and should display in the report(rdlc). I have written the following code but the image is not displaying. List<ReportParameter> param = new List<ReportParameter>(); param.Add(new ReportParameter("path", @"C:\picture\1.jpg")); reportViewer1.LocalReport.SetParameters(param);

    Read the article

  • How to build a Main Menu screen

    - by flow overstack
    Good day (and happy New Year), I'm a beginner VB.Net programmer using VS 2008. I'm planning a new winform project whose main form should look more or less like this: MAIN MENU 1. DoSomething1 2. DoSomething2 3. DoSomething3 ... Please choose: [TextBox] The user can either choose from the Main Menu (by clicking an item) or enter the item number in the textbox. For example, if the user clicks DoSomething3 in the Main Menu (or alternatively enters 3 in the textbox), another form will be opened and hide the main form. What would be the best way to implement it? Specifically, I would like to know how I make so that choosing from the menu and entering a number in the textbox fire the same event. Any help or hints will be appreciated.

    Read the article

  • allow only distinct values in ComboBox

    - by Ravinder Gangadher
    In my project, I am trying to populate ComboBox from DataSet. I succeeded in populating but the values inside the ComboBox are not distinct (Because it just showing the values present in DataSet). I cant bind the ComboBox to DataSet because I am adding "Select" text at first of populating the values. Here is my code. ComboBox --> cmb DataSet --> ds DataSet Column Name --> value(string) cmb.Items.Clear(); cmb.Items.Add("Select"); for (int intCount = 0; intCount < ds.Tables[0].Rows.Count; intCount++) { cmb.Items.Add(ds.Tables[0].Rows[intCount][value].ToString()); } cmb.SelectedIndex = 0; My question is how to allow distinct values (or restrict duplicate values) inside the ComboBox.

    Read the article

  • Anchors does not work

    - by serhio
    Situation: In A form I have a TableLayoutPanel(Dock= Fill) and a label (witch parent is the Form, not the tablelayoutPanel) whitch anchors are set to Top+Bottom+Left+Right. Now, when I run this form and rezise it, the label does not center itself in the Form, as I expected. Workarounds?

    Read the article

  • Text property in a UserControl in C#

    - by yeyeyerman
    I have a control with a inner TextBox. I want to make a direct relationship between the Text property of the UserControl and the Text property of the TextBox. The first thing I realized is that Text was not being displayed in the Properties of the UserControl. Then I added the Browsable(true) attribute. [Browsable(true)] public override string Text { get { return m_textBox.Text; } set { m_textBox.Text = value; } } Now, the text will be shown for a while, but then is deleted. This is because the information is not written within the xxxx.Designer.cs. How can this behviour be changed?

    Read the article

  • What is a way to access .accdb files for reading and writing?

    - by JPJedi
    I have an Microsoft Access Database (.accdb) that stores information needed in an application. Is there a way to distribute my application with the access database without having the user have access installed or get the user to go and download and install the office runtime? The windows form application that uses the access database is developed in VB.net in Visual Studio 2008.

    Read the article

  • Why Resource (.resx) file added on merely changing Form size and on adding button which is not resou

    - by Muhammad Kashif Nadeem
    1- Resource files suppose to be added on adding some resource in application like image or audio or video etc. But if I just change size of form a .resx file under that particular form. Changing size of form does not add any resource so why this .resx file. 2- I dropped a button on form and a resource file is included again this button is not some kind of resource, it is object created and having information in designer file. 3- A resource file added on dropping button on form but if I delete this resource file and run application it compile and run with NO error and button is still there. If this button has any relation with resource file then there must by some kind of compile or runtime error AND if .resx file has nothing to do with button then why it was added? I am using VS 2008. Thanks in advance for the help

    Read the article

  • How can I hide a property from going into the form designer file?

    - by user460334
    I am working in VB.NET 2010 Framework 2.0. I don't want to allow some properties from going into form's designer file but the those properties will present on the form(property grid). The behavior of these properties will be same always. I used the following code: <DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> Public Property GradientBegin() As Color = Color.Red But the problem I am facing is that - on the property grid after changing the "GradientBegin" color to other than RED and compiling the program, it is replacing the new changed value to RED again. So I am not able to change the color actually. How can I achieve this? Thanks for any reply in advance.

    Read the article

  • New form on a different thread

    - by Dan
    So I have a thread in my application, which purpose is to listen to messages from the server and act according to what it recieves. I ran into a problem when I wanted to fire off a message from the server, that when the client app recieves it, the client app would open up a new form. However this new form just freezes instantly. I think what's happening is that the new form is loaded up on the same thread as the thread listening to the server, which of course is busy listening on the stream, in turn blocking the thread. Normally, for my other functions in the clients listening thread, I'd use invokes to update the UI of the main form, so I guess what I'm asking for is if here's a way to invoke a new form on the main form.

    Read the article

  • Is there a way to organize a icon collection to allow for easy searching?

    - by John M
    Is there any way of organizing a icon collection so that it easier to find needed icons? For example: the program needs a save icon there are 5 icons collections on your HD that have a save icon and there are 5 more collections that don't have a save icon (but you don't know that) do you browse through each icon collection? run a search (assumes files are named consistently)? Would it be ideal to have some sort of organized directory (printable?)?

    Read the article

  • Function to register functions to be called if event invoked.

    - by zaidwaqi
    Hi, I have a Panel which contains 20 PictureBox controls. If a user clicks on any of the controls, I want a method within the Panel to be called. How do I do this? public class MyPanel : Panel { public MyPanel() { for(int i = 0; i < 20; i++) { Controls.Add(new PictureBox()); } } // DOESN'T WORK. // function to register functions to be called if the pictureboxes are clicked. public void RegisterFunction( <function pointer> func ) { foreach ( Control c in Controls ) { c.Click += new EventHandler( func ); } } } How do I implement RegisterFunction()? Also, if there are cool C# features that can make the code more elegant, please share. Thanks.

    Read the article

  • C# - Common way to format listview controls on forms?

    - by John M
    In a C# Winform application (3.5) there are numerous forms each with different listview controls. While each listview control uses different datasets the basic formatting of each remains the same. Basic formatting takes this form: /* appearance */ this.lstA.View = View.Details; this.lstA.AllowColumnReorder = true; this.lstA.CheckBoxes = false; this.lstA.FullRowSelect = true; this.lstA.GridLines = false; this.lstA.Sorting = SortOrder.Ascending; What I would like to do is create a class that can be used to set the initial format of the listview. How do I pass the listview (by reference?) to the class so that the appearance properties can be set?

    Read the article

  • Make the text of a disabled textbox easier to see

    - by Vaccano
    I have a text box that when it is disabled the text in it is gray and kind of dithered. (This is the standard functionality.) Is there a way to make this easier to see? I have tried this: txtBoxNumber.Enabled = false; txtBoxNumber.ForeColor = Color.Black; and that has no effect. NOTE: This is a .net Compact Framework app, but I am not tagging the question with CF because I think it is the same for normal .net.

    Read the article

  • C# - Printing the Form

    - by Jon
    I am using the code from MS to print a form however it looks like the form needs to be visible with a Show/ShowDialog() to work. I am trying to use the code for a form that I don't want to show. Any ideas?

    Read the article

  • How to show processing form in my main form

    - by Royson
    Hi I want to show processing image in form when my main form is working. I have created processing form . I tried it with ProcessingForm obj = new ProcessingForm(); obj.show(); DOSomeStuff(); obj.close(); it shows processing form..but some time it becomes not responding...or my gif image stops animating. How to do that??

    Read the article

  • Using anchor property with dynamically added controls

    - by tcube
    I'm adding some textboxes to a form dynamically at runtime. Everything works fine i.e. the textboxes are aligned, anchored and automatically resizes until the form is maximized. On maximizing the form, the textboxes are added to the same location while the form was not maximized. This causes a misalignment of the textboxes. How can I ensure that all the textboxes are at the same location and of the same size both while the windowstate is normal as well as maximized? EDIT: Btw I'm using C# EDIT: Would a flowlayoutpanel be useful here?

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >