|
-
November 25th, 2005, 01:15 PM
#1
Cursor changes and save problems
Hi all i'm new to the site but here goes. I'm having 2 different problems:
1.) I'm trying to make my cursor change to the "appStarting" cursor when one of my child forms is opening. I can't seem to make it work, i've tried using the RaiseEvent method but that didn't seem to work for me.
2.) I am using save and open dialog boxes Everything works fine I can save and I can open and fill all the labels and text boxes with the info. The problem comes when i try to do new operations with the information. It just replaces what's in the textbox and never uses the information.
This is my code for the open dialog
Try
With openCheck
.Filter = "Text files (*.txt)|*.txt|" & "All files|*.*"
'setting filters so that Text files and All Files choice appears in the
'in the dialog
If .ShowDialog() = DialogResult.OK Then
'showDialog method makes the dialog box visible at run time
FileName = .FileName
sr = New StreamReader(.OpenFile)
'using streamreader to read the opened text file
lblBal.Text = sr.ReadLine.ToString()
countDeposit = Integer.Parse(sr.ReadLine)
summaryInstance.txtDeposit.Text = countDeposit.ToString
totalDeposit = CDec(sr.ReadLine)
countGas = Integer.Parse(sr.ReadLine)
totalGas = CDec(sr.ReadLine)
countFood = Integer.Parse(sr.ReadLine)
totalFood = CDec(sr.ReadLine)
countMisc = Integer.Parse(sr.ReadLine)
totalMisc = CDec(sr.ReadLine)
End If
End With
Catch es As Exception
MessageBox.Show(es.Message)
Finally
If Not (sr Is Nothing) Then
sr.Close()
End If
End Try
I can post my code used for the save if it will help...i think my problem is somewhere in the assignment of the streamreader but I'm not sure...sorry for the long post and I can't seem to find how you format your code on here so i'ts going to be hard to read but any help is very much appreciated
-
November 26th, 2005, 01:56 AM
#2
Re: Cursor changes and save problems
 Originally Posted by Bgrove83
Hi all i'm new to the site but here goes. I'm having 2 different problems:
1.) I'm trying to make my cursor change to the "appStarting" cursor when one of my child forms is opening. I can't seem to make it work, i've tried using the RaiseEvent method but that didn't seem to work for me.
Hello & Welcome!
By "appStarting" cursor, do you mean the Hourglass ¿
If so you could use:
Code:
Me.Cursor = System.Windows.Forms.Cursors.AppStarting
Here's more info
 Originally Posted by Bgrove83
I can post my code used for the save if it will help...i think my problem is somewhere in the assignment of the streamreader but I'm not sure...sorry for the long post and I can't seem to find how you format your code on here so i'ts going to be hard to read but any help is very much appreciated
Just use
Last edited by HanneSThEGreaT; November 28th, 2005 at 02:09 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|