a few questions that i cannot find solutions too

Discussion in 'Programming General' started by kevinak, Mar 1, 2008.

a few questions that i cannot find solutions too
  1. Unread #1 - Mar 1, 2008 at 2:56 PM
  2. kevinak
    Referrals:
    0

    kevinak Guest

    a few questions that i cannot find solutions too

    So i used to work with vb 6 and have to work with it for a class. I got tired of it so i got VB2008. Making things short. I need a little help..

    First is there anyway i can set a single picturebox and thur code, load different pictures into it? I'm not quite sure how.

    How do i pull data from a excel spread sheet? Can you explain it in simple terms?

    Also, what's the code for making a var = a random integer?

    Oh and is there any way to keep a frame or "groupbox" from falling into another one when placed over top of it?
     
  3. Unread #2 - Mar 2, 2008 at 2:51 AM
  4. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    a few questions that i cannot find solutions too

    This peice of code will open a file and put the contents of the file into a string:
    Code:
    Public Function LoadFile(sLocation As String) As String
        Dim fFile As Integer
        fFile = FreeFile
        Open sLocation For Input As fFile
            LoadFile = Input(LOF(fFile), fFile)
        Close fFile
    End Function
    Usage:
    Code:
    dim strExcelFile as string
    strexcelfile = loadfile("C:/penis.xcl")
    Code:
    dim intNumber as integer
    randomize
    intnumber = int(rnd * 9999)
    Simply draw your first frame onto your form, then copy and paste it onto the form again, just make SURE you click on the form and select paste.
     
< Splash screen help needed | QUICK QUESTION-need help saveing >

Users viewing this thread
1 guest


 
 
Adblock breaks this site