Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Form Does NOT Receive Events When PopUp Menu Shown.


When using PopupMenu myMenu , i'd like the popup to re-pop at the new location clicked, if user right-clicks again elsewhere while the popup is shown.
(like what happens when u rightclick on your desktop, or when you right-click in a default vb textbox.)

However i cant reproduce this behaviour when using the vb function Popupmenu

To better ilustrate this behaviour i created a small project as an example.


Any ideas on how to make the popup menu behave like , for example, the default popup menu in a textbox ??

please download the small project. it has a listview (comctl 6) in it , a text box and a custom popup menu.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Allow Events To Complete While Showing Popup Menu
I'm still trying to get everything working with the progressbar I added to my app...I have another question now.

Okay, when an item is clicked, either in the treeview or the listview where I display bookmarks, the item is loaded and the progressbar displays the progress of the syntax coloring. The problem is if the user right-clicks...the progressbar displays, the popup menu appears, and the progressbar freezes on the screen until the user gets rid of the popup. Is there a way to allow the progressbar to continue even after the popup menu appears? I tried a DoEvents where I show the popup but that didn't work.


God Bless America

Drag && Drop - Managing Mouse Events For Both Right-click Popup Menu && Right Dragging
OK - suppose I have "control1" and "control2". On control1, if the user right-clicks, I want to show a popup menu, but I also want to allow right-dragging to control2. If the user right-drags, I want to show a popup menu on the drop. How do I manage these events to keep things straight?

Everything's fine if I only allow dragging with the left button and popup menu on the right button. It's when I want to allow "double duty" on the right button that things get confusing.

How To Leave MDI Forms Menu Unchanged When A Child Form Is Shown?
Hello everybody,

i have this little problem: in my application i use a MDI form with
some children forms. In some of these i use a popup menu (that is
always invisible except when you right click on the mdi child), but
when i select the child form with the hidden menu, the MDI parent
looses its menu. Everywhere is written that this is the normal behaviour,
but i'm asking, there is any way to have a menu on the MDI parent form
and some different popup menus on the children?
I read also that it is possible to merge the parent menu with the child menu,
but all i see is that the parent menu just disappears at all....
if the first solution is impossible, how to do this?

Many thanks

Form As Popup Menu...
Hi all

After I tried without luck to change the font size of popup menus I decided to make my own "Popup menu" by building it piece by piece

The form will contain labels that via MouseMove function the label background of each label will change just like the regular popup menu... But How can I check when the mouse isn't on the form?!? or isn't on the label any more?
I tried as a VB Newbie developer to do something like:

If Not Me.Label1_MouseMove then...
Bla Bla
End If

But it ain't working as suspected..

How can I solve this problem?, thanks in advance.

Yours, Yoni D.

PopUp Menu In A VbModal Form
I am trying to show a popup menu in a form which is shown with vbModal. I traced through the code and found out that the program did excute the line PopUpMenu but nothing shows up on the screen. Am I missing any settings or did I misplace the menu or is this actually possible?

PopUp Menu In Taskbar On Borderless Form?
Hi All,

I have a borderless form...
But when I click on it in the taskbar, with the right mousebutton, it doesn't show the popup menu.

How can I force windows to display this menu? Is there a API Call for this?

Thanks!

Greetz Kevin,

Popup Menu And Form Startup Error
i have a problem,

my mdi child form, is loaded from a "popup" menu when the user clicks on a entry inside another mdi child form. for some reason, the loaded form loads in an unusal place (at the very bottom of the screen) where the user has to move it to see it. i have tried everything to set its startup position, even manualy through code, such as frmone.top=screen.height/2 etc etc nothing works it just loads over the top of the popup menu at the bottom of the screen.

any help will be appreciated, Cheers

How Can You Create A Form With Borderstyle = None, And Have A Popup Menu?
I went into menu editor to make my menu, set the top level to invisible, then had 3 options underneath. Then, I was going to popup the menu under Command1_Click using Me.popupmenu Me.MNU (mnu was its name - also, is this the right way of popping up a menu?)

however, once i clicked ok, the form was still set to borderstly = none, but it had a title bar

how can you get rid of this title bar, or make a popupmenu that wont create a title bar?

Remove Popup Menu On Form Icon
Look at the top of your browser and click the icon. A menu pops up. How can I stop that on my form without removing the icon?

Popup Menu Freezes Form???? ***UNRESOLVED***
As the title suggests, when I use a message box, It stops my form from updating/processing, Why?
This also happens when I use a forms Menu. I try DoEvents, but then Im not 100% how this works. If anyone can tell me how to stop the message box/menu from freezing my form I would appreciate it.

Thanks



Edited by - Xerix on 1/13/2004 9:09:37 AM

How To Receive A Popup Of Caller Id Information In Vb
Hi all,
I need your help to develop a program in vb to popup caller id information and store it in Access database, I never used TAPI modem with MSCOMM32.OCX. I want to know how data is captured. Can anyone help me out?

Receive Events From Other Apps
I would like to be able to listen to events from other programs. Does anyone know how to do this?
What I want is to be able to highlight text in for example notepad or netscape and then press something like Ctrl + Right Mouse Button and I want my VB-application to pop up and get access to the highlighted text.

Any suggestions or ideas, friends?

Receive Events While Displaying A Msgbox
Hi All,

Is there a way to display VB's MessageBox and still get events while its being displayed?

The reason im asking is that my application deals with communication, and the msgbox interrupt with events.
I need to find a way (if there is one) to display the Msgbox and still get events.

(I dont want to display a form of my own instead of the message box.)

Thanks,
Kroov

Quickie Popup Menu - TextBox Popup Inhibit
I did a quick popup menu (a four item listbox) for a stand-alone form
(no MDI parent). I want it to respond to a right-click, but it gets
overlaid by the Textbox popup menu.

How can I inhibit the Textbox popup?

Thanks,
John

Objet Reference And Receive Events Issu
Hi,

Here's is a quick briefing...

I have a class, let's call it A, it manages some Outlook stuff....

In the general declaration of the class, A, i have:

private withevents receiveFolderEvents as Outlook.items

I use this variable to be able to receive events when you add, modify or delete a contact. The problem is that you need an object to advise you of the events for each folders and subfolders in the contacts section.

So I put each object in an array but I still have a little problem,

it keeps overwiriting my object that I added in the array.

Normally, inside my procedure, when I add an object to an array, I just have to do a Set varName = new varType, then set varName = nothing at the end to have a brand new object without overwriting anything.

But this my problem comes from the fact that I can't declare a withevents variable inside a procedure and I also can't do a set new on the object inside the procedure....

So, what can I do to avoid overwriting objects and to still be able to receive the events...

Thx in advance

Unable To Receive Events From Design-time Controls
this is no winsock control on my form (because there is no form =) this is in a class module i wish to eventually get into a DLL)

this is in my code

Dim sckConnections() as Winsock

i need to allocate/deallocate connections on the fly. I am unable to receive events to get this working.

What am i missing?

thanks a bunch

Making A Popup Menu, Popup A Menu
Hi

I have a popupmenu that gets used extensivly in my app. On every menu item that is clicked, a new submenu should be shown, but i need to reuse that submenu over and over again on most of my menu items.

So what i thought was making another menu that will act as the submenu that needs to be shown, and calling


VB Code:
Private Sub mnuOpen_Click()   '-- Need this menu to popup another menu   Me.PopupMenu Me.mnuSubmenuEnd Sub


But that simply doesnt work


Any thoughts on how i can do this?

Thanks

Hotkeys In Menu Are Not Shown At Runtime
the hotkeys are shown in design mode but not at runtime.
Its the first time that I am into this strange situation.
Could anybody help me with this? Thanks.

How To Popup A Menu For The Menu Created By MenuEditor && Populated At Runtime On RCli
How to Popup a Menu for the Menu created by MenuEditor & populated at runtime, the Popup should be shown when the user right click the Menu.

Hi,

I need to show the PopuMenu for populated Menu, either its created by API as below or by MenuObject. The below
is the way i created the Menu through API based on the sample of ROB in this Forum.

The below is the code in the General Declaration Section in the Form.


VB Code:
Const MF_CHECKED = &H8&Const MF_APPEND = &H100&Const TPM_LEFTALIGN = &H0&Const MF_DISABLED = &H2&Const MF_GRAYED = &H1&Const MF_SEPARATOR = &H800&Const MF_STRING = &H0&Private Type POINTAPI    X As Long    Y As LongEnd TypePrivate Declare Function CreatePopupMenu Lib "user32" () As LongPrivate Declare Function TrackPopupMenu Lib "user32" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal X As Long, ByVal Y As Long, ByVal nReserved As Long, ByVal hwnd As Long, ByVal lprc As Any) As LongPrivate Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As LongPrivate Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As Any) As LongPrivate Declare Function DestroyMenu Lib "user32" (ByVal hMenu As Long) As LongPrivate Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As LongDim hMenu As Long Private Type MSG    hwnd As Long    message As Long    wParam As Long    lParam As Long    time As Long    pt As POINTAPIEnd Type


I am using a Grid control, that is populated at runtime with AreaName, In that GridControl's MouseUp Event, I
am loading the Equipment for the Cicked Area is populated and displayed in a Menu and shown to the user. By using
the below code. It works fine. All Equipments are added to the Menu created by the Menu Editor at runtime.


VB Code:
Private Sub JanfpSpr_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)    Dim CurSprVal As Variant    Dim DtVal As Variant    Dim oMenu As Menu    Dim rstSi As New ADODB.Recordset    Dim ShtType As String    Dim JanCritTyp As Variant        If Button = vbLeftButton Then        JanfpSpr.GetText 4, JanfpSpr.ActiveRow, JanCritTyp        JanfpSpr.GetText 1, JanfpSpr.ActiveRow, CurSprVal        JanfpSpr.GetText 3, JanfpSpr.ActiveRow, DtVal                ShtType = Mid(CurSprVal, Len(CurSprVal) - 4, Len(CurSprVal))        CurSprVal = Mid(CurSprVal, 1, Len(CurSprVal) - 9)                If JanCritTyp = "Area" Then                SQL = "select * from EquipMaster where ArName='" & Mid(CurSprVal, 7, Len(CurSprVal)) & "' And Nextti Between #" & DtVal & "# And #" & DtVal & "# And ShtTp='" & ShtType & "' order by ENo"                If rstSi.State = 1 Then rstSi.Close                rstSi.Open SQL, cnnNew, adOpenStatic, adLockReadOnly, adCmdText                Call UnloadMenuItems                mnuLstSubItms(0).Caption = Mid(CurSprVal, 7, Len(CurSprVal))                mnuLstSubItms(0).Enabled = False                            While Not rstSi.EOF                    Load mnuLstSubItms(mnuLstSubItms.Count + 1)                    mnuLstSubItms(mnuLstSubItms.UBound).Caption = rstSi.Fields("ENo")                    mnuLstSubItms(mnuLstSubItms.UBound).Enabled = True                    rstSi.MoveNext                Wend                mnuLstEqp.Enabled = True                Call PopupMenu(mnuInfo)        ElseIf JanCritTyp = "Equipment" Then               Call UnloadMenuItems               mnuLstEqp.Enabled = False               Call PopupMenu(mnuInfo)        End If    End If'    End IfEnd Sub

Just in the Above code I added the Equipment Names in the Menu, If the User Right Click any
1 of the Equipment from the Menu then i need to show a Popup Menu with Update,Report etc.
for this Popup from the Equipment I added the Below Code in Form_Load() and mnuLstSubItms_Click()


VB Code:
Private Sub Form_Load()    hMenu = CreatePopupMenu()    AppendMenu hMenu, MF_STRING, ByVal 0&, "&Update"        AppendMenu hMenu, MF_SEPARATOR, ByVal 0&, ByVal 0&        AppendMenu hMenu, MF_STRING, ByVal 0&, "&Delete"        AppendMenu hMenu, MF_SEPARATOR, ByVal 0&, ByVal 0&        AppendMenu hMenu, MF_STRING, ByVal 0&, "&Report"End Sub Private Sub mnuLstSubItms_Click(Index As Integer)    Dim pt As POINTAPI    GetCursorPos pt    TrackPopupMenu hMenu, TPM_LEFTALIGN, pt.X, pt.Y, 0, Me.hwnd, ByVal 0&End Sub


What happens for this code is, The Popup menu is Show, but as soon as this Popup Menu is shown
the existing PopuMenu disappears, i need both to be visible as we can see in Windows Menus

Requirements:

How to find which MouseButton is Clicked in the mnuLstSubItms_Click Event.
How to and where to write the Events for the PopupMenu created through API (for Menu Update,Report)
How to protect without the Menu disappears, when the user right click the Equipment.

As (Moderator) Rob said i posted here this issue in the New Thread. Hope any VBForums member
might have faced the same scenario. Kindly check this and reply me.

The picture of the Menus on runtime and design time are also attached here for your reference.

Thankyou,
Chock.

How To Popup A Menu For The Menu Created By MenuEditor && Populated At Runtime
How to Popup a Menu for the Menu created by MenuEditor & populated at runtime, the Popup should be shown when the user right click the Menu.

Hi,

I need to show the PopuMenu for populated Menu, either its created by API as below or by MenuObject. The below is the way i created the Menu through API based on a sample given in VBForums by Rob.

My Project Current status.
The below is the code in the General Declaration Section in the Form.

Code:

Const MF_CHECKED = &H8&
Const MF_APPEND = &H100&Const TPM_LEFTALIGN = &H0&
Const MF_DISABLED = &H2&
Const MF_GRAYED = &H1&
Const MF_SEPARATOR = &H800&Const MF_STRING = &H0&
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Declare Function CreatePopupMenu Lib "user32" () As Long
Private Declare Function TrackPopupMenu Lib "user32" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal X As Long, ByVal Y As Long, ByVal nReserved As Long, ByVal hwnd As Long, ByVal lprc As Any) As Long
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As Any) As Long
Private Declare Function DestroyMenu Lib "user32" (ByVal hMenu As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Dim hMenu As Long

Private Type MSG
hwnd As Long
message As Long
wParam As Long
lParam As Long
time As Long
pt As POINTAPI
End Type

I am using a Grid control, that is populated at runtime with AreaName, In that GridControl's MouseUp Event, I am loading the Equipment for the Cicked Area is populated and displayed in a Menu and shown to the user. By using the below code. It works fine. All Equipments are added to the Menu created by the Menu Editor at runtime.

Code:

Private Sub JanfpSpr_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim CurSprVal As Variant
Dim DtVal As Variant
Dim oMenu As Menu
Dim rstSi As New ADODB.Recordset
Dim ShtType As String
Dim JanCritTyp As Variant

If Button = vbLeftButton Then
JanfpSpr.GetText 4, JanfpSpr.ActiveRow, JanCritTyp
JanfpSpr.GetText 1, JanfpSpr.ActiveRow, CurSprVal
JanfpSpr.GetText 3, JanfpSpr.ActiveRow, DtVal

ShtType = Mid(CurSprVal, Len(CurSprVal) - 4, Len(CurSprVal))
CurSprVal = Mid(CurSprVal, 1, Len(CurSprVal) - 9)

If JanCritTyp = "Area" Then
SQL = "select * from EquipMaster where ArName='" & Mid(CurSprVal, 7, Len(CurSprVal)) & "' And Nextti Between #" & DtVal & "# And #" & DtVal & "# And ShtTp='" & ShtType & "' order by ENo"
If rstSi.State = 1 Then rstSi.Close
rstSi.Open SQL, cnnNew, adOpenStatic, adLockReadOnly, adCmdText
Call UnloadMenuItems
mnuLstSubItms(0).Caption = Mid(CurSprVal, 7, Len(CurSprVal))
mnuLstSubItms(0).Enabled = False

While Not rstSi.EOF
Load mnuLstSubItms(mnuLstSubItms.Count + 1)
mnuLstSubItms(mnuLstSubItms.UBound).Caption = rstSi.Fields("ENo")
mnuLstSubItms(mnuLstSubItms.UBound).Enabled = True
rstSi.MoveNext
Wend
mnuLstEqp.Enabled = True
Call PopupMenu(mnuInfo)
ElseIf JanCritTyp = "Equipment" Then
Call UnloadMenuItems
mnuLstEqp.Enabled = False
Call PopupMenu(mnuInfo)
End If
End If
' End If
End Sub

Just in the Above code I added the Equipment Names in the Menu, If the User Right Click any 1 of the Equipment from the Menu then i need to show a Popup Menu with Update,Report etc. for this Popup from the Equipment I added the Below Code in Form_Load() and mnuLstSubItms_Click()

Code:

Private Sub Form_Load()
hMenu = CreatePopupMenu()
AppendMenu hMenu, MF_STRING, ByVal 0&, "&Update"
AppendMenu hMenu, MF_SEPARATOR, ByVal 0&, ByVal 0&
AppendMenu hMenu, MF_STRING, ByVal 0&, "&Delete"
AppendMenu hMenu, MF_SEPARATOR, ByVal 0&, ByVal 0&
AppendMenu hMenu, MF_STRING, ByVal 0&, "&Report"
End Sub

Private Sub mnuLstSubItms_Click(Index As Integer)
Dim pt As POINTAPI
GetCursorPos pt
TrackPopupMenu hMenu, TPM_LEFTALIGN, pt.X, pt.Y, 0, Me.hwnd, ByVal 0&
End Sub

What happens for this code is, The Popup menu is Show, but as soon as this Popup Menu is shown
the existing PopuMenu disappears, i need both to be visible as we can see in Windows Menus


Requirements:

How to find which MouseButton is Clicked in the mnuLstSubItms_Click Event.
How to and where to write the Events for the PopupMenu created through API (for Menu Update,Report)
How to protect without the Menu disappears, when the user right click the Equipment.

Hope any member here might have faced the same scenario. Kindly check this and reply me.

The picture of the Menus on runtime and design time are also attached here for your reference.

Thankyou,
Chock.

Popup Menu, Context Menu Dynamic Creation?
Hi everyone,

i used the google search and the forum search but i didnt find any suitable result.
What i want to do:
i want to display a popup menu which is dynamic created from an xml file. i read the xml file to my own private type structure and now i want to display a popup menu. the only, as i think very ugly way i found is sevpopup menu active x. the problem with that menu is, that in every way there is a space for icons in menu which i dont have and the other problem is that i want to copy and not to install the application.
Really important for me is that i can create submenus!

Thank you all for help!

buechse

How To Add A Menu Item To The Windows Explorer Popup Menu?
Hi,

I have a feeling that this is going to be an API question, but I thought I start with this forum first..

Basically, what I want to do is to create a little VB app which I can launch by using the popup menu in the Windows Explorer. When I right-click on a folder, I want to be able to launch my program.

Any examples and ideas on how to do this would be greatly appreciated..

Dan

Hide Menu Line When Creating Popup Menu
I have a program that I created a PopupMenu for so when the user does a right click - there are options they can select.

The question is :
In order to create the PopupMenu, I created a menu for my form and then made parent for the menu options disabled and not visible.
When the form is launched however there is a seperation line where a menu should be.
Is there a way to remove this ?

Thanks in advance,
Kflasph

In A Popup Menu Witch Menu Item Is Slected
How do I find out what menu item was clicked

str = popMenu.Name
Select Case str
Case "mCut"
MsgBox "cut"
Case "mPaste"
MsgBox "paste"
Case "mProperties"
MsgBox "pro"

End Select

Popup (right-click) Menu From Standard Menu
I've searched and searched and cannot find any information on how to get a pop-up menu to appear when you right-click on a standard menu item. A classic example of this is in Internet Explorer's Favorites menu. If you right-click on a favorite, a popup menu appears and you can rename, delete, etc. the highlighted favorite. In VB6, accessing a menu item does not appear to fire the MouseUp or MouseDown events. Any thoughts?

Coding A Popup Menu Instead Of Using Menu Editor :S
Ok this might sound wierd but i want to add pop up menus to my form without using the menu editor and without showing them in the form itself (only when i want them to pop up). I have a frameless form and as soon as i add menus the frame will be there again. and i hoped i could just program a menu that is also pretty editable of some sort

How Do I Design A Context Menu (Popup Menu) In VB?
Hi,

I want to design a popup menu for a form in VB. I already have a menu for the form. This menu is displayed below the title bar. When I try to use the Menu Editor, it only lets me edit this menu. I want to design a new menu which will popup like a context menu. How do I do this?

Any help would be greatly appreciated.

Popup Menu When There's Already A Menu Up Top </RESOLVED>
I've previously added the code to get a Popup Menu on right-clicking a listbox, but that time it was the only menu on the form.

Is there a way to get two menus on my form or am I going to have to make another form and use it for the popup menu?

Showing Another Form BEFORE The Main Form Is Shown
How do I show a Form before the main Form is shown? I need to show a LogIn form, and if input data is correct, procceed loading and then showing the main form. How to do it?

Regards,
President.

Form Is Not Shown
hi:

i am using VB to call a JAVA program to execute. and when JAVA is being executed, the form will tell the user it is processing. below is the code i use.

Private Sub Form_Load()

lblJava.Caption = "Please wait while JAVA is processing..."

Dim fileName As String
Dim fileDir As String

fileName = "C:ContainerLLRandomOrderLLRandomOrderW.exe"
fileDir = "C:ContainerLLRandomOrder"

SuperShell fileName, fileDir, 0, SW_NORMAL, HIGH_PRIORITY_CLASS
'Execute the program

End Sub

where SuperShell is the function written to process JAVA.

however, when it is running, the form will not be shown until the JAVA program finishes being executed. however, at that time the form should be hiden which is actually not. i insert doevents when i wait for the JAVA program to be finished, but it doenst help in showing the form and after the execution, hiding it. can anybody tell me why and how to solve it? thank you so much!

regards,
irisbeast

Form Always Shown On Top
I have a form (Form 1) that is a MDI child of another form. Form 1 can pop up another form (Form 2). Is there anyway to keep Form 2 in front of Form 1 (not like vbmodal where you can't do anything to form 1) and be able to move form 2 around on the screen? Right now Form 2 just has

Frm_###.show ' (not vbModal)

I checked the help section, and the only thing I could come up with was a property for foxfire of AlwaysOnTop. does VB have anything like that and I'm just not finding it? Thanks

How Do I Know A Form Is Shown?
I have about 6 forms in my whole project and I have a main form which links to all the other forms. On each form (except main form), I have a button that links to the main form. Now, I don't want to keep loading and unloading the forms whenever I move back and forth. I just want to load all the forms at a time and then show/hide them. The problem is that without unloading, none of the values or settings is reset on a specifc form. I want to reset them back to where they were before the form was shown so the user thinks that I loaded the form again. How would you do that?

Nothing Shown On Form
Hi

Nothing's being displayed on my form when running it (like every control was invisible - but it's not!)

Could it be due to the form's record source being too complex (a complex query) ?

(p.s: ms Access)

Can You React To Events Using APIs Similarly To VB6 Form Events, Etc
Hello,

Please excuse this question if it is laughably ignorant. I am having trouble trapping the Tab key on a VB6 form. Since all of the controls have their own hwnds, I was wondering if there was anything I could do with an API and child windows to determine when it changed.

I have worked with APIs only a very little bit, so please bear with me on this one if possible. Thanks in advance!

Have a great day!

j2consulting@yahoo.com

Determine How Form Was Shown
I have a bunch of forms shown all at once and at certain points in time I want to be able to determine which ones are Modal and Modeless... does anyone know how I can do this?

Thanks

Which Form Was Shown Previous?
hi

im building a vb project with many forms.
the way i go through the forms is like this

form1.hide
form2.show

and then i unload them all at the end

but my query is, is there any command or function for finding out what form was shown or active previous to the form that is currently been shown. this could be a atupid question i dunno.

any help wheter this is possible would be appricated

thanx
shane

Word In Ole, Shown In A FORM
Hello,
i've build a table with an ole object that contain word document.
then i've build a form to show it.
i whis i had some scroll bar to navigate in word doc... there's any way of having them?

thenks!

How To Get A Form To Be Maximised When Shown?
I need "Form2" to be maximised when I click on a menu item, which is called Tasks, then going down to Task 1:. But I wish to keep all of "Form2"'s size, etc.

Possible Check If Form Is Shown
Hi,
Does anyone know is it possible to check if a form is still being showen or not?

Check If A Form Is Being Shown?
Is there a way to check if a form is currently not hidden? I need this form I have to only do a certain set of instructions when it's not hidden and visible to the user. I don't think "Me.Visible = True" means the same thing, but I'm not sure. Any help would be appreciated .

How To Tell If A Form Is Shown On Screen
This might be a dumb question but I will ask anyways since I didn't find anything about this by searching.

my program will have 2 forms open, say FormA and FormB. I have a listbox in FormA and on the click event for this listbox I need to perform a method if and only if FormB is visibly shown on screen. The form having focus is irrelevant. If FormB has focus or no focus but still painted on screen then return true.

So I guess my question is: Is there a property (or some other method) that will tell me if FormB is shown on screen whether the form has focus or not?

I hope this was clear, let me know if it is not and I will try to clarify.

Thanks

Onload But After The Form Is Shown
i want my program to execute a code after the fomr is shown if i put the code in the load event the form will not show until the code is complete is there an event that i can put my code in so it will execute after the form is shown? thanx

Modally Shown Form In Taskabar
Hi!

Is it possible to show moddaly shown form in taskbar?

Bostjan

Blinking Of Modally Shown Form
Hi!

I often show forms in modal form - but what really annoys me is that if I click outside that form (but inside the owner form), the border of modally shown form blinks two times.

I didn't notice that with other windows applications and would really want to get rid of it.

Do you have any suggestions? I have attached a small example of how I do it - maybe there is some setting that could be changed...

Thanks in advance,
Bostjan

Find Out If Form Is Shown Modally
I have 2 Forms.

"Form1" has a menu. "Form2" is shown modally. I also have a tray icon representing the application.

Here is my problem.

Since "Form2" is shown modally - whenever i try to popup the menu from "Form1" via tray icon i get error. That's normal.

Until now i have been putting some String into "Form2" Tag property so i knew it was shown modally. This works fine.

However, i am interested if there's some other, more "official" way to find out if some Form is shown modally?

Thanks

-gav

Progress Bar Invisible When Form Shown
My application is an installer procedure written in VB6 that (among other things) launches a separate form containing a VB6 progress bar which is intended to run according to an embedded timer while a long duration procedure executes in the parent form. My problem is that when the form containing the progress bar is launched by the parent form (using the statement frmVB6ProgressBar.Show), the pane in the form that would normally show the progress bar is transparent...in fact you can see my desktop through it. Have tried playing with the properties for both the form and the progress bar to solve this with no success. Have spent a frustrating 3 days on this! Can anyone please look at the attached screen snapshot of what is happening and code in the attached form and tell me what I am doing wrong???

MDI Form Modally Shown Above Other Forms.
Hi all,

I have an MDI application with and input form(frmInput) and an options form (frmOptions)

The options form needs to be displayed modally so that nothing outside it is selectable until it is closed. Seems that child forms can't be displayed modally so it is a regular form.

So that frmOptions is kept within application I need to set the MDI form as the parent.

VB Code:
Private Sub MNUOptions_Click()frmOptions.Show vbModalEnd Sub 'in frmOptions.Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Private Sub Form_Load()SetParent frmOptions.hWnd, MDI.hWndEnd sub

This works if fine if both the MDI form and the frmInput are in a maximised state. Things start going wrong when frmInput.WindowState= normal or MDI.WindowState= normal and I have two frmInputs open. FrmOption is unselectable and sometimes half hidden inside one of the child forms. Can anyone help me out on where I'm going wrong?

Edit: Moved the SetParent line to the frmOptions load event. frmOptions now unselectable.

Show Form Whenever Desktop Is Shown?
How would I go about doing this? I've tried meddling with GetDesktopWindow and GetDC, but I haven't had much luck from there.

Also, my Bordless form is dragable on mouse down. It uses ReleaseCapture: SendMessage Me.hwnd, &HA1, 2, 0&. Would this cause any problems with having to refresh the form differently?

Form Should Not Be Shown In Taskbar ***RESOLVED***
Hi.

Lets say that i have a normal form1, and on that form i have a command button, when it is pressed it will open form2 (with the property form2.ShowInTaskbar = false) if I then invoke a msgbox on form2 it will be put out in the back of form1 until the msgbox is removed by pressing "OK" why is that happening ???.

If i open form2 with the property form2.ShowInTaskbar = true it ofcause is showing in the taskbar, but it is NOT being putted back behind form1 ??.

Any help on this matter.

Copyright © 2005-08 www.BigResource.com, All rights reserved