different,user,logins,WindowsTired,having,sam
Quick Search for:  in language:    
different,user,logins,WindowsTired,having,sam
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
RentACoder Stats

 Code:  lines
 Jobs: 0 postings

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for RentACoder.
Wrapping Scrolling Text
By Paranoid_Androi d on 7/2


Create A Dummy File
By AML on 7/2


Click here to see a screenshot of this code!Captionbar manipulation!
By Peter Hebels on 7/2

(Screen Shot)

A Game Of War
By Co0nest on 7/2


Click here to see a screenshot of this code!KeyGen Example
By Bengie|NET on 7/2

(Screen Shot)

Click here to see a screenshot of this code!OpenBrowser v1.9
By Orlando Jerez on 7/2

(Screen Shot)

SendMessageBySt ring() Example
By Jaime Muscatelli on 7/2


Click here to see a screenshot of this code!FirstSunday
By Jan Paul Penning on 7/2

(Screen Shot)

Click here to see a screenshot of this code!Ikonz v1.0
By Gaurav Creations on 7/2

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

Personal StartUp! As simple as it can get...

Print
Email
 
VB icon
Submitted on: 6/10/1999
By: Hyperswede 
Level: Not Given
User Rating: By 102 Users
Compatibility:

Users have accessed this code 4551 times.
 
 
     Do you use different user logins in Windows? Tired of having the same StartUp folder just because the users share the same Start Menu? Then this solves your problem!
 

Windows API/Global Declarations:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!

    //**************************************
    //     
    //Windows API/Global Declarations for :P
    //     ersonal StartUp! As simple as it can get
    //     ...
    //**************************************
    //     
    Declare Function WNetGetUser Lib "mpr" _
    Alias "WNetGetUserA" (ByVal lpName As _
    String, ByVal lpUserName As String, _
    lpnLength As Long) As Long
    Public Function UserID() As String
    Dim sUserNameBuffer As String * 255
    sUserNameBuffer = Space(255)
    Call WNetGetUser(vbNullString, _
    sUserNameBuffer, 255&)
    UserID = Left$(sUserNameBuffer, _
    InStr(sUserNameBuffer, _
    vbNullChar) - 1)
    If UserID = "" Then UserID = "default"
    End Function
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for langauges that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

    //**************************************
    //     
    // Name: Personal StartUp! As simple as 
    //     it can get...
    // Description:Do you use different user
    //     logins in Windows?
    Tired of having the same StartUp folder just because the users share the same Start Menu?
    Then this solves your problem!
    // By: Hyperswede
    //
    // Inputs:How to use personal startups.
    1) Add the source code below to a new project.
    2) Make an exe file.
    3) Create a shortcut in your StartUp folder that points to the exe.
    4) Log Out and Log In again as the person you want to give personal startup.
    5) Check in the directory where you put the exe.
    6) Open the file UserID.txt with notepad (Replace UserID with yor UserID)
    7) Add the path of the files you want to start when windows starts, separate the paths of the different files by hitting enter.
    8) Done!
    //
    // Returns:Starts different programs on 
    //     startup depending on the who has logged 
    //     in.
    //
    // Side Effects:None that i know of.
    //
    //This code is copyrighted and has    // limited warranties.Please see http://
    //     www.Planet-Source-Code.com/xq/ASP/txtCod
    //     eId.2047/lngWId.-10/qx/vb/scripts/ShowCo
    //     de.htm    //for details.    //**************************************
    //     
    
    Private Sub Form_Load()
    Dim OpenWhat
    'MsgBox UserID
    On Error GoTo bwell
    Open App.Path & "\" & UserID & ".txt" For Input As #1
    On Error Resume Next
    Do Until EOF(1)
    Line Input #1, OpenWhat
    Shell "Start " & OpenWhat
    Loop
    Close #1
    End
    bwell:
    Open App.Path & "\" & UserID & ".txt" For Output As #2: Close #2
    Resume
    End Sub


Other 9 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
7/20/1999 1:26:00 AM:Rianto / Jimmy Suharry
I want to learn with you, would you 
want to teach me?
I'll wait your 
answer, Thanks
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/3/1999 1:39:00 AM:Richard
Instead of open #1 and then if this 
fails, do #2, have a variable and use 
the freefile command...
DIm 
lFreeFile AS long 
lFreeFile = 
FreeFile
Open App.Path & "\" & 
UserID & ".txt" For Input As 
#lFreeFile
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | RentACoder Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.