|
-
Aug 2nd, 2009, 08:01 AM
#1
Thread Starter
New Member
HIDE or DELETE A MENU OF APP
Who can show me ! How can i hide or delete a memu, a menu items of any vb app (from .exe file run). Please show me make a .exe run same time with that app for to hide, delete its menu. Or any way do that requirement ? which file does Its menu staying (exe, dll in its installed folder : not see)
I using a VB app. I see a image on star up. But I don't know it staying onin which file. I checked all of its files (dll.exe,installed folder) to see only a few icons. How can I extract or view that star up image ?
Thanks!
Last edited by vantrung; Aug 2nd, 2009 at 08:17 AM.
-
Aug 2nd, 2009, 08:16 AM
#2
New Member
Re: HIDE or DELETE A MENU OF APP
 Originally Posted by vantrung
Who can show me ! How can i hide or delete a memu, a menu items of any vb app (from .exe file run). Please show me make a .exe run same time with that app for to hide, delete its menu. Or any way do that requirement ?
Thanks!
Just set .Visible = False
e.g.:
If LoginName <> "Fred" then
mnuMyMnue.Visible=False
Else
mnuMyMnue.Visible=True
End If
-
Aug 3rd, 2009, 09:53 PM
#3
Thread Starter
New Member
Thank to Re: HIDE or DELETE A MENU OF APP
Thank you much about your answer. Please show me more !
I having a VB .exe (have no project)(ex:myexe.exe). I want make another .exe file (starexe.exe). Please show me How to write commands code run starexe.exe then run myexe.exe for hide its menu ?
* In a .dll file. I see a code as :
MultiUse = -5 'True ( Error in -5 )
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 2 'NotAnMTSObject
End
'VA: 11003060
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'VA: 11003008
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
........
With this code. App always run good. But if I create it in a project.dll. It will take a error "invalid outside procedure" in above line
Why is that ?
* I also see a code look like as :
public Sub mycom(nCode, strMESS) '1100F490
1100 F490: push ebp
1100 F491: mov ebp, esp
1100F493: sub esp, 0000000Ch
1100F496: push 11001AF6h ; MSVBVM60.DLL.__vbaExceptHandler
1100 F49B: mov eax, fs: [00h]
1100 F4A1: push eax
1100 F4A2: mov fs: [00000000h] , esp
......
end sub
What language is it and may convert to normal language ?
These all're very necessery to me . Please help me again . Thank you very much!
Last edited by vantrung; Aug 3rd, 2009 at 10:11 PM.
-
Aug 4th, 2009, 12:04 AM
#4
Frenzied Member
Re: HIDE or DELETE A MENU OF APP
Have a look at this thread to get you started...
http://www.vbforums.com/showthread.php?t=562056
Good Luck
Option Explicit should not be an Option!
-
Aug 4th, 2009, 01:00 AM
#5
Addicted Member
Re: Thank to Re: HIDE or DELETE A MENU OF APP
 Originally Posted by vantrung
public Sub mycom(nCode, strMESS) '1100F490
1100 F490: push ebp
1100 F491: mov ebp, esp
1100F493: sub esp, 0000000Ch
1100F496: push 11001AF6h ; MSVBVM60.DLL.__vbaExceptHandler
1100 F49B: mov eax, fs: [00h]
1100 F4A1: push eax
1100 F4A2: mov fs: [00000000h] , esp
......
end sub
That is Assembly language code.
-
Aug 4th, 2009, 06:48 AM
#6
Thread Starter
New Member
A vb exe file rules over another exe
Who can show me the button command code of a exe file rules over another exe as hide a menu or submenu of that exe file !
Thanks !
-
Aug 4th, 2009, 10:24 AM
#7
Re: A vb exe file rules over another exe
Please do not post multiple threads for the same question (original thread here).
This thread is now closed.
-
Aug 5th, 2009, 04:11 AM
#8
Thread Starter
New Member
Re: HIDE or DELETE A MENU OF APP
your link have no show for that.
I having a VB .exe (have no project)(ex:myexe.exe). I want make another .exe file (starexe.exe). Please show me How to write commands code run starexe.exe then hide the myexe 's menu ?
* In a .dll file. I see a code as :
MultiUse = -5 'True ( Error in -5 )
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 2 'NotAnMTSObject
End
'VA: 11003060
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'VA: 11003008
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
........
With this code. App always run good. But if I create it in a project.dll. It will take a error "invalid outside procedure" in above line
Why is that ?
-
Aug 5th, 2009, 09:22 PM
#9
Frenzied Member
Re: HIDE or DELETE A MENU OF APP
Vantrung,
You have now asked three questions in one thread...
The code as noted looks like assembly and I take it you have decompiled the original exe to get the resut you have posted and that result is not what you want.
The link I gave you shows how to control, change, and get the properties of another applications menu but if you expect me or someone else to do the work for you, well sir/ma'am you are very mistaken. You sir/ma'am are going to have to do some work yourself, put in some effort and read the help files on those API's and the associated API's.
Now as for "invalid outside procedure" means you have some code that is supposed to be contained within a sub or function (a procedure).
Good Luck
Option Explicit should not be an Option!
-
Aug 5th, 2009, 09:58 PM
#10
Re: HIDE or DELETE A MENU OF APP
-
Aug 8th, 2009, 03:49 AM
#11
Thread Starter
New Member
Re: HIDE or DELETE A MENU OF APP
Sorry vb5prgrmr ! Because i'm very new to VB. Return to my problem . I see all of problem to be tell about addmenu to Notepad They didn't tell to another VB APP. When I use to My form to hide menu to another VB APP. It didn't display my form and open another vb app only (ex: C:\program files\myApp.exe)
Code add menu as :
Option Explicit
'******************************************************************************
Private Const MF_BYCOMMAND& = &H0&
Private Const MF_BYPOSITION& = &H400&
Private Const MF_POPUP& = &H10&
Private Const MF_STRING& = &H0&
'------------------------------------------------------------------------------
Private Declare Function AppendMenu& Lib "user32" Alias "AppendMenuA" (ByVal hMenu&, ByVal wFlags&, ByVal wIDNewItem&, ByVal lpNewItem$)
Private Declare Function CreatePopupMenu& Lib "user32" ()
Private Declare Function DrawMenuBar& Lib "user32" (ByVal hwnd&)
Private Declare Function FindWindow& Lib "user32" Alias "FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function GetMenu& Lib "user32" (ByVal hwnd&)
Private Declare Function GetSubMenu& Lib "user32" (ByVal hMenu&, ByVal nPos&)
Private Declare Function GetMenuState& Lib "user32" (ByVal hMenu&, ByVal wID&, ByVal wFlags&)
Private Declare Function GetMenuItemCount& Lib "user32" (ByVal hMenu As Long)
Private Declare Function InsertMenu& Lib "user32" Alias "InsertMenuA" (ByVal hMenu&, ByVal nPosition&, ByVal wFlags&, ByVal wIDNewItem&, ByVal lpNewItem$)
Private Declare Function IsWindow& Lib "user32" (ByVal hwnd&)
'------------------------------------------------------------------------------
Private Declare Function SetCWPMSGHook& Lib "dscwpmsg" (ByVal hwnd&, ByVal AdrCWP&, ByVal AdrMSG&)
'------------------------------------------------------------------------------
Dim hNote&, hmen&, hsub&
'******************************************************************************
Private Sub Command1_Click()
Command1.Enabled = False
hmen = GetMenu(hNote) '# get the menu handle of Notepad
hsub = CreatePopupMenu '# create an own submenu
Call AppendMenu(hsub, MF_STRING, Offset + 1, "SubMenu1") '# fill submenu
Call AppendMenu(hsub, MF_STRING, Offset + 2, "SubMenu2")
Call AppendMenu(hsub, MF_STRING, Offset + 3, "SubMenu3")
Call AppendMenu(hsub, MF_STRING, Offset + 4, "SubMenu4")
Call AppendMenu(hsub, MF_STRING, Offset + 5, "SubMenu5")
'# Insert the submenu into Notepad's menubar at pos. 3
Call InsertMenu(hmen, 3, MF_BYPOSITION Or MF_POPUP, hsub, "New Menu")
Call DrawMenuBar(hNote) '# Redraw the menubar of Notepad
End Sub
'******************************************************************************
Private Sub Form_Load()
Dim dl&
'# Find or launch Notepad; get its handle
hNote = FindWindow("C:\program files\myApp.exe", vbNullString)
If IsWindow(hNote) = 0 Then
Call Shell("C:\program files\myApp.exe", 1)
Do Until IsWindow(hNote)
hNote = FindWindow("C:\program files\myApp.exe", vbNullString)
DoEvents
Loop
End If
'# install the WH_GETMESSAGE hook on Notepads thread and pass callback address
Call SetCWPMSGHook(hNote, 0, AddressOf Callback)
End Sub
'******************************************************************************
Private Sub Form_Unload(Cancel As Integer)
'# Release hook (optional, but good style)
Call SetCWPMSGHook(0, 0, 0)
End Sub
About Hidemenu code : I tell the truth :" I don't know". I expect you assisist me one more time !
Regard !
Last edited by vantrung; Aug 8th, 2009 at 04:23 AM.
-
Aug 8th, 2009, 10:13 PM
#12
Frenzied Member
Re: HIDE or DELETE A MENU OF APP
Have a look at RemoveMenu or DeleteMenu followed by DrawMenuBar.
Good Luck
Option Explicit should not be an Option!
-
Aug 10th, 2009, 10:13 PM
#13
Thread Starter
New Member
Re: HIDE or DELETE A MENU OF APP
Thank! But It's very hard to me. It seems unable control on another vb .exe, ...known system .exe only.
-
Aug 10th, 2009, 10:16 PM
#14
Re: HIDE or DELETE A MENU OF APP
Why do you want to remove or change the menu item on another app?
-
Aug 20th, 2009, 10:34 PM
#15
Thread Starter
New Member
HIDE or DELETE A MENU OF APP
Because I think To keep secret in buying - selling be necessery requirement. So, my target's not introduce to my customers a app in the trial period about some information in help menu, yet.
From there, I'd like hide this menu! Can you help me about this ?
Thanks!
-
Aug 21st, 2009, 12:12 AM
#16
Frenzied Member
Re: HIDE or DELETE A MENU OF APP
If TrialVersion = True Then
menuToHide.Visible = False
Else
menuToHide.Visible = True
End If
Option Explicit should not be an Option!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|