Simple form question

Started by Roger Garstang, January 24, 2009, 06:16:52 PM

Previous topic - Next topic

Roger Garstang

I am designing a form (newbie) with a statusbar and I am looking for a way to keep the form from being resized. I found the checkbox to disable the maximize button (minimize is ok), but I need to get rid of the resize grip on the right lower edge of the statusbar.

Thanks,
Gary

Added: opps, I think I just found the answer by searching the forums....unchecking the ThickFrame option did the trick  :)

Roger Garstang

Ok....on to the next question  ;D

I have a form created with a menu. I am trying to locate the menu code area to add the code to show another form.

Can someone point me in the right direction....

Thanks,
Gary

TechSupport

Hi Gary,

When a menu item is selected, a notification is sent to the parent Form voa the WM_COMMAND message. Check out the following code which assumes a Form called "Form1" and two menu items, 'New' and 'Open'.

In the WM_COMMAND message handler you would check for the identifier of the incoming menu item (i.e. the wID).


Function FORM1_WM_COMMAND ( _
                          hWndForm     As Dword, _  ' handle of Form
                          hWndControl  As Dword, _  ' handle of Control
                          wNotifyCode  As Long,  _  ' notification code
                          wID          As Long   _  ' item, control, or accelerator identifer
                          ) As Long

   Select Case wID
     
      Case IDC_FORM1_MNUNEW
         MsgBox "Menu 'New' clicked"
         
      Case IDC_FORM1_MNUOPEN
         MsgBox "Menu 'Open' clicked"
     
   End Select
     
End Function


Keep those questions coming!!! We'll have you "FireFly'd" in no time.  :D


Roger Garstang

Thanks Paul!

I forget to search the forums before I start posting  ;) I guess I think I am the first one that has ever ran into these questions.  ;D

I did find a post from another newbie and you outlined the menu process with sample code....works like a charm.


When I do open a second form....if that form is closed with the "X" in the upper right corner, is this sufficient? In other words, closing a form this way would not require FF_CloseForm, correct?

Thanks again,
Gary

TechSupport

Quote from: Gary Stout on January 24, 2009, 09:44:49 PM
When I do open a second form....if that form is closed with the "X" in the upper right corner, is this sufficient? In other words, closing a form this way would not require FF_CloseForm, correct?

Exactly. You really only need to use FF_CloseForm in situations where you (the programmer) wants to initiate the closing the Form. If the user presses the "X" then FireFly will handle everything automatically.

:)