Search Results

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

Page 67/113 | < Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >

  • Windows Forms application C# | Sending Tweet

    - by Andrew Craswell
    I've been able to get my Twitter web app working just fine, but I've recently decided to add Tweeting functionality from a Windows Form, but I'm having no luck sending tweets. No errors are thrown or anything. Mind looking over my code? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using TweetSharp; namespace TwitterAdvirtiser { public partial class Form1 : Form { private string cKey = "xxx"; private string cSecret = "xxx"; private string oToken = "xxx"; private string aToken = "xxx"; public Form1() { InitializeComponent(); OnStart(); } private void OnStart() { //Authenticate with Twitter TwitterService service = new TwitterService(cKey, cSecret); service.AuthenticateWith(oToken, aToken); service.SendTweet("testing"); } } } It seems like I'm authenticating just fine, I can walk through debug mode and see all my details in the TwitterUser structure, and yet my tweets never show up on my feed. Whats up? By the way, I'm using Visual Studios 2010, and .NET 4.0. I have verified that the oToken and aToken strings have my developer tokens.

    Read the article

  • How To Bind ComboBox With ListItems in windows Forms?

    - by hatem gamil
    hi all i want to make a 2 comboBoxes ,the first one shows Hours and the Second Shows minutes but i cant do so in windows application as i have working as a web dev for a while and i forgot so i want to declare listItems then bind it to combo box i want to make it as a custom control so i want some help to tell me how to do that i am using VS 2008 thnxx

    Read the article

  • Get the currently focused textbox in C#

    - by chown
    I have two textboxes, and a button. When I press the button, I want to know where my current caret is (either of the two boxes). I need this to know where to insert a certain text. I tried textbox1.Focused; textbox1.enabled but neither worked. How should I implement this? Thanks

    Read the article

  • Labelsize appears bigger in VB.Net

    - by Ikke
    I'm trying to stack a few lists on top of each other. But the label.size.height appears to be bigger then the label itself. When i set the borderstyle to fixedsingle, i see the border around the text. But the height is bigger, so there comes a space between one label and the next. I have tried to set margin and padding to 0 without result. Exemple: label.size.height return 23, when the height actually is something around 15. Does someone knows how i get the right size? Edit: When i explicitly set the height of the lable, the problem is solved. Is this some problem with autosize?

    Read the article

  • Bring another processes Window to foreground when it has ShowInTaskbar = false

    - by Mongus Pong
    We only want one instance of our app running at any one time. So on start up it looks to see if the app is running and if it is, it calls SetForegroundWindow on the Main Window. This is all good and well ... for the most part.. When our app starts up it will show a Splash screen and a Logon form. Both of these forms have ShowInTaskBar = false. Because of this, if you try to start up another copy of the app when the Logon form is showing, that Logon form is not brought to the front! Especially as the user cant see anything in the taskbar as well, all they figure is that the app is duff and cannot start. There is no indication that there is another instance running. Is there any way around this problem?

    Read the article

  • Catching exception in Main() method

    - by Corvin
    Consider the following simple application: a windows form created by a "new C# windows application" sequence in VS that was modified in a following way: public static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { Application.Run(new Form1()); } catch (Exception ex) { MessageBox.Show("An unexpected exception was caught."); } } Form1.cs contains the following modifications: private void Form1_Load(object sender, EventArgs e) { throw new Exception("Error"); } If I press F5 in IDE, then, as I expect, I see a message box saying that exception was caught and the application quits. If I go to Debug(or Release)/bin and launch the executable, I see the standard "Unhandled exception" window, meaning that my exception handler doesn't work. Obviously, that has something to do with exception being thrown from a different thread that Application.Run is called from. But the question remains - why the behavior differs depending on whether the application has been run from IDE or from command line? What is the best practice to ensure that no exceptions remain unhandled in the application?

    Read the article

  • 2 or more Controls only 1 is considered Active

    - by Don
    I have 2 controls (MyCtrl) next to each other called ctrlLeft and ctrlRight. Whenever one receives interaction it is considered active (by default the left one). I override OnDraw and customize the look of the active one a bit. Currently I have a property Active and an event that I subscribe to from all MyCtrl in there I store a reference to the active one like this: if (sender is MyCtrl) { ctrlActive = (sender as MyCtrl); ctrlLeft.Active = !(ctrlRight.Active = (ctrlActive == ctrlRight)); } Either way I need to have ctrlActive as I use it for other things but what I am wondering is if this is the best way make them aware of each other? Another option I thought of was to store references to every possible MyCtrl and then loop through em all and activate / deactivate the one that match sender just in case I in the future add a ctrlMiddle. Are my thoughts wrong, is there better options to do this. For example, how does radiobuttons accomplish their similar functionality?

    Read the article

  • Is there such a thing as a dektop application event aggregator, similar to that used in Prism?

    - by brownj
    The event aggregator in Prism is great, and allows loosely coupled communication between modules within a composite application. Does such a thing exist that allows the same thing to happen between standalone applications running on a user's desktop? I could imagine developing a solution that uses WCF with TCP binding and running inside Windows Process Activation Service. Client applications could subscribe or publish events to this service as required and it would ensure all other listeners get notified of events as appropriate. Using TCP would enable event messages to be pushed out to clients without the need for polling, ensuring messages are delivered very quickly. I can't help but think though that such a thing would already exist... Is anyone aware of something like this, or have any advice on how it may be best implemented?

    Read the article

  • Creating Settings form using TreeView in C#

    - by Kiran Chandrashekhar
    I am developing the settings form for the software developed in C#. I was looking at how different software have implemented their settings form. In most of the cases that I came across, they seem to be using Treeview on the left pane of the form and configuration settings on the right pane. Ref URL : http://2.bp.blogspot.com/-nMfQoLurxwM/UDXfiZKd4DI/AAAAAAAAAME/IRf6kmxay4w/s1600/bild1.jpg I was wondering, how the different controls are designed/displayed on the right pane. Do they hide all the controls depending which node is selected in the TreeView something like this : if (treeView1.SelectedNode == treeView1.Nodes[0]) { this.groupBox1.Visible = true; this.button1.Visible = true; this.textBox1.Visible = true; this.textBox2.Visible = true; this.label1.Visible = true; this.label2.Visible = true; this.label3.Visible = true; } else { this.groupBox1.Visible = false; this.button1.Visible = false; this.textBox1.Visible = false; this.textBox2.Visible = false; this.label1.Visible = false; this.label2.Visible = false; this.label3.Visible = false; this.groupBox2.Visible = true; this.button2.Visible = true; this.textBox3.Visible = true; this.textBox3.Visible = true; this.labe4.Visible = true; this.label5.Visible = true; this.label6.Visible = true; // bool success = selectColor(); } Is my understanding correct ? Or do we have a better design approach for creating a settings form. Thanks

    Read the article

  • Any way to create a hidden main window in C#?

    - by Bill
    I just want a c# application with a hidden main window that will process and respond to window messages. I can create a form without showing it, and can then call Application.Run() without passing in a form, but how can I hook the created form into the message loop? Is there another way to go about this? Thanks in advance for any tips!

    Read the article

  • Autoscale Font in a TextBox Control so that its as big as possible and still fits in text area bound

    - by blak3r
    I need a TextBox or some type of Multi-Line Label control which will automatically adjust the font-size to make it as large as possible and yet have the entire message fit inside the bounds of the text area. I wanted to see if anyone had implemented a user control like this before developing my own. Example application: have a TextBox which will be half of the area on a windows form. When a message comes in which is will be approximately 100-500 characters it will put all the text in the control and set the font as large as possible. An implementation which uses Mono Supported .NET libraries would be a plus. Thanks in advance. If know one has implemented a control already... If someone knows how to test if a given text completely fits inside the text area that would be useful for if I roll my own control. Edit: I ended up writing an extension to RichTextBox. I will post my code shortly once i've verified that all the kinks are worked out.

    Read the article

  • How do I put a listing of files into a menu?

    - by PandaNL
    I have a folder with .txt files in it. How can i make my menuitem get those .txt files and put the filenames in the menuitem, so that it creates a list of all .txt files in that folder. So when i put a .txt in the folder the program automatically creates the menu item. Does someone knows how to do this, or perhaps an example?

    Read the article

  • Adding more namespace in the code file affects performace ?

    - by Harikrishna
    If we imports more namespace in the code file(cs file) then it affects on perfomance ? Like we should add namespace in the cs file as needed. That is adding more namespace in the cs file affects performance ? Like using System; using System.Data.Sql; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using System.Text.RegularExpressions; using System.Windows.Forms; using System.Xml; using System.Data.SqlClient; using System.ComponentModel;

    Read the article

  • .NET C# MouseEnter listener on a Control WITH Scrollbar

    - by Run CMD
    As long as the mouse is over a specific control, we show some form. When the mouse leaves the control, we hide the control after a small timeout. This is standard hover behavior. However, when a control (for example a Treeview) has a scrollbar, and the mouse is ON or OVER the scrollbar, the events don't fire ... If we could get a reference to the scrollbar control, this would solve our problem, as we would add the same listener events to the scrollbar. However, the scrollbar isn't accessible as far as I know ... How can we solve this problem ?

    Read the article

  • Setting SqlParameter value automatically with DataGridView?

    - by johansson
    Is there a way to set a SqlParameter's value with DataGridView, if data-bound? For example: SqlCommand selCmd = CreateCommand("SELECT * FROM table1"); SqlCommand updCmd = CreateCommand("UPDATE table1 Set column1 = @column1 WHERE id = @id"); updCmd.Parameters.Add(new SqlParameter("column1"), SqlDbTypes.Int)); updCmd.Parameters.Add(new SqlParameter("id", SqlDbTypes.Int)); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = selCmd; da.UpdateCommand = updCmd; da.Fill(_dataTable); dgv.DataSource = _dataTable; Then somewhere later: da.Update(); How can I make sure it's getting the right column1 value that was edited and the right id for the row for the da.Update(); to work, otherwise it complains that I have not provided the value. Or if there's a better way, please advise. Thanks!

    Read the article

  • How to build a windows/web application that stores data locally and sync's with remote database?

    - by Jason
    Hello, I am needing to build an application that stores data locally and then synchronizes with a remote MS SQL database. I am not sure how to go about doing this. Enter data offline on a form and store the data. Synchronize the data with a remote MS SQL database when online. There will be many users who enter data offline, the local database on each pc needs to update when online and grab the 30 most recent records for use offline. Example: Each day users will enter data on their "form". The users will be offline. The users will return to the office and need to sync with the "online" database. The next morning the users will need to sync with the online database before going offline. They will need to have offline access to the 30 most recent records. (They will use the 30 records for charting/graphing while they are offline) I am very new to building apps. I have VS 2010. I am wondering where to start? What language to use? Is there a "framework" for doing this type of app? Any info or suggestions would be greatly appreciated. Thanks!

    Read the article

  • Organising UI code in .NET forms

    - by sb3700
    Hi I'm someone who has taught myself programming, and haven't had any formal training in .NET programming. A while back, I started C# in order to develop a GUI program to control sensors, and the project has blossomed. I was just wondering how best to organise the code, particularly UI code, in my forms. My forms currently are a mess, or at least seem a mess to me. I have a constructor which initialises all the parameters and creates events. I have a giant State property, which updates the Enabled state of all my form control as users progress through the application (ie: disconnected, connected, setup, scanning) controlled by a States enum. I have 3-10 private variables accessed through properties, some of which have side-effects in changing the values of form elements. I have a lot of "UpdateXXX" functions to handle UI elements that depend on other UI elements - ie: if a sensor is changed, then change the baud rate drop down list. They are separated into regions I have a lot of events calling these Update functions I have a background worker which does all the scanning and analysis. My problem is this seems like a mess, particularly the State property, and is getting unmaintainable. Also, my application logic code and UI code are in the same file and to some degree, intermingled which seems wrong and means I need to do a lot of scrolling to find what I need. How do you structure your .net forms? Thanks

    Read the article

< Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >