# Cmd button disappears



## wes peters (Nov 5, 2002)

I just ran across another problem.
When I load up a form from another form the second time, one of my command buttons disappears.
When I do it again it's back.
It only does it every other time.

Any suggestions.

Thanks again for the help


----------



## Mosaic1 (Aug 17, 2001)

I am very new to this. But I think having a look at your code may help. Someone will be along to check it out.


----------



## wes peters (Nov 5, 2002)

Cmd button disappears
--------------------------------------------------------------------------------

So far I have traced it down to a problem (I think) with the Style property. When I choose graphical my problem appears and when I change back standard my problem goes away. There are 5 cmd buttons on my form and this is the only one giving me this problem.
I have compared all the settings in properties with each button and they are all set the same.

Could this be a bug in vb6?

Thanks again for any and all help.

ps. If need be I can live with it.


----------



## Mosaic1 (Aug 17, 2001)

I don't know why that would be. I created two forms, using Graphical for an options button on the second form. Using Form2.Show I tried to duplicate the problem, but couldn't.

There is another option for the command button. Setting the command button Style to graphical. Then creating a bitmap with the text you want to display and using the bitmap as the picture for that command button.


----------



## wes peters (Nov 5, 2002)

That's my problem, when I select graphical, that's when my cmd button disappears.

Mosaic1, I sent you my project. you'll have to make a "saves" folder, that's where my app. saves the files.

Thanks again for the help.


----------



## wes peters (Nov 5, 2002)

Sorry Mosaic1 I sent my project to another buddy.

I'll try to attch it here. It's a zip file, so I don't think it'll work.

Sorry I can;t seem to send it.

I'll email it to you if you wish, let me know.

my email address is [email protected]


----------



## Mosaic1 (Aug 17, 2001)

If you post your code here, that should do it. Although I am not sure what help I can be. Maybe someone else will pop in. 

Tell me how many forms and what exactly to put on them, etc and I'll see if I have the same problems you are having.


----------



## wes peters (Nov 5, 2002)

Hi All

Got my program working.

In my cmdDone code I had Unload me and the next line I had frmWindow.Hide.

I removed the frmWindow.Hide and everything works Great.

I didn't relize that with Unload I didn't need to hide the frm.

It seems the frm was reloading itself again and thus my problem.

Thanks for all your help.

You guys are great.


----------



## Mosaic1 (Aug 17, 2001)

Hey Wes,

Glad it's fixed. I just saw your post over at the General Visual Basic Board. 


Mo


----------

