Show Hide objects

Discussion in 'Questions (Windows Mobile)' started by joel2009, Feb 7, 2009.

  1. joel2009

    joel2009 Member Licensed User

    I know how to show/ close forms and how to create a new object without the designer (and that is the only way i figure you can o this so far) i would like to show/hide an object such as a button upon an event.


    Specifically i am looking at doing something like the opera mobile menu buttons do (if the mouse focus is on the screen the buttons hide, and when focus is lost they re-appear)


    Any Help would be greatly appreciated.


    thanks,

    Joel
     
  2. klaus

    klaus Expert Licensed User

    You can make controls visible or not with the Visible parameter.
    Example:
    Button1.Visible=True or
    Button1.Visible=False

    I don't know what exactly you want to do, I don't know opera mobile.

    Best regards.
     
  3. joel2009

    joel2009 Member Licensed User

    thanks i'll give ths a try.. it sounds like you kno what i'm talking about :D
     
  4. joel2009

    joel2009 Member Licensed User

    Its still not working for me... i've been having problems with "minimize button" in fullscreen and "gestures" and i wonder if it may have to do with the web object. I'm using agrahams webbrowser dll.

    Here is a snippet of my code if you can find anything:

    Code:
    Sub Form2_MouseDown (x,y)
    back.Visible=
    False
    End Sub


    Sub Form2_MouseUp (x,y)
    back.Visible=
    True
    End Sub

    Sub back_Click
    web.GoBack
    End Sub
    PS: Back is the name of a button
     
    Last edited: Feb 7, 2009
  5. klaus

    klaus Expert Licensed User

    You must post your full code and explain what you want to do and what problem you have, otherwise we cannot give you any advice.
    - We dont know the location of the web object and what you are doing with it?
    - We don't know what you you want to do and how with the minimize button and what the problem is?
    - What gestures do you want to do and how and what the problem is?

    The code snippet in your post works !

    I tried to figure out what your problem or question could be.
    - If the web object is on the same form as the buttons you want to hide and you click inside the web object it will not work because the mouse event is on the web object and not on the Form.

    Attached my small test program.

    Best regards.
     

    Attached Files:

  6. joel2009

    joel2009 Member Licensed User

    I kind of though about that it not being the same object, but the web object wasn't created in the visual designers.... it was created using a new process. (i guess i just don't know how to refrence it) I eventually took the gestures out as i couldn't get them to work. I'd Like to use them though if you can help me do that :D

    Here is a full script for showing or hiding a simple button. With the "go back" command that i am trying to get to work...
     
    Last edited: Feb 8, 2009
  7. joel2009

    joel2009 Member Licensed User

    by the way i'm using agrahams web browser library (for device)
     
  8. klaus

    klaus Expert Licensed User

    I tried your program, but there are two images missing, and without those it doesn't run.

    Can you tell exactly how the gestures should work, where those should be implemented (Form1, Form2) and what you want to do with?

    From what I have seen in your code on Form2 the webbrowser object covers the whole screen so you can't get the mouse positions anymore with Form2_MouseDown or Form2_MouseUp.
    On Form1 the ImageButtons cover also the whole screen so the mouse positions will not be directly available either.

    Best regards.
     
  9. joel2009

    joel2009 Member Licensed User

    forgot about those... they are only on form one(which only basically has a buton leading to form two.

    So is there no way to loop the mouse up and mouse down with the web object?

    The whole point of the show hide is to increase the size of the screen (which is a browser)
    Basically, it will hide evrything while you are scrolling and actively using the screen, but leaves the menu accessible. (what the back button will be... a menu button)
     
  10. klaus

    klaus Expert Licensed User

    Sorry but I don't know if it is possible to get the Mouse positions on the webbrowser. This is a question for agraham.

    Best regards.
     
  11. joel2009

    joel2009 Member Licensed User

  12. Cableguy

    Cableguy Expert Licensed User

    As Klaus said, gestures are only catcheable by the FORM....
    This means that, if a gesture is done on top of ANY control other that the FORM itself, the x:y coordinates will not be catched...
    Some controls allow for x:y coordinates, but are relative to the control itself...
    This said, Gestures, are these are commonly known, are not an easy thing to achieve...
    Usually the developer reserves a "screen" area on wich the user can perform meaninful gestures....

    I have been looking for a while for a gesture dll or some code to allow "Gesture everywere" with no luck..
     
  13. joel2009

    joel2009 Member Licensed User

    can you somehow layer a transparent form one over the top of another form?
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice