Menu Enabling/disabling In MDI Parent Error
OK, again I must show a grey area in my knowledge of Visual Basic 6.
I am tryign to ensure that a drop-down menu in the MDI parent is disabled when loading an MDI child form, as the drop-down menu would be inappropriate for that particular form and I don't want users (who we all know do stupid things at times) trying to do things that would casue things to fall over.
Now, normally the following line of code should work.
VB Code: frmMain.mnuJump.Enabled = False
When I start typing that in, VB6 continues to fill in the blanks for me.
Yet, when I try and load the form, it stops at that line, and gives me a Run-Time Error 426: "Only one MDI Form allowed".
I've seen two possible solutions to this problem online, both with very flaky explanations (is it just me or is this some sort of common problem among many VB sites - solutions that probably work with explanations that don't make sense to somebody else trying to work their own problems out). The solutions are: [list=a][*]Turn the menu into a public property (I've got NFI how to do this with a menu)[*]Turn my forms into MDI children, which they already are so that's not the solution.[/list=a]
Any ideas???
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Enabling And Disabling Menu Options
I have a menu with 3 parent options and about 4 child options under each of them. Based on the access, the child options should be enabled/disabled or when all the child options do not have access, the respective parent option should be disabled.
how to go about this.
Parent Menu -> MASTER TRANSACTION UTILITIES
Child Options-> Item Invoice Import
Product Payment Export
Vendor Receipt Backup
Payment Restore
Above is the look of the sample menu.
How to go about it in visual basic
Thanks in advance,
Enabling And Disabling Buttons
Hi, I would like to know the code for the procedure where there is a Print button which is ( enabled = false) and you hit a Calculate button and the Print button is ( enabled = true ) and vice versa.. thank you in advance
Enabling/ Disabling CapsLock
HI,
I'm making a game and i need to be able to turn on and off Capslock.
Anyone know any code to do this?
Thanks in advance,
Ed
Sstabs-enabling/disabling
Hi,
The folowing line of code is giving me nightmares .
Please tell me where I am goin wrong.
Code:
Tenant.Tab.TabEnabled(INCIDENT) = False
where tenant is the form name and incident is a tab on it.I have used sstabs.
i m getting error as - Method or data member not found.I have added all the requisite ocx/dll files but the problem persists.Please help.
thanx
Disabling And Enabling MSComm1_OnComm()...
Hi. I have been using MsComm1.RThreshold = 0 then 1 to disable then enable MsComm1.OnComm() comEvReceive event. However, since I am still getting premature triggering from inbuffer "junk", I am not sure if this is the correct solution?
I would like to first disable serial input interrupt, clear all "junk" from the buffer, then enable serial interrupt.
Is this the proper way of disabling and enabling MSComm1_OnComm() interrupt? Thank you.
Enabling && Disabling Frame
I've a frame in a form(Form1). Over that frame i've some other components (option buttons. text box). What i need is, when i disable the frame, components over the frame should also become disabled. How can i do this?.
Enabling And Disabling Buttons
Hello,
I've been working on a project where employees have to punch in and punch out through buttons on a form. I managed (Thanx to Hack) to hook it up to a database that records the time where employees punched in and punched out. But, is there a way I can make the employee not accidentaly punch in or out twice. Perhaps by disabling the punch in button when this particular employee punches in and enabling it only if he punches out. Any code or advice would be really appreciated.
Enabling And Disabling Combo Box
Greetings,
I am currently using Microsoft Office in order to create a few simple VB scripts. Since I do not have much experience with VB, I was looking to see if anyone could help me.
I've created a combo box that has "None", "One" and "Two" as the options. After selecting "One" I would like for a disabled combo box to become enabled so the user can input another option. If the user changes his/her mind and switches the option to "None" or 'Two", I would like for the combo box to disable itself again. I used the following code but it did not work:
Private Sub ComboBox1_GotFocus()
ComboBox1.Clear
ComboBox1.AddItem "None", 0
ComboBox1.AddItem "One", 1
ComboBox1.AddItem "Two", 2
If ComboBox1 = "One" Then
ComboBox2.Enabled = True
Else
ComboBox2.Enabled = False
End If
End Sub
I also tried placing the If ComboBox1= "One"...... code under the Private Sub ComboBox2_Click() and was unable to make it work that way.
If I need to post more detail, please let me know.
Thanks!
Enabling/Disabling Tooltips
I've looked around but haven't found an answer yet for this...
I've got a VB6 app that I would like to add ToolTips to - no problem there. However, I would like to give the user the ability to disable the ToolTips if they don't want them poping-up all the time. I have a user preferences file that I can store the info in, but don't know how to turn the tips off for a whole app.
Anyone got an idea?
Thanks.
Enabling/disabling A Control...
hey all,
I am using the WebBrowser1 control on my app. On the form that loads the control I would like to be able to check the registry for a setting (I have code to do this), then, either enable or disable the WebBrowser1 control.
Reason being is some users don't like any apps accessing the net, this way they can enable or disable that "feature".
TIA...
Enabling And Disabling Ports (TCP/IP,FTP) Using J
How can we enable and disable TCP/IP , FTP ports on the client machine using either Visual Basic or Java, and also how we can make different ports communicate with each other programmatically ? I am a new user please help me. Thanks...
Disabling And Re-enabling Toolbars
Working on an Excel project using VBA (have been for way too long now ) and one of it's features deals with the toolbars. Basically my project has it's own toolbar that will handle all of the functions that I want the user to have. And it disables everything else (and hopefully right-click too one of these days) so that a wandering user can't do other things to the sheet. However, I also realized that the user may be working with other excel sheets at the same time, so I wanted the toolbars to toggle...here's what I've got so far:
in the modules:
Code:
Private toolview() As Integer
Private isClosing As Integer
Sub Closing()
isClosing = 1
End Sub
Sub Opening()
isClosing = 0
End Sub
Sub turnoff()
For i = 1 To 9
MenuBars(xlWorksheet).Menus(i).Enabled = False
Next
cnt = 0
i = 0
For Each Control In Application.CommandBars
cnt = cnt + 1
If Control.Visible = True Then
i = i + 1
ReDim Preserve toolview(1 To i)
toolview(i) = cnt
If cnt <> 1 Then
If cnt < 23 Then
Control.Visible = False
End If
End If
End If
Next Control
Application.CommandBars("Incentive").Visible = True
End Sub
Sub turnon()
If (isClosing = 0) Then
Application.CommandBars("Incentive").Visible = False
End If
For i = 1 To 9
MenuBars(xlWorksheet).Menus(i).Enabled = True
Next
For x = LBound(toolview) To UBound(toolview) 'Note: this is where the error occurs
Application.CommandBars(toolview(x)).Visible = True
Next
End Sub
Then in the workbook code:
Code:
Private Sub Workbook_Activate()
turnoff
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Closing
Toolbars("Incentive").Delete
End Sub
Private Sub Workbook_Deactivate()
turnon
End Sub
Private Sub Workbook_Open()
Opening
Toolbars.Add ("Incentive")
Toolbars("Incentive").Position = xlTop
Toolbars("Incentive").ToolbarButtons.Add 2
Toolbars("Incentive").ToolbarButtons.Add 3
Toolbars("Incentive").ToolbarButtons.Add 9
Toolbars("Incentive").ToolbarButtons.Add 244
turnoff
End Sub
now, most of the time it works fine...it shuts off the custom toolbar when other sheets are active, and remembers what the user was using with their other sheets, turns those on. Toggle back to my sheet, and it reactivates the custom toolbar and disables everything else. However, sometimes, like when one sheet is open and then I open this one, and toggle, and then close this one. It comes up with errors. Sometimes it just doesn't remember what the user had running....other times it comes up with subscript out of range errors in the toolview array. I'm brainfried like usual, and thought maybe you folks could take a gander at it, and see if there is something blatantly wrong with the code etc. ANY suggestions or ANY advice would be GREATLY appreciated. Thanks!
Enabling/disabling Internet In LAN
Hi vb guys! I would like to ask for ur help... I have this problem, how can enable/disable the Internet connection of a client or all of the clients from the server? Need help pretty badly... Thanks
Enabling/Disabling Screensaver
How can VB control the screensaver (Windows 95 platform)? I need to disable the screensaver when a specific window is displayed and re-enable screensaver when that window is unloaded.
Thanks for any help.
d
Enabling/disabling Many Items On A Form
I'm very new to VB, in this case within Access, and I'm a little mystified about how to complete one task. I'd like the majority of the fields and buttons on a form to go "read only" (disabled) when the selected record (part of an order) is "filled". Basically I would like to wire the fields to a method on the form that returns a bool saying whether or not that field should be enabled.
I can't see to see how to do this. The system currently allows me to set the enabled property only as Yes or No. What I want is to set it to my "shouldBeEnabled" function. Is there a way to do this?
There is a fairly similar function I would like to build to allow each field to display a colored border, red for things that need to be filled out and are currently empty, yellow for things they don't need to fill out but should, etc. For this task I would want to have a sub for each field that returns a color, but again it seems that that color can only be set to a fixed value.
Thanks!
Maury
Enabling/Disabling Toolbar Buttons
Hey everyone,
I've searched the forum and have no luck, so here we go.
I'm working on an MDI application that has cut, copy, and paste buttons.
Obviously, the cut and copy buttons should not be enabled when a command button has the focus and other situations like that.
Is there anyway to do this other than in the GotFocus and LostFocus events of every control check to see if the active control is a textbox, if text is selected, etc etc etc.
I thought of using a timer to do this, and have code to check it in the Timer event, but that seems pretty inefficient.
Any ideas??
Thanks all.
Enabling/Disabling Autoplay From Registry
Apparently it is possible to do this programaticaly (Microsoft KB Article ID: Q150449). Why am I unable to do this without crashing VB6? Autoplay hasn't worked on my machine for some time. Could somebody please bash this code out and send me the example (The key in question is in the article, along with all the API functions and key changes necessary. I just can't do it ...)? Much appreciated!
Enabling And Disabling Cells In MSFlexgrid
Just a quick question: -
How do I disable a cell in a MSFlexgrid.
basically when I click on cell (2,2) it changes its value from 0 to 1
-I want cells (2,3) and (2,4) to be disabled so when i click on those cells values will not change from 0 to 1
and then if I click on the cell and change its value from 1 to 0 I want to enable those cells again!
I hope there is a quick way of doing this!
Eb
Enabling / Disabling A Timer Via Another Form
Sorry im in a bit of a hurry so i don't have time to find this out myself, but if i have a timer on a form (lets say form1) then how can i make a radio button on another form turn it on or off? (form2)
is there a way i can modify
timer1.enabled
or a property that allows it to be changed from any form?
Disabling/enabling Ctrl+alt+del - Urgent
hi,
I tried using the SystemParameterInfo API to disable ctrl+alt+del and the WIndows key.
The code i used was:
SystemParametersInfo(97, bDisabled, ByVal 0&, 0)
I also tried:
SystemParametersInfo(97, bDisabled, CStr(1), 0)
Where bDisabled was true for disabling and false for enabling.
The former caused the system to hang(I had to restart everytime) and the latter gave me an error saying that "VB has performed an illegal operation and will be shut down"
Can someone help me out here?
Im using vb6 with windows95.
Thanks in advance,
Ramya.
P.S. Is there any way this can be done with NT???
This Is About Enabling And Disabling Text Boxes
This might sound like a dumb question but I am doing a database and I want the user to only beable to use the text box when they click on add new record or delete record or update record.
I just want to know what the code would be for this.
Thank you.
Enabling And Disabling The Command Buttons
I have this line of code which I use to confirm network connectivity:
Dim ECHO As ICMP_ECHO_REPLY
Dim pos As Long
Dim success As Long
If SocketsInitialize() Then
'ping the ip passing the address, text
'to send, and the ECHO structure.
success = Ping("10.1.1.1", "Hello", ECHO)
'display the results
If Left$(ECHO.Data, 1) <> Chr$(0) Then
pos = InStr(ECHO.Data, Chr$(0))
End If
SocketsCleanup
Text1.Text = "You are connected to the Network"
Else
MsgBox "Windows Sockets for 32 bit Windows " & _
"environments is not successfully responding."
What I want to do is if the the network is available I want the command buttons to be enabled....I have them disabled by default.
Thanks in advance for your help
Enabling/Disabling Network Components
Hello,
Can anyone tell me how to enable/disable network component programatically (Win32/MFC)? I have attached an Image which shows about 2 network components one is local Ethernet and another one is WiFi wireless LAN. I need change among these. How ?
Thanks,
Vikas
Disabling/Re-enabling Copy && Paste Functions
Greetings,
I have created an Excel based survey system whereby people are sent individual surveys in Excel and return them to me. From there, I use another workbook to compile the data using a macro which goes from sheet to sheet copying the data.
In an effort to control responses, I have disabled copy and paste functions in each individual survey with the following code:
Code:
Private Sub Workbook_Activate()
Dim octrl As Office.CommandBarControl
'Disable all Cut Menus
For Each octrl In Application.CommandBars.FindControls(ID:=21)
octrl.Enabled = False
Next octrl
'Disable all Copy Menus
For Each octrl In Application.CommandBars.FindControls(ID:=19)
octrl.Enabled = False
Next octrl
'Disable all Paste Menus
For Each octrl In Application.CommandBars.FindControls(ID:=22)
octrl.Enabled = False
Next octrl
'Disable all Paste Special Menus
For Each octrl In Application.CommandBars.FindControls(ID:=755)
octrl.Enabled = False
Next octrl
'Disable the Edit Menu
For Each octrl In Application.CommandBars.FindControls(ID:=30003)
octrl.Enabled = False
Next octrl
Application.OnKey "^c", ""
Application.OnKey "^v", ""
Application.CellDragAndDrop = False
End Sub
Private Sub workbook_Deactivate()
Dim octrl As Office.CommandBarControl
'Enable all Cut Menus
For Each octrl In Application.CommandBars.FindControls(ID:=21)
octrl.Enabled = True
Next octrl
'Enable all Cut Menus
For Each octrl In Application.CommandBars.FindControls(ID:=19)
octrl.Enabled = True
Next octrl
'Disable all Paste Menus
For Each octrl In Application.CommandBars.FindControls(ID:=22)
octrl.Enabled = True
Next octrl
'Disable all Paste Special Menus
For Each octrl In Application.CommandBars.FindControls(ID:=755)
octrl.Enabled = True
Next octrl
'Enable the Edit Menu
For Each octrl In Application.CommandBars.FindControls(ID:=30003)
octrl.Enabled = True
Next octrl
Application.OnKey "^c"
Application.OnKey "^v"
Application.CellDragAndDrop = True
End Sub
Private Sub workbook_sheetselectionchange(ByVal sh As Object, ByVal target As Range)
With Application
.CellDragAndDrop = False
.CutCopyMode = False
End With
End Sub
My data compiling macro is as follows:
Code:
Sub Transfer()
Application.ScreenUpdating = False
x = False
NewFN = Application.GetOpenFilename(FileFilter:="Excel Files (*.xls), *.xls", Title:="Please Select a file")
Do While NewFN <> False
NewFN = Application.GetOpenFilename(FileFilter:="Excel Files (*.xls), *.xls", Title:="Please Select a file")
If NewFN = False Then
Exit Sub
Else
Workbooks.Open Filename:=NewFN
End If
Sheets("DATA - 8").Activate
Range("A6:AV25").Select
Selection.Copy
Windows("Database Template.xls").Activate
Range("A6").Select
ActiveSheet.Range("F6").Select
Do While ActiveCell <> 0
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Offset(0,-5).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.ActivatePrevious
Application.ScreenUpdating = True
Application.CutCopyMode = False
ActiveWindow.Close False
Loop
End Sub
My problem is that since copy and paste is disabled on each individual workbook, I cannot use the paste special function to transfer the data in my compiling macro. I have attempted various ways to reactivate copy and paste so I can transfer that data, but I haven't been successful. Is there any way to run a macro in a workbook from another workbook? Any insight would be much appreciated!!!
Enabling/Disabling Toolbar Buttons At Runtime
I am relatively new to Visual Basic and have recently started designing a practice application with one toolbar(Toolbar1). The buttons work fine but I need to enable or disable some buttons at runtime - For example, if 'Form1' is visible, the button to show that form needs to be disabled while enabling the button which shows 'Form2'. Can anyone help me out with this problem?
Enabling/Disabling Shutdown Button *RESOLVED*
I ran a source code with API to disable shut down / log off / password change / task manager, and then re enable, but it won't re enable my shut down button, so I have no way of turning off my computer without pushing the botton on my physical system. Does anyone know how to re enable the shut down button? I have the source for the program that did it. It re enabled task manager but didn't re enabled the damn shut down button!
Enabling And Disabling Proxy Server Through Visual Basic
hello, im currently studying at uni and i need to use a proxy server there, however when im at home i dont require a proxy, i would like to develop a little application that sits in my task bar and automattically checks to see which network i'm on, this could be done by checking the first 3 numbers of my ip, i know how to do all of this, the bit im stuck on is how to access the internet options to change the proxy server, any help would be great,
thanks alot
Enabling/Disabling Start Button On Windows 2000
I am looking for the API(s) and sample code that I can use that will allow me to enable and disable the windows start button. The reason is I am helping a friend of mine whose primary tech support person recently passed away, and he disables the start button upon loging (I assume). I was hoping to:
1) understand how that can happen
2) have a temp solution to enable it to perform some admin task - such as backup the server
Any help would be appreciated. Thank you.
Urgent Help - TreeView Enabling/Disabling Child Nodes
I'm trying to load a treeview that has upto 4 levels. The requirement is, while loading the treeview, i need to enable the Level 3 and level 4 and disable the rest.
I know that we have Treeview.enabled = false but is it possible to use this at various levels.
Root
Parent1
AA
BB
BB1
BB12
In the above, i need to enable bb1 and bb12 and disable the rest. Also, is it possible to show the treeview as expanded with the selection that was already made.
be it that im loading the treeview in a View mode where the user has already made a selection of BB12. Can the treeview be expanded while loading the second time based on the mode?
Pls provide inputs.
Disable MDI Parent's System Context Menu Right && Left Click Menu Pop-up. How?
I am trying to do this without much luck, but managed to get rid-of the Min/Max buttons via an MS example at the link below.
http://support.microsoft.com/default.aspx?scid=kb;en-us;137033
However, when a user right clicks on-the MDI parent's Caption bar, a popup up menu appears - Woud like to prevent that.
Secondly, if a user "LEFT" Click on the top Left corner of the same Caption bar (where the Icon appears); it pops the same Pop-Up Menu - Like to stop that.
Thirdly, If a user double clicks on the same menu bar, form flickers, bobs down & up (Min & back to Max state), looks back at you and say's "fooled Ya!", as if it was possessed by some sort of strange evil code. Now I Would really, really, like to make it stop doing that.
Basically, like to prevent any mouse action on MDI Parent's Title Bar. Searched for couple of hours in vain (pain), but nothing turned up for what I am looking for. I can stop the right click on the form it-self by detecting mouse down button, but that’s not preventing the click event in MDI parent's title/caption bar.
Anyone know how or what needs to be done to get this to work? Any and all help, suggestions, etc. will be greatly appreciated!
Enabling The Menu
Dear all,
I have disabled the 'X' menu (Close Window menu) in the Form by using Removemenu API. Is there any way to re-enable the disabled menu ?
To disable the menu im using MF_DISABLED and its value is &H2&
why this
B4 Connect to the database Im disabling the X menu. After the succesfull connection I like to re-enable the x menu
Is it possible ?
OR
How to change the border style of the MDI form, then I can remove the min/max/close buttons
Thanks
A.Rajeeshun
Enabling Menu In Access
Quote:
Originally posted by Robby
If SpecialKeys are disabled or there is a group logon (depending on security), The Shift-Key will not have any affect.
Since neither apply (I think) for now, just right-click on the empty part of tool-bar and select more menus to show.
Say, Robby, I have disabled SpecialKeys in my applications, but that has no effect on the SHIFT-ENTER thing. All my efforts to hide the database window from unauthorized users have failed. I do have full security implemented, and I don't think it's that difficult, but it's my first experience with system security, so I'm probably naive.
Anyway, the Access Help files just talk in circles. Finally, I had to write a SQL query using the WITH OWNERACCESS OPTION clause, in order to give users the kind of limited access to tables that I needed to. Now, they can see the database window if they hold down the SHIFT key (with SpecialKeys disabled) but they can't browse the tables (they can't see any data without the proper form open.)
Are you talking about the Startup Dialog, when you say SpecialKeys disabled? Or is there some way of doing this in code, from within Access?
Enabling Menu In Access
Hi, I'm very new to Access programming, but I've been programming in VB for a while. This is going to sound like a stupid question, but I really would like to know the answer. I'm trying to look at a .mdb file to figure out how it works, but when I open it, all my menus are gone. I can only see the application menu (which is File->Exit). I know there's a key combination to enable them again, but can't for the life of me remember it. Can anyone help?
Thanks.
Best Approach For Menu/toolbar Enabling
As I sit down to write the enabling code for my menus and toolbars (all 120 buttons/menus), I wonder if there is a decent approach that people have worked out.
How does everybody out there handling the enabling nicely - in the past for me, it has ended up being a massive select/if block checking all manner of variables to enbale the various states of the menus.
But the problem I'm facing is that the number of menus/buttons means that it's going to take a bit of time to change them all, so I need a nice elegant way of changing just a few (only the ones that are actually effected by a given event for example)...
Any ideas?
- gaffa
Disabling "X" On The Form And Re-enabling It Later.
Is it possible to disable the "X" on the form whenever processing is being done by the form and then re-enable it when the processing is complete. *We process data against DB2, and it takes couple of seconds (sometimes 10-15) before the operation is complete. And we don't want the user to fool around and click on "X" when the data update is taking place"
TIA.
How To Get The Menu Parent
how to get the name of the parent of the child menu in my forms?
says like the IE, we have Edit menu. in the Edit menu, we got Cut, Copy, Paste, ...
the parent of the 'Copy' is 'Edit'.
so how to return the parent name of 'Copy'
Menu's Parent
Can anybody tell me how to create a "complete tree" of a menu, on run-time. I mean, I have a mnuItem(0), and can load diferent mnuItem(X)... but how can I create different levels of menues and how do I set its parent?
MDI Parent Menu Problems
A collegue of me has some problems with the menu's on an MDI parent.
An MDI child has a usercontrol with a menu. This menu is merged with the MDI child's menu. No problem there.
The problem is that the MDI parent's menu disappears as soon as the active MDI child has it's own menu (or an ActiveX control on this child form has a menu).
Does anyone know how to merge the MDI parent's menu with the menu from the MDI child?
Any workarounds or maybe some API calls to show the MDI parent's menu?
Establishing 'parent' Menu
Is there a way to establish the menu control to which a submenu 'belongs'?
I am trying to get around a problem where I am iterating entries in a menu and setting some or all to invisible depending upon the user's credentials. In some cases none of the submenu items will be available to the user in which case I need to make the 'parent' menu control invisible (and I get an error if I try to make the last submenu invisible anyway as one visible item is apparently mandatory).
As an example, in a typical application 'File' would be the 'parent menu' while the submenu items would be 'Save', 'Save as', 'Print' etc. In the context of the menu editor, the 'parent' is not indented while the submenu items are indented.
Disabling A Menu
I noticed something about the autoverbmenu. It screws up my paste.
Here's the thing: I'm trying to get my rich text box to seem like a regular text box. So when one pastes through my menu, it comes out in one font, looking like all the rest.
However, with the autoverbmenu, ctrl+v goes there. And it does not call my procedure to simplify all the font.
I *would* disable the autoverbmenu, but I'm using it for the nifty undo option.
So, any suggestions? I don't even know where to start.
Disabling Menu
how can i disalbe the menu on windows explorer by visual basic code, like disabling File or search or other things
thanks
MDI Parent/Child Menu Question
Hi EVBers!
I need some help with this one. I would like to allow the user of my program the ability to toggle the state of a variable between "true and false". I need to have the user be able to control it in two manners: 1) with a menu selection with the menu item (on the MDI main form) toggling between "checked" and "unchecked", and 2) with a button on a child form. Each approach works in isolation, but I would like to have them work in unison. When the user toggles the button on the cild form, I want to have the menu item on the parent form also change "checked" status.
When I use (in the child form):
frmMain.mnuItem.Checked = Not frmMain.mnuItem.Checked
...I get an error message telling me that I can't run another parent form. I can't seem to be able to coordinate the menu item and the frm button. Please help. It is greatly appreciated.
Kind regards,
Nick
MDI Child Control Parent Menu Bar.
I am having a problem referencing the MDI Parent from my child to tell a Menu Item to Disable/Enable itself. I have a program where the childs need to do this. Hopefully someone has a good workaround.
BTW I'm getting a only one MDI parent error when I try calling it by the Parents name.
MDI Parent Steals The Menu From The MDI Child
My problem is simple. I have an MDI Form that has a menu of its own. The child form has a menu of its own also.
However, when I run the code, the MDI Parent sports the menu created on the Child form (the Child form, at runtime, does not have its menu, and the parent doesn't show its own menu until the child is hidden or unloaded.
Anyways to solve this, anyone?
Disabling Right Click Menu
Hi there,
I found this piece of code which works fine for me. Unfortunately, there isn't just one textbox which shouldn't provide the right click popup menu. So, let's come to the point and, therefore, to the questions
1) Is there an efficient way to apply the hooks, e. g. some kinda loop?
2) Can I use the same function (NoPopupWindowProc in this case) for all the texboxes or do I have to write a procedure for each textbox?
This is my first encounter with subclassing techniques and it doesn't seem to be that easy at all as I already crashed the IDE many times ...
|