hi
Somebody have a example to hide a form using API ?
Tia:blush:
Printable View
hi
Somebody have a example to hide a form using API ?
Tia:blush:
Thread moved from the 'CodeBank VB6' forum (which is for you to post working code examples, not questions) to the 'VB6 and earlier' forum
If this is another question about hijacking another application via window messages we shouldn't even answer it.
And if it is within your own VB application then it isn't necessary.
These malware authoring questions get very tiresome.
Without knowing more details it is hard to say. Does assigning FormX.Visible = False throw the same exception?
They should either both work or both fail. If they fail it suggests the Form can't be hidden at that time. Why I couldn't say, perhaps you have some flow of control problem mixing modal and modeless Forms?
In the other thread you only showed a little code. The code you showed was fine but if you are getting an error then there is other code that is executing that is causing your error.
Have you at least tried setting a break point on the me.hide line and stepping through the code from there?
I agree.
You need to debug your code. Not use API.
If you get a
error 5 invalid procedure call or argument
then your code is wrong.
Show complete code, or zip a sample project to reproduce error.
My control is in form3
What control?
I cannot duplicate your problem. When I do Form4.Show vbModal and then while I am in Form4 I click button to hide form4. It does not throw error, it just hides the Form; you can't hide it from Form3 or below because control is blocked until you close or hide Form4. If you try to hide Form4 in the Load event you will get error but not what your getting.
So, how are you trying to hide Form4
My guess is that there is code elsewhere on the form or in the calling form that is throwing the error, perhaps an attempt to set focus to something after it is hidden or something to that effect.
It is either code executing in Form4 before it executes Me.Hide or it is code in any Form after Me.Hide that attempts to set focus or something else to a control in Form4 then, yes, DM, you are correct, you will get his error.
Would you like this resolved quickly (also avoiding a messy thread as we attempt to guess your problem)
Make a clone of your program.
Trim it as much as possible, leaving enough to demonstrate your problem
And attach the file
(with instructions how we can trigger your problem)
Thank you
I will to try to explain in the other thread
http://www.vbforums.com/showthread.p...93#post5129293
Don't try to EXPLAIN it....do what Bobbles suggests....bet it will be solved almost immediately! Wasting time here....