Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

JudyV

@JudyV
About
Posts
8
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • the last song
    J JudyV

    me too.

    The Lounge question

  • Postponing Close until all application windows are closed
    J JudyV

    Thank you so much JZ! That took care of the problem. I can give the user a message then send the open form to the front so they can close it cleanly. I'll look into the shutdown mode option on the project also. Thanks for all the help, Judy

    Visual Basic help database tutorial question learning

  • Postponing Close until all application windows are closed
    J JudyV

    I have an application with a main window that shows a gridview of records that can be selected and buttons along the bottom that offer options either updating one of the records or creating a new one. I use the same for for both of these functions I just make cosmetic changes to the title and buttons depending on which function the user chooses. When the user chooses to add a new record to the database a new record is created and loaded into the form. The user may then put whatever data they require into the record then they must then choose to either save the record or cancel out of the form which then deletes the blank record from the database. The only way to close this form is to select one of those options. The problem I am running into is that apparently the users are opening a form to input a new record then becoming distracted by phone calls or other processes and forgetting that they have this form open. When they return to the app they are just closing the main form which of course closes all of it's open forms which then leaves me with blank records in my database. What I would like to do is to perform a check before I close the main window to see if any other windows have been left open and run through my code to delete the database record before the application completely closes. I can use the FindWindow function to check for the open window on the window closing event of my main window but am at a loss as to how to stop the window from closing until I manage the situation. Can anyone offer me any suggestions? Thanks for all your help, Judy

    Visual Basic help database tutorial question learning

  • Restricting a multiline text box
    J JudyV

    Actually it is suppressing the keystroke on the keydown event. I created a derived class and added the count returns as a property and put the keydown event code override in the class and it works well. I also added an event for the text change to keep track of whether or not they go in and delete text and/or a return so that the count will remain accurate while they are working in the text box. Private Sub MyTextBox_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If (e.KeyCode = Keys.Enter Or e.KeyCode = Keys.Return) Then If Me.CRLFCnt > 0 Then e.SuppressKeyPress = True Else Me.CRLFCnt += 1 End If End If End Sub As I said it took me awhile to figure it out and I had a message box popping up to tell them they had tried to put in too many lines and for some reason that caused the suppress method not to work. I tried putting the message box in the keyup event but then it just looped if you hit return on the 'OK' button. If you clicked it with the mouse it went away but we try to code things so the users don't have to take their hands from the keyboard any more than possible. Thanks for your help it did point me in the right direction and saved me a lot of time. Judy

    Visual Basic csharp help css visual-studio

  • Restricting a multiline text box
    J JudyV

    Never mind. I quit displaying the message explaining that they couldn't add anymore lines and then the key supression started working. :) Thanks for all your help, Judy

    Visual Basic csharp help css visual-studio

  • Restricting a multiline text box
    J JudyV

    Ok, I've counted the number of returns in the box and can display a message but if I tell it to supress the keystroke in the keydown event it still enters the return in the box. How do I stop the return from being entered? Thanks, Judy

    Visual Basic csharp help css visual-studio

  • Restricting a multiline text box
    J JudyV

    Thanks. I was getting to that I just was wondering if perhaps there was a setting I had missed. This points me in the right direction. :) If the beatings worked I wouldn't need to do this. LOL Judy

    Visual Basic csharp help css visual-studio

  • Restricting a multiline text box
    J JudyV

    I have done some searching and can't find the answer to this one anywhere. I have a multiline textbox on a form that shows 2 lines of text on the form. I have restricted it to 200 chars because the report page that it prints on can display 200 chars in 2 lines. My problem is users can press return as many times as they want and put as many lines of text in the box as is possible before they use the 200 chars. Since the report will recognize a CRLF character and move the text to the next line if they put more than 2 lines of text in the multiline text box only 2 of those lines of text will print no matter what. They are wanting to restrict the data entry box so that only 2 lines of text can be entered even if the character count is less that 200. Is there a way to do this? I'm coding in VB.net with Visual Studio 2005 and using Crystal Reports XI for my report. I can't manipulate the report side of things to print more than 2 lines because the way the report is laid out there is no room. Thanks in advance to anyone who can help. Judy

    Visual Basic csharp help css visual-studio
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups