Search Results

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

Page 58/113 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • List replies in a winform

    - by andrew
    In my C# app I get an xml from a server that contains some replies like in a forum thread (with elements like author, time, body, title, whatever). When I get this xml, I create a new form in which i want to display these replies, and a little text box with an "add reply" button. I'd also like some edit buttons on perhaps my own replies in the reply list displayed in the form. The simplest way that came to my mind to display the replies is to put a web browser control in the form, generate a full html page in a string from the xml, and throw it in that web browser control. And under it i can put the text box with the add reply button. Everything is ok, except that i have no idea of how i could implement the edit function on my own replies (i mean i could add a link in there... but link to what) I would like to know if there is a way to get that edit event from the web browser control (my guess is i can't) or another (maybe simple/easy) idea of displaying the replies in a winform using other controls

    Read the article

  • How to Get a Specific Column Value from a DataTable?

    - by peace
    I have a datatable. I need to fetch a certain column value based on the user input. For example, lets say the datatable has two columns CountryID and CountryName. I need to find CountryID in the datatable based on the user input country name. I could just open a connection with DB and run the query select countryID from Country where countryName = @userinput. Is there anyway i could do this on the datatable.

    Read the article

  • Does not contain a definition for GetDataFromNumber But i have it defined!?!?!

    - by JB
    public void button2_Click(object sender, System.EventArgs e) { string text = textBox1.Text; Mainform = this; this.Hide(); GetSchedule myScheduleFinder = new GetSchedule(); string result = myScheduleFinder.GetDataFromNumber(text);// says there is no definition if (!string.IsNullOrEmpty(result)) { MessageBox.Show(result); } else { MessageBox.Show("Enter A Valid ID Number!"); } } says it does not contain definition for it but on my GetSchedule .cs file i have it defined public string GetDataFromNumber(string ID)//defined here { foreach (IDnumber IDCandidateMatch in IDnumbers) { if (IDCandidateMatch.ID == ID) { StringBuilder myData = new StringBuilder(); myData.AppendLine(IDCandidateMatch.Name); myData.AppendLine(": "); myData.AppendLine(IDCandidateMatch.ID); myData.AppendLine(IDCandidateMatch.year); myData.AppendLine(IDCandidateMatch.class1); myData.AppendLine(IDCandidateMatch.class2); myData.AppendLine(IDCandidateMatch.class3); myData.AppendLine(IDCandidateMatch.class4); //return myData; return myData.ToString(); } } return ""; }

    Read the article

  • C# database file directory

    - by Simon
    I'm using the windows forms aplication with an ms access database. And i would like to know if there is a way to show the directory of the database file (to save data in it)excpet like this: string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=save.mdb"; or this: "Data Source=D:\Simonova aktovka na namizju\matura\test5\save.mdb"; couse if i use the first one the aplication undos the changes i've made when i close it(the aplication) the second one makes me have to change the path everytime i bring the aplication to another computer(cous the direktory is different of coars) So... is there another way?

    Read the article

  • Tootip steals mouse click

    - by deerchao
    I'm writing a custom TreeView from ScrollableControl. I decided to show tooltips when mouse is hover nodes with text too long to display. I find out when tooltips are shown, user would not be able to click the node to select it, because (I think) he's clicking the tooltip window, not my control. Is there any easy solutions? As I can see System.Windows.Forms.TreeView don't have this problem. Thanks!

    Read the article

  • Is there a non-blocking version of MessageBox.Show (or something like it)?

    - by Dan Tao
    Often you just want to notify the user that something has occurred, but there's really no need for any input from them. In this common scenario, I sometimes see code like this: MessageBox.Show("Something has occurred", "Something", MessageBoxButtons.OK); This code, as we all know, causes a little pop-up window to appear with only an OK button. Now here's the thing: this code blocks (the UI thread). But in the vast majority of cases, it seems to me, if you only have an OK button, there's very little need to block. (Isn't the purpose of blocking typically to receive some input from the user? And if the user's only choice is "OK," in this typical case, isn't blocking pretty pointless?) Obviously I could just write my own little form that does basically exactly what MessageBox.Show does, except that it returns nothing (no DialogResult) and doesn't block. But I was just wondering if something like this exists already that I didn't know about.

    Read the article

  • Using Timer only once

    - by zaidwaqi
    Hi, I want to use a timer only once, at 1 second after the initialization of my main form. I thought the following would have a message box saying "Hello World" just once, but actually a new message box says "Hello World" every one second. Why so? I had put t.Stop() in the tick event. Also, do I need to dispose the timer somehow to avoid memory leakage? Timer t = new Timer(); t.Interval = 1000; t.Tick += delegate(System.Object o, System.EventArgs e) { MessageBox.Show("Hello World"); t.Stop(); }; t.Start(); Please help and show if there is a better way of doing this? Thanks.

    Read the article

  • how do I get the index of a firing context menu item

    - by fishhead
    I would like to determine the index of the selected context menu item. But I don't want to build a unique eventhandler for each menu item...how do I do this MenuItem mi= StatusContextMenu.MenuItems.Add("Set option"); mi.MenuItems.Add(0,new MenuItem("Set to A", new EventHandler(SetLetter)) ); mi.MenuItems.Add(1,new MenuItem("Set to B", new EventHandler(SetLetter))); mi.MenuItems.Add(2,new MenuItem("Set to C ", new EventHandler(SetLetter))); mi.MenuItems.Add(3,new MenuItem("Set to D", new EventHandler(SetLetter))); private void SetLetter(object sender, System.EventArgs e) { index = ???? } C#, .net 2.0

    Read the article

  • Questions about .NET CollectionEditor type

    - by smwikipedia
    Who can tell me the internal working mechanism of a CollectionEditor in plain English? I have implemented every virtual function and step into each of them. Still got no clue of its intended algorithm. I searched the web and found tons of compaints about the CollectionEditor type, and even bugs. I am kind of thinking of the CollectionEditor as a total mess.

    Read the article

  • Accessing Securised Web Service

    - by Xstahef
    Hi, I need to connect to a provider's web service with a Windows Form application. He gives me a certificate to access it but I have a security problem. I have done these following steps : Add certificate to personal store (on IE & Firefox) Generate a proxy with the remote wsdl (no problem) Use this code to call a method : `using (service1.MessagesService m = new service1.MessagesService()) { X509Certificate crt = new X509Certificate(@"C:\OpenSSL\bin\thecert.p12",string.Empty); m.ClientCertificates.Add(crt); var result = m.AuthoriseTransaction(aut); this.textBox1.AppendText(result.id.ToString()); }` I have the following error : The underlying connection was closed: Could not establish trust relationship for the channel SSL / TLS. Thanks for your help

    Read the article

  • Textbox LostFocus event fires after Command Button's OnClick event

    - by Homam
    Hi all, I have a TextBox and a ToolStripButton in a windows forms application, the TextBox implements an event handler for the LostFocus event, and the ToolStripButton implements an event handler for the Click event, but the TextBox LostFocus event fires after the ToolStripButton Click event, which event in TextBox fires before ToolStripButton click event ?

    Read the article

  • How to create a clip region from a path that includes the 'outline'?

    - by mackenir
    I am creating a rounded rectangle GraphicsPath (see red outline image below), and then using this as a clip region both when drawing graphics, and as the Region of a Form. Unfortunately, although the path looks good, it doesn't work well as a region (see solid black image below) Is there a way that I can generate a clipping region from the path that includes all the 'outline' pixels of the path? Do I need to generate a bitmap and then process this to create a region? The rounded rectangle path: When used as a clip region: The discrepancy (red pixels are in the path outline, but outside the region. blue pixels are in both):

    Read the article

  • Capture KeyUp event on form when child control has focus

    - by Jon B
    I need to capture the KeyUp event in my form (to toggle a "full screen mode"). Here's what I'm doing: protected override void OnKeyUp(KeyEventArgs e) { base.OnKeyUp(e); if (e.KeyCode == Keys.F12) this.ToggleFullScreen(); } private void ToggleFullScreen() { // Snazzy code goes here } This works fine, unless a control on the form has focus. In that case, I don't get the event at all (also tried OnKeyDown - no luck there either). I could handle the KeyUp event from the child control, but the controls on the form are generated dynamically, and there may be many of them - each having many children of their own. Is there any way to do this without generating event handlers for every control on the screen (which I certainly could do with a recursive function)?

    Read the article

  • How can I make the WebBrowser control navigate to a specific webpage?

    - by tee
    How can I make the code when run the code it go to samsung.com private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e) { webBrowser1.Navigate("www.samsung.com"); } Please correct it when run program it go to samsung.com 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 mshtml; namespace webhiglight { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e) { webBrowser1.Navigate("www.samsung.com"); } private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { if (webBrowser1.Document != null) { IHTMLDocument2 document = webBrowser1.Document.DomDocument as IHTMLDocument2; if (document != null) { IHTMLSelectionObject currentSelection = document.selection; IHTMLTxtRange range = currentSelection.createRange() as IHTMLTxtRange; if (range != null) { const String search = "ant"; if (range.findText(search, search.Length, 2)) { range.select(); } } } } } } }

    Read the article

  • Problem in hiding scrollbar of webbrowser control

    - by Royson
    I have web browser control in panel and panel is placed in table layout. i have tried to hide scroll bar by webBrowser.ScrollBarsEnabled = false; but still there is scrollbar are visible. I want to hide it irrespective of page width. User should see page area which are best fitted on panel. How to do this.

    Read the article

  • Multiple winform data save problem

    - by Mahesh
    hi am using C# with VS-2005 I have a form1 and about two textBox and one Combobox on it. like below textBox1 texbox2 ComboBox I have bind combobox by sql database. first user type in textbox1 and textbox2 and then goes to comboBox in which "BuyerName" available on it. if user not found the data in the comboBox then press ALT+C for opening of Form2 where they create data and save it. My problem is when I closed the form2 by saving data of "BuyerName" the form1 is open as per my requirement but the data of textBox1 and textBox2 which user typed before opening of form2 is lost and therefore user have to re-type on it. which i don't want as it wasting of time. I want when form2 closed and form1 open the data will be available on it. and when u create fresh "BuyerName" from form2 the "BuyerName" will be automaticaly available on form1 comboBox on closing of form2. Hope u will get it. am new here in programing so kindly suggest me by proper codeing. thx in Advance.

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >