Note that there are some explanatory texts on larger screens.

plurals
  1. POTicker generated forms not displaying correctly
    primarykey
    data
    text
    <p>Hopefully this isn't too difficult to follow.</p> <p>I'm currently working on a small timelogging application that runs quietly in the background. Every time the ticker runs down, the application prompts the user to say what he/she was doing since the last prompt. I'll eventually have the application write the data into a spreadsheet.</p> <p>One of the options I have so far enables the user to choose whether or not he/she would like to use the default prompting setting (every time a prompt is missed, it stays visible until the next one is created, meaning if the user leaves his/her computer for a while there may be a fair few prompts sitting on the screen waiting to be filled in) or would like to combine all the prompts (every time a prompt is missed and a new one pops up, the old one is closed and the new one covers the time of the old prompt and the new prompt).</p> <p>The user can also select a tickbox to turn prompts off. When he/she turns prompts back on again, a prompt pops up asking the user to fill in what he/she was doing while prompts were turned off (useful when the user is running fullscreen applications, etc).</p> <p>My problem is, when I try to generate the prompts, they don't display correctly. I can't manipulate them at all and none of the controls display. They basically look like empty forms.</p> <p>Here's my code for generating prompts using the ticker:</p> <pre><code>public void ticker(object source, System.Timers.ElapsedEventArgs e) { if (groupMissed) { incrementsMissed += 1; if (incrementsMissed &gt; 1) { IncrementForm form = (IncrementForm)Application.OpenForms["IncrementForm"]; if (form.InvokeRequired) { form.Invoke(new MethodInvoker(delegate { form.Close(); })); } } } else { incrementsMissed = 1; } IncrementForm theIncrementForm = new IncrementForm(this, e.SignalTime); theIncrementForm.Show(); latestIncrement = e.SignalTime; } </code></pre> <p>And here's my code for generating prompts using the "turn prompts off" checkbox:</p> <pre><code>private void chkbxAlerts_Click(object sender, EventArgs e) { if (!chkbxAlerts.Checked) { // Ensures that the time missed is covered and restarts the timer DateTime now; now = DateTime.Now; if ((now - latestIncrement).TotalMinutes &gt;= 1) // Only records time if it is equal to or greater than one minute { // TO-DO: FIX if (groupMissed) { incrementsMissed += 1; if (incrementsMissed &gt; 1) { IncrementForm form = (IncrementForm)Application.OpenForms["IncrementForm"]; if (form.InvokeRequired) { form.Invoke(new MethodInvoker(delegate { form.Close(); })); } } } else { incrementsMissed = 1; } IncrementForm theIncrementForm = new IncrementForm(this, now, latestIncrement); theIncrementForm.Show(); latestIncrement = now; } timer.Enabled = true; } else { // Stops the timer timer.Enabled = false; } } </code></pre> <p>If you need any further clarification, please let me know. Thanks so much in advance for any help, this has been bugging me.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload