Results 1 to 11 of 11

Thread: [RESOLVED] message box??

  1. #1

    Thread Starter
    Member rockyamyx's Avatar
    Join Date
    Nov 2010
    Posts
    62

    Resolved [RESOLVED] message box??

    is there a way i could call a "custom message box (no title bar, border) inside a form(not being able to drag outside of the parent form) example


    just something i whipped together just for concept:



  2. #2
    Frenzied Member
    Join Date
    Nov 2010
    Posts
    1,470

    Re: message box??

    can you not makea new form and make it a child of the containing form

  3. #3
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: message box??


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  4. #4

    Thread Starter
    Member rockyamyx's Avatar
    Join Date
    Nov 2010
    Posts
    62

    Re: message box??

    Quote Originally Posted by incidentals View Post
    can you not makea new form and make it a child of the containing form
    how do you make it a child??.. if you dont mind explaing .. or just point me in the right direction..?? i dont want code just want to know how i would go about it..

    and akhilesh

    i cant seem to get it to work it keeps saying ..

    Error 7 sub 'Dispose' must be declared 'Overloads' because another 'Dispose' is declared 'Overloads' or 'Overrides'. C:\Users\Visual-Basic\Documents\Visual Studio 2010\Projects\msgbox\Form1.vb 596 17 msgbox
    nvm on that.. but now how does this help me.. it does nothing.. well i made a form with the fixed code and .. nothing just my form
    Last edited by rockyamyx; Nov 30th, 2010 at 06:45 AM.

  5. #5
    Frenzied Member
    Join Date
    Jan 2010
    Location
    Connecticut
    Posts
    1,687

    Re: message box??

    The simplest way would be to use a panel.
    VB6 Library

    If I helped you then please help me and rate my post!
    If you solved your problem, then please mark the post resolved

  6. #6
    Frenzied Member
    Join Date
    Nov 2010
    Posts
    1,470

    Re: message box??

    two options

    (1) make main form an mdicontainer in properties

    and call

    msgform.mdiparent=me
    msgform.show()

    or

    (2) make main form mdicontainer temporarily

    and call

    me.ismdicontainer=true
    msgform.mdicparent=me
    msgform.show()

    and when closing msgform include

    mainform.ismdiform=false


    hope this helps

  7. #7

    Thread Starter
    Member rockyamyx's Avatar
    Join Date
    Nov 2010
    Posts
    62

    Re: message box??

    i like the second option, but now ive run iinto another one


  8. #8
    Frenzied Member
    Join Date
    Nov 2010
    Posts
    1,470

    Re: message box??

    you need to set the z value of your form

    make it always on top

    true form2.topmost=true either before call or if possible in properties of form
    Last edited by incidentals; Nov 30th, 2010 at 09:16 AM.

  9. #9
    Frenzied Member
    Join Date
    Nov 2010
    Posts
    1,470

    Re: message box??

    sorry I am leading you up the proverbial garden path

    there appears to be no way to get infromt of the mdiparents bits

    so i suggest as the message box is to appear in the middle of your arena

    create a patch where the message is to be and build up the appearance as you have so far

    use a frame to mount your work on so all your elements will be called frame.whatever

    then simple call fram.visibile=true to show and frame.visible=false to hide

    the message is frame.textbox="string" where the text is to appear

    hope this makes amends for my error

  10. #10
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: message box??

    Quote Originally Posted by rockyamyx View Post
    and akhilesh



    nvm on that.. but now how does this help me.. it does nothing.. well i made a form with the fixed code and .. nothing just my form
    Sorry, I didn't tested that code. I found that after searching the VB.Net CodeBank

    Another way is to show the second form as Modal to the first one.
    You could do it in this way:
    vb.net Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.  
    3.         Form2.ShowDialog()
    4.  
    5.     End Sub

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  11. #11

    Thread Starter
    Member rockyamyx's Avatar
    Join Date
    Nov 2010
    Posts
    62

    Re: message box??

    ^^ thx guys/girls i think i got it ^^

    i did it like so

    VB.NET Code:
    1. Public Sub playagainMsg()
    2.         Dim msgform As New msgbox()
    3.         'Set the Parent Form of the Child window.
    4.         Me.IsMdiContainer = True
    5.         msgform.MdiParent = Me
    6.         msgform.Location = New Point(25, 370) ' PUT IN THE EXACT LOCATION
    7.         msgform.Show()
    8.     End Sub



    i know it looks crappy.. but its come a-long way ^^

    the whole point of that is so it pops up after [END RESULT] happens like game over or if you when money im going to put lables where variables are but use phoshop to puut other stuff like your winnings are: X
    hard project to first start out on eay

    [RESOLVED]
    Last edited by rockyamyx; Nov 30th, 2010 at 10:09 AM.

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