Re: Making forms modal

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Bob (anonymous_at_discussions.microsoft.com.invalid)
Date: 05/23/04

  • Next message: Bob: "Ellipses with API"
    Date: Sun, 23 May 2004 12:10:33 -0700
    
    

    Thanks Bryan:

    As I said earlier, I want to show my form which has a listview, then place
    some graphics in the column header (arrows similar to explorer for sorting),
    then make the form modal. I have found though my experience, that the only
    way the graphic will show, is if the listview is displayed. In the Load
    event of the form, I fill the listview, then I sort it based on a column,
    and place the appropriate graphic and text in the column header. Then I
    want to make the form modal.

    I have tricked the program, by showing the form in the load event, display
    the listview with the graphics, hide the form, and show it again modally.
    The way, I have done this, sometimes, this causes an error, which I had to
    trap. It works fine now, but I was hoping there would be a cleaner way. I
    guess, Randy said there is no way, so I will stick to my code.

    Bob

    "alpine" <alpine_don'tsendspam@mvps.org> wrote in message
    news:ctuva0h9crcvhcq97msdj5bvcqk348cbt5@4ax.com...
    > On Sat, 22 May 2004 15:35:04 -0700, "Bob"
    > <anonymous@discussions.microsoft.com.invalid> wrote:
    >
    > >Hello all:
    > >
    > >I was wondering if there is an api to make a form that is already shown
    > >modal? for example, I want to perform something like this:
    > >
    > >form1.show
    > >do something here
    > >form1.show 1
    > >
    > >As you probably know better than I do, the above code gives an error. Of
    > >course I can trap the error, and ignore it. But I do not want to do
    this,
    > >nor hide and redisplay the form modally. Is there and API?
    > >
    > >I appreciate all your help.
    > >
    > >Bob
    >
    >
    > Can you be a bit more specific about exactly what it is that you want
    > to accomplish? There are ways to fake modality but how you implement
    > them depends on what you need to do.
    >
    > HTH,
    > Bryan
    > ____________________________________________________________
    > New Vision Software "When the going gets weird,"
    > Bryan Stafford "the weird turn pro."
    > alpine_don'tsendspam@mvps.org Hunter S. Thompson -
    > Microsoft MVP-Visual Basic Fear and Loathing in LasVegas


  • Next message: Bob: "Ellipses with API"

    Relevant Pages

    • Re: Making forms modal
      ... > some graphics in the column header (arrows similar to explorer for ... > way the graphic will show, is if the listview is displayed. ... > and place the appropriate graphic and text in the column header. ... Add a Form2 to a Standard EXE project. ...
      (microsoft.public.vb.controls)
    • Listview Version 5.0
      ... Is there any api call to align a column header in listview? ...
      (microsoft.public.vb.general.discussion)
    • Re: Documentation woes
      ... The GridLines property is not supported in the Compact Framework. ... >> In this case the Columns members of ListView is a ColumnHeaderCollection. ... >> public virtual ColumnHeader Add(string, int, HorizontalAlignment); ... The text to display in the column header. ...
      (microsoft.public.pocketpc.developer)
    • ListView ownerdraw column headers
      ... but the ListView items also try to use ... Drawing the column header is an easy enough way around this, ... RectangleF txtRect = RectangleF.Empty; ...
      (microsoft.public.dotnet.framework.windowsforms)
    • RE: ListView control header events?
      ... When the user drags the certain column header, ... also be sent to ListView control. ... private const uint WM_NOTIFY=0x004E; ... method, then when we clicked the button, the listview headers will restore ...
      (microsoft.public.dotnet.framework.windowsforms)