Results 1 to 6 of 6

Thread: [RESOLVED] 3 Very Simple Questions

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    18

    Resolved [RESOLVED] 3 Very Simple Questions

    Hi

    Is it posible to have vairibles like so:
    VB Code:
    1. Dim Var1 as Short
    2. Dim Var2 as Short
    3.  
    4. Text"Var1"Part"Var2" = Green
    And if so what is the syntax?


    Is it possible to have a script that is constantly running, as I have only managed to make scripts run on events


    Lastly:
    Shortcuts to exe's have the .exe location, and also the location to start the program in.
    How do I do this in VB?

    Many thanks,
    Yacoby
    Many thanks,
    ~Yacoby

    Using:
    Visual Basic 2005 Express

    If I am not asking a stupid question, there is someting wrong

  2. #2
    Hyperactive Member
    Join Date
    Jul 2004
    Location
    Kansas, USA
    Posts
    352

    Re: 3 Very Simple Questions

    welcome to vbforums

    What does this mean? I'm not familar with it:
    Text"Var1"Part"Var2" = Green
    Is it possible to have a script that is constantly running, as I have only managed to make scripts run on events
    Yes, you can do this. It is possible to compile VB code as apps (exe's) that run all the time. It is also possible to remove the tile on the task bar and just have an icon in the system tray. It is also possible to run VB apps as a service, although I have no experience with this, it is quite advanced.

    Shortcuts to exe's have the .exe location, and also the location to start the program in.
    How do I do this in VB?
    Check to see if your version of VB has deployment application built in. I downloaded the Beta version at home and it did not have the ability to build a "setup" application to install your app on the users machine. You may have to spring for a higher version if this is not a part of your version.

    Lastly. This is a great forum with lots and lots of good advice. It has a lot of posts. Learn to search first, you will see some names over and over again with posts in the neighborhood or 2,000 - 12,000? These people probally are not naturally brilliant (sorry guys) they are really, really persistent at researching their questions and finding out their answers by searching this forum and the help files (both local and online). I appreciate these people deeply, you will learn a lot by reading what has already been posted first.

    Good luck.
    Thanks,
    Eric
    --------------------------------------------------------------------------------------------------------------------
    VB.net/C# ... Visual Studio 2019
    "None of us are as smart as all of us."

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: 3 Very Simple Questions

    Quote Originally Posted by Yacoby
    Hi

    Is it posible to have vairibles like so:
    VB Code:
    1. Dim Var1 as Short
    2. Dim Var2 as Short
    3.  
    4. Text"Var1"Part"Var2" = Green
    And if so what is the syntax?
    Unless you implement some heavy reflection, You can't do this. Are you coming from a PHP background?


    Is it possible to have a script that is constantly running, as I have only managed to make scripts run on events
    Windows Services.

    Lastly:
    Shortcuts to exe's have the .exe location, and also the location to start the program in.
    How do I do this in VB?
    Do what? Make a shortcut or launch an EXE?

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    18

    Re: 3 Very Simple Questions

    Do what? Make a shortcut or launch an EXE?
    Launch a program via VB

    '------------------------

    Unless you implement some heavy reflection, You can't do this.
    Ah, OK

    Are you coming from a PHP background?
    No, it is just someting in my mind that you should be able to do

    I don't have any real scripting ecperiance at all (I did some for a PC game mod but that doesn't count as it was very simple language) , and I am doing VB for A level, but I have got annoyed obout how everything they gave me to do is so simple, so I am doing stuff on my own.

    '------------------------

    Is it possible to have a script that is constantly running, as I have only managed to make scripts run on events
    Ok. I um.. Wrote something/tried to explain something wrong

    You can run parts of scripts, when you click a button, when you dobule click, when a dropdown is opened etc (See below for an example)

    VB Code:
    1. Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
    2.         Close()
    3.     End Sub

    But is there any way so that part of the script is running all the time the app (.exe) is open, and you don't have to do any action

    I just haven't found a way to do this yet.

    I hope you understand this better now

    '------------------------

    What does this mean? I'm not familar with it:
    VB Code:
    1. Text"Var1"Part"Var2" = Green
    I should have put:
    VB Code:
    1. Text"Var1"Part"Var2".text = Green
    I wasn't sure of the syntax so I made it up

    What I wanted to do was:
    VB Code:
    1. Dim Var1 as short
    2. Dim Var2 as short
    3.  
    4. 'If the code was like this
    5. Text"Var1"Part"Var2".text = Green
    6.  
    7. 'And the vars were set like this
    8. Var1 = 2
    9. Var2 = 5
    10.  
    11. 'then in effect, it would look like this:
    12. Text2Part5.text = Green


    I hope I made myself clearer this time

    Thank you both for your help
    Yacoby
    Last edited by Yacoby; Feb 28th, 2006 at 11:50 AM.
    Many thanks,
    ~Yacoby

    Using:
    Visual Basic 2005 Express

    If I am not asking a stupid question, there is someting wrong

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: 3 Very Simple Questions

    System.Diagnostics.Process.Start("C:\Path\To.Exe")

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    18

    Re: 3 Very Simple Questions

    Quote Originally Posted by mendhak
    System.Diagnostics.Process.Start("C:\Path\To.Exe")
    That only works if the aplication is in the directory where the .exe is, I was looking for a command that would run it from an aplication placed anywhere
    Many thanks,
    ~Yacoby

    Using:
    Visual Basic 2005 Express

    If I am not asking a stupid question, there is someting wrong

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width