Tech Off Post

Single Post Permalink

View Thread: Not Serious - Foolish, Try Catch
  • User profile image
    SEP2007

    jsampsonPC wrote:
    C3PO?

    Dunno who that is, but I'm sorry if they jumped on you for not asking a highly-technical question Tongue Out I would, just as a friendly comment, ask that you not respond to people with things like "F8ck off" as your comment...that might get you in trouble with admins.

    Anyway, I'm interested in your idea about creating custom formatting in an editor. Unfortunately, I don't understand your visual-demonstration, so could you write up a couple of descriptions, or examples, of what you mean?

    Thanks!



    Thanks Man. Some Positive feed back instead of being slated.

    Ok,

    If in the VB editor I write.

    Try
    Me.Richtextbox.Loadfile("thefile")
    Catch ex as Exception
    Msgbox ex.message
    End Try

    Then if formatting is on, "pritty formatting" the editor in Visual Studio writes :

    Try
        Me.Richtextbox.Loadfile("thefile")
    Catch ex as Exception
        Msgbox ex.message
    End Try

    And puts in colours too, Ok?

    What I wanted to do, to make the program more visual on the page, was to specifiy formating rules in the editor for different code-words(for-next, try-catch, sub, function).

    So I could specify that:

    Try
    Me.Richtextbox.Loadfile("thefile")
    Catch ex as Exception
    Msgbox ex.message
    End Try

    was reformmated as

    '----------------------------------------------------------'
    Try
           Me.Richtextbox.Loadfile("thefile")

                                         Catch Ex as Exception
                                         '*****************'
               
                                           Msgbox ex.message

                                         '*****************'

    End Try
    '----------------------------------------------------------'


    Its a little over the top here but I'm just trying to get across a basic principle. That you could have more than just tabs as formatting.
    And you could specify your own formating rules. And perhaps have different formatting rule (auto-formatting) for say, Events, Subs, Functions, For, While, etc.

    Does that make sense ?