473,382 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

customizing a system menu: the RemoveMenu API call is broken

Bob
Apparently customizing the system menu in a Form requires API calls... that's
fine, but RemoveMenu doesn't work. Will I have to pop up my own menu to get rid
of certain selections?

Bob

Nov 20 '05 #1
10 2610
"Bob" <no*****@nospam.net> scripsit:
Apparently customizing the system menu in a Form requires API calls... that's
fine, but RemoveMenu doesn't work. Will I have to pop up my own menu to get rid
of certain selections?


Please show us some code...

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Bob
Not mine, but here is an example.

http://tinyurl.com/ovfc

Bob

"Herfried K. Wagner [MVP]" <hi*******@m.gmx.at> wrote in message
news:d6**********@m.gmx.at...
"Bob" <no*****@nospam.net> scripsit:
Apparently customizing the system menu in a Form requires API calls... that's fine, but RemoveMenu doesn't work. Will I have to pop up my own menu to get rid of certain selections?


Please show us some code...

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>


Nov 20 '05 #3
Cor
> Not mine, but here is an example.

http://tinyurl.com/ovfc

Bob

ROFL
Nov 20 '05 #4
"Cor" <no*@non.com> schrieb:
Not mine, but here is an example.

http://tinyurl.com/ovfc

Bob

ROFL


???

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #5
Cor
Herfried,
I give you an answer tomorrow, it is saterday night, and I look at the
answers, but dont answer them, you are from my Country, you know why.
Cor
Nov 20 '05 #6
Bob
That solved it. Thanks :)

"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:eV**************@TK2MSFTNGP09.phx.gbl...
Sorry, should have said Change MF_REMOVE for MF_BYPOSITION


Nov 20 '05 #7
And sometimes(rarely I'll admit) they are very good.

"Herfried K. Wagner [MVP]" <hi*******@m.gmx.at> wrote in message
news:bl**********@activevb.de...
"Mick Doherty" <md*******@nospam.ntlworld.com> scripsit:
The RemoveMenu declaration at that page is incorrect (not
surprisingly, since it's hosted at Planet Crap Code),
It's not the Planet thats crap, there is a lot of useful information buried in there. That example was just a poor translation of a VBClassic

example.
Samples on Planet Source Crap will give you a basic idea on how to solve the problem, but often they are really "buggy".

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #8
"Mick Doherty" <md*******@nospam.ntlworld.com> scripsit:
And sometimes(rarely I'll admit) they are very good.


Your own submissions...

;-)))

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #9
....and some others.
There are also those that have bonus features such as free error messages
and unexpected program termination. I try not to submit those.

;-)

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eX**************@TK2MSFTNGP10.phx.gbl...
"Mick Doherty" <md*******@nospam.ntlworld.com> scripsit:
And sometimes(rarely I'll admit) they are very good.


Your own submissions...

;-)))

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #10
Bob,
Which API guide?
Why, *the* API Guide. :-)
http://www.mentalis.org/


Oh, that one. Personally, the only "API guide" I trust is the Platform
SDK docs and headers.

The code I posted works under Option Strict. It's always on in my IDE as
default.
Oops, right you are. I thought the fact that the MF_REMOVE const was a
Long would cause a narrowing conversion, and therefore fail under
strict semantics, but I guess the compiler is smarter than that and
realizes that the constant value can safely be truncated to 32 bits.

The following code still fails to remove any system menu items.


Mike nailed it, MF_REMOVE should be MF_BYPOSITION (or MF_BYCOMMAND
with SC_CLOSE).

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 20 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sims | last post by:
Hi, I know to add a menu entry on the fly using AppendMenu(...) and i know how to remove it using RemoveMenu(...) I can even create a popup menu on the fly but the question is how do i remove...
4
by: VR | last post by:
I am trying to embed a check box into a FlexGrid's cell, but having a problem when I start scrolling the grid. Here is my MyCheckBox class... class MyCheckBox : CheckBox { void Init (...
4
by: Lucas Correa | last post by:
Hi, I am trying to customize printing for a webpage, setting the top and left margin, and cleaning the header and footer. The idea is to customize printer without user interaction, and don't...
10
by: One Handed Man [ OHM ] | last post by:
If this is duplicated, I'm sorry because I cant find the original post I made today Anyway . . Now its my turn to ask a question I want to develop an app which will run in the system tray....
0
by: Maileen | last post by:
Hi, I have a MDI application and i would like to remove dynamically the MDI children menu icon as also the restore, minimize buttons in the menu (when MDI children form are maximized). how can...
6
by: Ben Fidge | last post by:
Hi I've just created a new Master Page for my site and it uses the native Menu control. Strange behaviour is happening on page that use the master page. For some reason, the menu controls...
0
by: noneya22 | last post by:
I want to use a TreeView control as a one-level, vertical navigation menu. I'm using this control currently with a SiteMapDataSource and .sitemap file. I've written code that associates an image...
0
by: preetkanwal0678 | last post by:
Hello all, Am working on PYTHON +BRANWAVE(framework) Actually am Trying 2 make a tree menu using d both. Am not able 2 target the (.tmpl) files and not getting how 2 make frames in...
2
by: yela | last post by:
I am working in a floting menu for a website, I found this cool script, it works great, but I need to limit the movement of the menu to a table area, right now it goes up and down through the whole...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.