One of my forms (lets call it frmnew) is opened with vbmodal, since I want the user to finish with that form before continuing. When he presses cmdsave(a command button on frmnew) then while the program is executing that statement I want to show another form (frmsplash). It doesn't let me to open frmsplash unless I open it also with vbmodal. But I don't want to open it with vbmodal because I want the programm to continue running. What can I do? (I'm not sure if my question is clear, if not let me know)

Recommended Answers

All 9 Replies

What I tried is before opening frmsplash I do frmnew.hide and after executing the statement frmnew.show. It works, not sure if that's the correct way to do it.

I now see that its not good, Since frmnew should be shown vb modal and I can't do me.show vbmodal
Can Anyone help me with my original question?

that's good idea but aftyer hiding the form and after the fmsplash unload the frm you hide. got it?

I'm not sure I understood.
I don't want the form I hide to be unloaded, because I want to get back to it.

just a quick thought. if frmNew is modal and you then hide it is it still modal? because if frmNew remains modal after being hidden you wont be able to use any other form.

if possible you will at least have to unmake its modalarity before hiding it and loading the new one.

btw. it is not a good idea to load and hide many forms. this all remains in memory and slows your pc down.

Well it doesn't stay modal, that's my problem.

Let me rephrase my question, to make it more clear.
I'm opening a form vbmodal. That form has a commandbutton whose execution takes up sometime. So while it is executing that command, I want to show a form(frmsplash) with progress bar etc so that the user knows what the program is doing and as soon as the program finishes to execute that command frmsplash is being unloaded. The only way to open form from a form thats modal is by opening it also vbmodal, which is obviously not possible in this case. So I tried to hide the form before executing that commandbutton and after execution to show it again. Hiding the form, removes its modal. How can I make it modal again when showing?

Any clearer now?

Hi,

Why show a differnet splash form.. Add a Picture box to ur Form and Load the required image. Initially make pict box visible=false. When u start saving Make PictBox Vis=True..
and set height /width equal to the form's. And again after Completion of Saving Hide the Pict Box.

Regards
Veena

Or add a progress bar or textbox to the modal form to display the progress. As an added safety, disable any 'dangerous' buttons while the command is being executed.

The problem is that frmsplash is needed for 4different forms, all of them have that same commandbutton. I'll try to work around it somehow. Thanks anyway.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.