Jump to content
Xtreme .Net Talk

TamuTamu

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by TamuTamu

  1. Cool, that'll save me some typing in the future, thanks :)
  2. My apologies then, I know nothing of this at present and as far as I can see resources on the net are somewhat limited at present. :(
  3. What is a datagridview, is that with VS2005Beta?
  4. A sample. Press the button and it will change the selected cell programatically.DataGridCurrentCellTest.zip
  5. No no no, NOT DataGridViewCell() DataGridCell() this.dataGrid1.CurrentCell = new DataGridCell(0,0); No "View". It is a datagrid you're trying to modify isn't it? HTH TamuTamu
  6. This is C# but I figure the code should be roughly the same for VB.NET. Whenever I deal with filestreams I always use the same structure of code: FileStream fs = null; TextWriter writer = null; try { fs = new FileStream(somePath, FileMode.Create); writer = new StreamWriter(fs); writer.Write("Some Stuff"); /// put more useful stuff here } finally { if(writer!= null) { writer.Close(); } if(fs!=null) { fs.Close(); } } No matter what happens in the code the stream will be closed as it is within the finally braces. The error will no longer occur, additionally if you have the problem with one of your files in windows if you log out and log back in it will clear all the filestreams.
  7. Yes, additionally when the stream is closed flush is automatically called.
  8. It should be @"\Storage Card" or "\\Storage Card" It wont work on the emulator because the emulator doesn't have a storage card.
  9. this.dataGrid1.CurrentCell = new DataGridCell(0,0); will select the cell at 0,0. HTH TamuTamu
  10. reference the Microsoft.VisualBasic.DLL Microsoft.VisualBasic.Interaction.Beep();
  11. Additonally if you use the KeyDown or KeyUp event check to see what the key is, is simple by using the Keys enumerable. private void TextBox1_KeyUp(object sender, KeyEventArgs e) { if(e.KeyCode == Keys.Enter) { MessageBox.Show("You pressed enter"); } } KeyPress is useful to allow only letters or numbers for example. private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if(!Char.IsControl(e.KeyChar) && !Char.IsNumber(e.KeyChar)) { e.Handled = true; } } The code above will not allow anything that isn't a control (ENTER, ESCAPE, CTRL etc or a number)
  12. Try http://www.OpenNETCF.org They have a calender control and it's free and open source! Yay! :)
  13. Interval = Milleseconds I put in 60 and got the timer event hitting every 60 milleseconds, when you apply the timer.Interval value you want it to be tripping very second yea? Then it should be done like this..... private int seconds = 60; private void SomeBeginningMethod() { Timer t = new Timer(); t.Interval = 1000;//takes a milleseconds value t.Tick+=new EventHandler(t_Tick); t.Enabled = true; } private void t_Tick(object sender, System.EventArgs e) { seconds--; if(seconds<1) { MessageBox.Show("Out of seconds"); Timer t = (Timer)sender; t.Enabled = false; t.Dispose(); } }
×
×
  • Create New...