
SEVI
Avatar/Signature-
Posts
48 -
Joined
-
Last visited
About SEVI
- Birthday November 17
Personal Information
-
Occupation
Programmer
-
Visual Studio .NET Version
VS .NET Professional
-
.NET Preferred Language
C#
SEVI's Achievements
Newbie (1/14)
0
Reputation
-
Check out thread: process.start question
-
I'm not sure what you mean exactly, but to get you started you should look into the System.Diagnostics.Process class. If you want to return the output of the shell command to the child form then there are methods to recieve StandardOut return data from the shell script and feed it back to whatever class created the Process object. SEVI
-
Hi Coding in c# I am using the richtextbox class to enter and format text. I would like to extract the resultant RTF text to an image. Does anyone know if this is possible? I played around with the CreateGraphics() method but couldn't get it to dump the RTF contents into the graphics object. Any ideas or resources/components that may parse the RTF so I can do it manually. Thanks SEVI
-
Thanks guys.. will give it a look in the morning..
-
Thanks all.. Method() { // set wait cursor Cursor.Current = Cursors.WaitCursor; Method calls to other classes.. // set wait cursor Cursor.Current = Cursors.Default; I know it makes it hard without code.. The application in question is quite large and class hops a fair bit so I can't really post much here. The method body can traverse around 6 class levels which makes it hard to solve these sorts of bugs. I was hoping there may have been some little gem of info around like .. oh yeah if a thread hits a try catch block the Cursor will back back to system default, or something.. SEVI
-
I've had a similar problem, I ended up getting a global keyboard hook component written for me. I tried using KeyPreview for this task and it's not a great solution as some components like buttons and perhaps your grid tend to like to steal the focus and hence the KeyStrokes regardless of wherther KeyPreview is set or not. I've found it does work but when things change it's hard to get the focus back without doing alot of messing around. PM me if you're interested and I'll put you onto the guy that wrote the keyboard hook for me. SEVI
-
Hi I'm setting Cursor.Current = Cursors.WaitCursor and I'm finding that sometimes it will go back to Cursors.Default before I want it to, which can be confusing for the end user. I'm guess perhaps the system is setting it back when it hits an event or perhaps try and catch.. Unsure. Does anyone know what if the framework can cause the Cursor.Current to go back to Cursors.Default. Can I overcome this somehow? Can I change Cursors.Default to be Cursors.WaitCursor? Thanks SEVI
-
Oh so simple.. Done! In the end it was kinda simple, but it annoys me that the reference books led me down the wrong path using the Hide() means of creating a custom dialog. They were indicating that by using Close() the form object would be destroyed and therefore data would be inaccessable to the main form. It was totally un-necessary. I was unaware that even when Close() is called on form (that is not the main form of course) the form object and all exposed variables will continue to exist. Therefore as Dan mentioned, no need to Hide the form, just Close it and grab data as required. Lesson learnt.. don't always trust what you read.. Thanks for the help! SEVI
-
Thanks for your response.. Do you mean instead of calling this.Hide() in Form2? I'm keeping the form in scope by calling Hide so I can pass parameters back from Form2 to Form1. Then disposing of it after I'm done.. this is how the text books show it should be done but it looks terrible, especially when theres alot of controls on Form1. Here is the code from my project: frmProjectLayout oProjectLayoutForm = new frmProjectLayout(this.oMainForm); oProjectLayoutForm.ShowDialog(this.oMainForm); switch (oProjectLayoutForm.DialogResult) { // ok was pressed case DialogResult.OK: // populate user selected vars this.oName = oProjectLayoutForm.o_FrameName; this.oFrameSizeF = new SizeF(oProjectLayoutForm.o_FrameSize.Width, oProjectLayoutForm.o_FrameSize.Height); case DialogResult.Cancel: break;
-
Still haven't found an answer to this one. Is it normal for a main form to flicker so much when a form it created goes out of scope? I've tested it out in case it was my project but even a simple example does the same thing.. Have others noticed this or is it just me?? using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace WindowsApplication2 { public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.Button button1; private System.ComponentModel.Container components = null; public Form1() { InitializeComponent(); } protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code private void InitializeComponent() { this.button1 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // button1 // this.button1.Location = new System.Drawing.Point(104, 96); this.button1.Name = "button1"; this.button1.TabIndex = 0; this.button1.Text = "FORM 2"; this.button1.Click += new System.EventHandler(this.button1_Click); // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(292, 273); this.Controls.Add(this.button1); this.Name = "Form1"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Form1"; this.ResumeLayout(false); } #endregion [sTAThread] static void Main() { Application.Run(new Form1()); } private void button1_Click(object sender, System.EventArgs e) { Form2 f2 = new Form2(); f2.ShowDialog(); f2.Close(); } } public class Form2 : System.Windows.Forms.Form { private System.Windows.Forms.Button button1; private System.ComponentModel.Container components = null; public Form2() { InitializeComponent(); } protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code private void InitializeComponent() { this.button1 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // button1 // this.button1.Location = new System.Drawing.Point(88, 136); this.button1.Name = "button1"; this.button1.TabIndex = 0; this.button1.Text = "HIDE"; this.button1.Click += new System.EventHandler(this.button1_Click); // // Form2 // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(292, 273); this.Controls.Add(this.button1); this.Name = "Form2"; this.Text = "Form2"; this.ResumeLayout(false); } #endregion private void button1_Click(object sender, System.EventArgs e) { this.Hide(); } } }
-
Just noticed an error.. if (TextBox1.Text.Count => 3) { TextBox2.Focus(); // the focus should move along to the next textbox }
-
If you're asking for a hand to get started, I'd use the textbox TextChanged event then you can use TextBox1.Text.Count to find out how many characters have been entered. Something like this, from memory.. if (TextBox1.Text.Count => 3) { TextBox1.Focus(); } I'd also use some Regular Expression stuff to check that the characters entered are valid.
-
Here is an example project.. http://www.codeproject.com/csharp/my_explorer.asp
-
Please help! I have a custom dialoge form that is created via code and when I call the form.dispose(), close or even when it goes out of scope my whole main form flickers? I don't get it!! frmProjectLayout ProjectLayoutForm = new frmProjectLayout(this.MainForm); ProjectLayoutForm.ShowDialog(this.MainForm); switch (oProjectLayoutForm.DialogResult) { case DialogResult.OK: break; case DialogResult.Cancel: break; } ProjectLayoutForm.Dispose();
-
Hi Does anyone know of a way using .NET IDE or another tool that will print up a class view type report of my assembly? I just want basic info like classes names, inheritance, methods and properties. You can export to Visso but there is no way (that I can see) of printing a report without doing alot of playing around with the imported data first. Thanks SEVI