Results 1 to 11 of 11

Thread: VB6 BlackJack

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2009
    Posts
    160

    VB6 BlackJack

    K i made a near fully functioning blackjack excluding only the split.

    i would like to give a HUGE shoutout to techorobbo, he helped me with a lot of coding evident by this thread

    anywhere heres the attached ment, tell me what you think

    EDIT: link reuploaded, there was an issue with the application not actually closing that has been resolved
    Attached Files Attached Files
    Last edited by Cruncher; Feb 23rd, 2009 at 09:55 PM.

  2. #2
    Hyperactive Member
    Join Date
    Jan 2009
    Posts
    448

    Re: VB6 BlackJack

    I just tried this and after I quit the game blackjack.exe was still running. You may want to look into this.
    If I helped you please rate me.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2009
    Posts
    160

    Re: VB6 BlackJack

    I noticed that, do you know how thats fixable? do i need to put a button that actually runs the end command? i beleive the standard windows "x" should do the job :S

  4. #4
    Hyperactive Member
    Join Date
    Jan 2009
    Posts
    448

    Re: VB6 BlackJack

    Is that form your main form?
    If I helped you please rate me.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Feb 2009
    Posts
    160

    Re: VB6 BlackJack

    i have 4 forms dialog dialog 2 dialog 3 and Form1(the main form where blackjack is played)

  6. #6
    Hyperactive Member
    Join Date
    Jan 2009
    Posts
    448

    Re: VB6 BlackJack

    hmmm. if that is the main application form then it should be exiting. One way you may be able to fix it is by adding:

    Code:
    Application.Exit();
    to the forms closing or closed event.
    If I helped you please rate me.

  7. #7
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: VB6 BlackJack

    Please do not inclide exe files in you upload.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  8. #8
    Fanatic Member technorobbo's Avatar
    Join Date
    Dec 2008
    Location
    Chicago
    Posts
    864

    Re: VB6 BlackJack

    If you have multiple forms the app wont end until all forms are unloaded. A hidden form is not unloaded so specifically unload the form.
    example
    Code:
    Unload me
    Have Fun,

    TR
    _____________________________
    Check out my Alpha DogFighter2D Game Demo and Source code. Direct Download:http://home.comcast.net/~technorobbo/Alpha.zip or Read about it in the forum:http://www.vbforums.com/showthread.php?t=551700. Now in 3D!!! http://home.comcast.net/~technorobbo/AlPha3D.zip or read about it in the forum: http://www.vbforums.com/showthread.php?goto=newpost&t=552560 and IChessChat3D internet chess game

  9. #9
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: VB6 BlackJack

    Quote Originally Posted by Cruncher
    do i need to put a button that actually runs the end command? i beleive the standard windows "x" should do the job :S
    The "X" just tells that particular form to unload, what else happens is up to you.

    There are a couple of articles about this in our Classic VB FAQs (in the FAQ forum, which is shown near the top of our home page).

    First off, there is Why is using the 'End' statement (or VB's "stop" button) a bad idea?

    Then for an explanation (and example code) for how you should be closing a form/program, see the article How should I close my form/program/class?

  10. #10
    Fanatic Member technorobbo's Avatar
    Join Date
    Dec 2008
    Location
    Chicago
    Posts
    864

    Re: VB6 BlackJack

    Cruncher,
    Put this code in your Blackjack.frm and it should fix it up
    Code:
    Private Sub Form_Unload(Cancel As Integer)
    Dim f As Form
    For Each f In Forms
    Unload f
    Next
    End Sub
    Have Fun,

    TR
    _____________________________
    Check out my Alpha DogFighter2D Game Demo and Source code. Direct Download:http://home.comcast.net/~technorobbo/Alpha.zip or Read about it in the forum:http://www.vbforums.com/showthread.php?t=551700. Now in 3D!!! http://home.comcast.net/~technorobbo/AlPha3D.zip or read about it in the forum: http://www.vbforums.com/showthread.php?goto=newpost&t=552560 and IChessChat3D internet chess game

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Feb 2009
    Posts
    160

    Re: VB6 BlackJack

    Fixed, thanks

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