Click here to Skip to main content
15,905,963 members
Home / Discussions / C#
   

C#

 
GeneralRe: Add CSS to XML with XMLWriter Pin
BoneSoft23-Jul-07 5:23
BoneSoft23-Jul-07 5:23 
GeneralRe: Add CSS to XML with XMLWriter Pin
error140823-Jul-07 5:25
error140823-Jul-07 5:25 
QuestionWriting to screen form Pin
AndrusM23-Jul-07 4:54
AndrusM23-Jul-07 4:54 
AnswerRe: Writing to screen form Pin
Bert delaVega23-Jul-07 5:22
Bert delaVega23-Jul-07 5:22 
GeneralRe: Writing to screen form Pin
AndrusM23-Jul-07 5:35
AndrusM23-Jul-07 5:35 
GeneralRe: Writing to screen form Pin
Bert delaVega23-Jul-07 6:14
Bert delaVega23-Jul-07 6:14 
AnswerRe: Writing to screen form Pin
Luc Pattyn23-Jul-07 5:29
sitebuilderLuc Pattyn23-Jul-07 5:29 
GeneralRe: Writing to screen form Pin
AndrusM23-Jul-07 5:55
AndrusM23-Jul-07 5:55 
Thank you.
I created the following code.
Is this best way ?

using System;<br />
using System.Windows.Forms;<br />
using System.IO;<br />
<br />
class main {<br />
  [STAThreadAttribute()]<br />
  public static void Main() {<br />
<br />
    LoginForm f = new LoginForm("Performing task x");<br />
<br />
    for (int i = 0; i <= 100; i++) {<br />
      f.Writeln("Login message " + i.ToString());<br />
    }<br />
    MessageBox.Show("");<br />
<br />
  }<br />
<br />
  class LoginForm : Form {<br />
<br />
    ListBox lb;<br />
<br />
    public LoginForm(string s) {<br />
      Text = s;<br />
      Left = 0;<br />
      Top = 1000;<br />
      Height = 500;<br />
      Width = 2000;<br />
      lb = new ListBox();<br />
      lb.Dock = DockStyle.Fill;<br />
      this.Controls.Add(lb);<br />
      Show();<br />
    }<br />
<br />
    public void Writeln(string s) {<br />
<br />
      // display    <br />
      lb.Items.Add(s);<br />
      // scroll to make it visible (unless control key is pressed)    <br />
      if (Control.ModifierKeys != Keys.Control) lb.TopIndex = lb.Items.Count - 1;<br />
    }<br />
  }<br />
}


Andrus

GeneralRe: Writing to screen form Pin
Luc Pattyn23-Jul-07 6:21
sitebuilderLuc Pattyn23-Jul-07 6:21 
GeneralRe: Writing to screen form Pin
AndrusM23-Jul-07 6:27
AndrusM23-Jul-07 6:27 
GeneralRe: Writing to screen form Pin
Luc Pattyn23-Jul-07 6:35
sitebuilderLuc Pattyn23-Jul-07 6:35 
GeneralRe: Writing to screen form Pin
AndrusM23-Jul-07 6:53
AndrusM23-Jul-07 6:53 
GeneralRe: Writing to screen form Pin
Luc Pattyn23-Jul-07 7:08
sitebuilderLuc Pattyn23-Jul-07 7:08 
GeneralRe: Writing to screen form Pin
AndrusM23-Jul-07 23:45
AndrusM23-Jul-07 23:45 
GeneralRe: Writing to screen form Pin
PaulPrice23-Jul-07 7:26
PaulPrice23-Jul-07 7:26 
GeneralRe: Writing to screen form Pin
AndrusM23-Jul-07 23:48
AndrusM23-Jul-07 23:48 
GeneralRe: Writing to screen form Pin
PaulPrice23-Jul-07 23:51
PaulPrice23-Jul-07 23:51 
GeneralRe: Writing to screen form Pin
AndrusM24-Jul-07 5:28
AndrusM24-Jul-07 5:28 
GeneralRe: Writing to screen form Pin
Luc Pattyn24-Jul-07 5:49
sitebuilderLuc Pattyn24-Jul-07 5:49 
GeneralRe: Writing to screen form Pin
AndrusM24-Jul-07 6:49
AndrusM24-Jul-07 6:49 
QuestionInvoke and Form.ShowDialog ? Pin
Eike Mueller23-Jul-07 4:53
Eike Mueller23-Jul-07 4:53 
AnswerRe: Invoke and Form.ShowDialog ? Pin
Luc Pattyn23-Jul-07 5:15
sitebuilderLuc Pattyn23-Jul-07 5:15 
GeneralRe: Invoke and Form.ShowDialog ? Pin
Eike Mueller23-Jul-07 5:42
Eike Mueller23-Jul-07 5:42 
GeneralRe: Invoke and Form.ShowDialog ? Pin
Luc Pattyn23-Jul-07 6:11
sitebuilderLuc Pattyn23-Jul-07 6:11 
GeneralRe: Invoke and Form.ShowDialog ? Pin
Eike Mueller23-Jul-07 21:16
Eike Mueller23-Jul-07 21:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.