Click here to Skip to main content
15,912,329 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to set text of textbox with value user entered in another form at form close Pin
OriginalGriff17-Apr-10 4:47
mveOriginalGriff17-Apr-10 4:47 
GeneralRe: How to set text of textbox with value user entered in another form at form close Pin
linqabc17-Apr-10 22:26
linqabc17-Apr-10 22:26 
GeneralRe: How to set text of textbox with value user entered in another form at form close Pin
OriginalGriff17-Apr-10 22:36
mveOriginalGriff17-Apr-10 22:36 
GeneralRe: How to set text of textbox with value user entered in another form at form close Pin
linqabc17-Apr-10 22:52
linqabc17-Apr-10 22:52 
GeneralRe: How to set text of textbox with value user entered in another form at form close (alternative method) Pin
supercat919-Apr-10 5:48
supercat919-Apr-10 5:48 
QuestionOutlook Plug-in Button Issue! Pin
Sr...Frank16-Apr-10 23:09
Sr...Frank16-Apr-10 23:09 
AnswerRe: Outlook Plug-in Button Issue! Pin
Md. Marufuzzaman18-Apr-10 1:38
professionalMd. Marufuzzaman18-Apr-10 1:38 
QuestionTimer tick event count Pin
mprice21416-Apr-10 18:00
mprice21416-Apr-10 18:00 
Hi all,

I've been trying to solve this problem for over an hour and as I'm a rookie I know that what I want to do is easy to implement, but my lack of experience is preventing me from doing so. With that said, I have some code for a ZedGraph dynamically updating control. Notice that the variable double time controls the x Scale. This code is executed in a timer tick event in order to draw the line on the graph. However, as the x-scale is driven by Environment.Tickcount (which is totally independent of the timer) the graph x-axis increments regardless of whether the timer is enabled or not. I want the double time to be replaced with a double that is based upon the elapsed time of the timer and not the Environment.TickCount, but I can't figure this out. Maybe because I'm too tired... Smile | :) Thanks in advance for any help.

//make sure curvelist has one curve
           if (zedGraphControl1.GraphPane.CurveList.Count <= 0)
               return;
           //Get first CurveItem in Graph
           LineItem curve = zedGraphControl1.GraphPane.CurveList[0] as LineItem;
           if (curve == null)
               return;
           // Get the PointPairList
           IPointListEdit list = curve.Points as IPointListEdit;
           // If this is null, it means the reference at curve.Points does not
           // support IPointListEdit, so we won't be able to modify it
           if (list == null)
               return;

           // Time is measured in seconds

           double time = (Environment.TickCount - tickStart) / 1000.0;


           // 3 seconds per cycle
           list.Add(time, dblLabel);

           // Keep the X scale at a rolling 30 second interval, with one
           // major step between the max X value and the end of the axis
           Scale xScale = zedGraphControl1.GraphPane.XAxis.Scale;
           if (time > xScale.Max - xScale.MajorStep)
           {
               xScale.Max = time + xScale.MajorStep;
               xScale.Min = xScale.Max - 30.0;
           }

           // Make sure the Y axis is rescaled to accommodate actual data
           zedGraphControl1.AxisChange();
           // Force a redraw
           zedGraphControl1.Invalidate();

AnswerRe: Timer tick event count Pin
OriginalGriff16-Apr-10 21:48
mveOriginalGriff16-Apr-10 21:48 
GeneralRe: Timer tick event count Pin
mprice21417-Apr-10 4:07
mprice21417-Apr-10 4:07 
GeneralRe: Timer tick event count Pin
OriginalGriff17-Apr-10 4:51
mveOriginalGriff17-Apr-10 4:51 
QuestionDisconnected Context Issue Pin
tims8116-Apr-10 14:03
tims8116-Apr-10 14:03 
AnswerRe: Disconnected Context Issue Pin
cbin9-Feb-11 22:34
cbin9-Feb-11 22:34 
Questionhow to input image in c#[modified] Pin
samuel200216-Apr-10 10:31
samuel200216-Apr-10 10:31 
AnswerRe: how to input image in c Pin
Tarakeshwar Reddy16-Apr-10 11:37
professionalTarakeshwar Reddy16-Apr-10 11:37 
QuestionHow to Make textbox autocomplete? Pin
lamiaa_12316-Apr-10 10:13
lamiaa_12316-Apr-10 10:13 
AnswerRe: How to Make textbox autocomplete? Pin
Jimmanuel16-Apr-10 10:24
Jimmanuel16-Apr-10 10:24 
GeneralRe: How to Make textbox autocomplete? Pin
linqabc16-Apr-10 22:56
linqabc16-Apr-10 22:56 
GeneralRe: How to Make textbox autocomplete? Pin
Jimmanuel17-Apr-10 1:47
Jimmanuel17-Apr-10 1:47 
AnswerRe: How to Make textbox autocomplete? Pin
Ravi Bhavnani16-Apr-10 12:29
professionalRavi Bhavnani16-Apr-10 12:29 
QuestionHow to auto-select a newly added row in the DataGrid? [modified] Pin
Donnelly James16-Apr-10 9:23
Donnelly James16-Apr-10 9:23 
AnswerRe: How to auto-select a newly added row in the DataGrid? Pin
Dave Buhl16-Apr-10 12:04
Dave Buhl16-Apr-10 12:04 
GeneralRe: How to auto-select a newly added row in the DataGrid? Pin
Donnelly James19-Apr-10 3:53
Donnelly James19-Apr-10 3:53 
GeneralRe: How to auto-select a newly added row in the DataGrid? Pin
Dave Buhl19-Apr-10 6:13
Dave Buhl19-Apr-10 6:13 
GeneralRe: How to auto-select a newly added row in the DataGrid? Pin
Donnelly James21-Apr-10 4:16
Donnelly James21-Apr-10 4: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.