Combining Text + Long Date

Author Message
cdoggy1

  • Total Posts : 4
  • Scores: 0
  • Reward points : 0
  • Joined: 3/1/2009
  • Status: offline
Combining Text + Long Date Sunday, March 01, 2009 4:50 PM (permalink)
0
Hello,

I'm lacking sincere help with my vbscript class. I'm behind, and need to catch up on some really basic stuff. I hope I don't bug you guys too much, but I feel like a large forum such as this may be my only hope of getting quick, intelligent answers.

1st Question...
I'm creating a basic windows application, but I need to combine the existing title bar text... "Sale Calculator" as identified in the properties field, with a LongDateString in the title bar. I'm now able to do just the LongDateString using this code:

  Dim BookSalesForm As DateTime= date.now
  Me.Text = CStr(BookSalesForm.ToLongDateString)
This provides a title bar of "Sunday, March 01, 2009"

I would like it to Display "Sale Calculator, Sunday, March 01, 2009" But using the text in the form properties as the reference for "Sale Calculator"

2nd Question...

How does one set access keys to particular buttons in the properties field? Basically I want the sales "btncalculator"  to be automated by pressing the button "C"

Thanks!

P.S.

I'm not super familiar with these forums, so if I'm lacking in question etiquette please direct me to the appropriate question format or forum to pose these questions. Thanks again.
 
#1
    dm_4ever

    • Total Posts : 3687
    • Scores: 82
    • Reward points : 0
    • Joined: 6/29/2006
    • Location: Orange County, California
    • Status: offline
    RE: Combining Text + Long Date Sunday, March 01, 2009 5:52 PM (permalink)
    0
    First, this is a VBScript forum not a VB.NET forum.

    Secondly, I think it may be something like:  Me.Text += ", " & Date.Now().ToLongDateString

    I'm not sure about your seconds question...not really a programmer here and haven't played with that yet.
    dm_4ever

    My philosophy: K.I.S.S - Keep It Simple Stupid
    Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
    Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2
      cdoggy1

      • Total Posts : 4
      • Scores: 0
      • Reward points : 0
      • Joined: 3/1/2009
      • Status: offline
      RE: Combining Text + Long Date Monday, March 02, 2009 10:45 AM (permalink)
      0
      Thanks dm.

      The script you provided worked perfectly. I guess declaring the variable was unnecessary.

      I'm not sure what made you believe I was asking about vb.net. I'm in a vbscript class, and creating simple applications in Visual Studio.

      Thanks again.

      If anybody has any info regarding question 2, please feel free. I'm just trying to set Access Keys for particular buttons on my application.
       
      #3
        dm_4ever

        • Total Posts : 3687
        • Scores: 82
        • Reward points : 0
        • Joined: 6/29/2006
        • Location: Orange County, California
        • Status: offline
        RE: Combining Text + Long Date Monday, March 02, 2009 11:02 AM (permalink)
        0

        I'm not sure what made you believe I was asking about vb.net. I'm in a vbscript class, and creating simple applications in Visual Studio.
        1. In VBScript you don't use As i.e. Dim currentDate As DateTime
        2. VBScript does not use forms
        3. VBScript files have an extension of .vbs and require cscript.exe or wscript.exe to execute them
        The code you are working with is NOT VBScript though some of the syntax may look the same.

        As for part 2 take a look at this which I found via a google search and may be what you're looking for: http://blogs.msdn.com/trobbins/archive/2008/11/18/windows-forms-creating-an-access-key.aspx
        <message edited by dm_4ever on Monday, March 02, 2009 11:06 AM>
        dm_4ever

        My philosophy: K.I.S.S - Keep It Simple Stupid
        Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
        Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
         
        #4
          cdoggy1

          • Total Posts : 4
          • Scores: 0
          • Reward points : 0
          • Joined: 3/1/2009
          • Status: offline
          RE: Combining Text + Long Date Monday, March 02, 2009 11:19 AM (permalink)
          0
          Your right, totally different things. Not too familiar with the differences. Apologies.
           
          #5
            dm_4ever

            • Total Posts : 3687
            • Scores: 82
            • Reward points : 0
            • Joined: 6/29/2006
            • Location: Orange County, California
            • Status: offline
            RE: Combining Text + Long Date Monday, March 02, 2009 12:10 PM (permalink)
            0
            No worries.  
            dm_4ever

            My philosophy: K.I.S.S - Keep It Simple Stupid
            Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
            Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
             
            #6

              Online Bookmarks Sharing: Share/Bookmark

              Jump to:

              Current active users

              There are 0 members and 1 guests.

              Icon Legend and Permission

              • New Messages
              • No New Messages
              • Hot Topic w/ New Messages
              • Hot Topic w/o New Messages
              • Locked w/ New Messages
              • Locked w/o New Messages
              • Read Message
              • Post New Thread
              • Reply to message
              • Post New Poll
              • Submit Vote
              • Post reward post
              • Delete my own posts
              • Delete my own threads
              • Rate post

              2000-2012 ASPPlayground.NET Forum Version 3.9