Thread: Visual Basic Code Help

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    5

    Question Visual Basic Code Help

    Hello Im new! love it
    ok
    I have a question on Visual Basic and i didn't know where to put this post
    Im making a login program and i was wondering if anyone knew a code or knew how to
    make a program run after the login happens. also do you know where to put the username and passwords?

  2. #2
    Registered User
    Join Date
    May 2006
    Posts
    903
    Quote Originally Posted by Slinger137 View Post
    Hello Im new! love it
    ok
    I have a question on Visual Basic and i didn't know where to put this post
    Im making a login program and i was wondering if anyone knew a code or knew how to
    make a program run after the login happens. also do you know where to put the username and passwords?
    I'm curious what logic made you post a VB question on a C++ board.

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    5
    well aren't they in the same general coding area?
    dont they have the same codes? basically?

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by Slinger137 View Post
    well aren't they in the same general coding area?
    dont they have the same codes? basically?
    ... No?

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    903
    Quote Originally Posted by Slinger137 View Post
    well aren't they in the same general coding area?
    dont they have the same codes? basically?
    Their syntax and characteristics are much, much, much different.

  6. #6
    Registered User
    Join Date
    Jan 2009
    Posts
    5
    well then move it...
    i didn't know where to put it i sayed that
    i just need help

  7. #7
    Registered User
    Join Date
    May 2006
    Posts
    903
    Well unless you get lucky and someone knowledgeable can answer your question (which was not correctly asked anyway) you're out of luck getting an answer to a VB question in the C++ programming section of the C Board forum which itself is on CProgramming.com whose motto is "Your resource for C and C++".

  8. #8
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    937
    Use a bios password.

    Or write a program that can run after your kernel loads, along with some dependencies, but before the shell, and use C++ to make it do this:
    Code:
    #include <iostream>
    #include <fstream>
    #include <string>
    
    main()
    {
        const char path[] = "C:\\conspicuous_text.txt";
        std::ifstream reader(path);
        std::string buf;
        reader >> buf;
    
        std::string input;
        do
        {
           std::cout << "What's the password?" << std::endl;
           std::cin >> input;
        } while(input != buf);
    }
    In fact, abandon Visual Basic altogether and start using this site. Fate hath brought you here.
    Last edited by CodeMonkey; 01-03-2009 at 10:40 PM. Reason: string header
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  9. #9
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > Hello Im new
    Welcome.

    > Im making a login program and i was wondering if anyone knew
    Aren't we getting ahead of ourselves here?
    Whilst what you want is doable (obviously), it's not newbie code by any means.

    If you want to be a good programmer, there's a long apprentiship to serve, where you learn the tools to allow you to make any program you want.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  10. #10
    Registered User Joelito's Avatar
    Join Date
    Mar 2005
    Location
    Tijuana, BC, México
    Posts
    310

    Wink

    Quote Originally Posted by Slinger137 View Post
    Hello Im new! love it
    ok
    I have a question on Visual Basic and i didn't know where to put this post
    Im making a login program and i was wondering if anyone knew a code or knew how to
    make a program run after the login happens. also do you know where to put the username and passwords?
    Ok, you are in luck...and I just need the default form (form1) and a single inputbox:
    Code:
    Private Sub Form_Load()
    Dim pass As String
    Dim another As Boolean
    
    another = True ' to keep it alive the loop
    
    
    While another = True ' loop it
    pass = InputBox("Password please") ' ask a password
    If pass = "poop" Then ' test if the user text is the correct one
        another = False ' then... we're done
    End If
    Wend
    End Sub
    * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
    * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  2. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  3. MS Visual C++ 6 wont include vector.h in a header file
    By bardsley99 in forum C++ Programming
    Replies: 9
    Last Post: 11-06-2003, 12:05 PM
  4. errors in my class....
    By o0obruceleeo0o in forum C++ Programming
    Replies: 9
    Last Post: 04-14-2003, 03:22 AM
  5. Visual Basic Adodc Problem
    By rahat in forum Windows Programming
    Replies: 1
    Last Post: 01-20-2002, 06:55 AM