Block Start Menu To Show A Form?
May 13, 2011I want to open a form when the start button is pressed.
View 5 RepliesI want to open a form when the start button is pressed.
View 5 RepliesHow can you access the Start Menu from a VB form for both Windows XP & 2000?
I've done a lot of research and haven't found anything that works for this.
I have a program that uses two forms. The program opens to the Main form, and the user can navigate to the other form from the Main form through use of a button. Here's the way I've currently written it: When the Main form loads, it declares and instantiates the other form during the load procedure. When the user presses a button, the second form is displayed by means of the ShowDialog method. On the second form, there is a Return to Main Screen button which closes the second form, bringing the user back to the Main form.
So, here's the structure of the code:
Code:
Public Class frmMainForm
Dim frmSecondForm As New SecondForm
Private Sub btnSecondForm_Click(blah, blah, blah) Handles blah, blah, blah
[CODE]...
Here's my reasoning: Originally, I wrote the code so that a new instance of the second form was created every time the button was pressed. The problem was that whatever data was displayed on the second form, previously, was lost when the user returned to it a second time. Since the user would be switching back and forth between these forms, frequently, I needed that data to persist.
What is the best practice for accomplishing this:
1) Declare and instantiate the second form on program start, as I have done, and use the button simply to show the form?
2) Declare and instantiate the second form each time the button is pressed but maintain the variables on the Main form and pass them ByRef to a custom constructor for the second form? Is this even possible?
3) Something else?
In this code the program did not show me the screen and start loading.I see the Form when they has finished with the load of the file
Private Sub Main_Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TotalRecords = 0
Call Find_Total_Records()
[code]....
I want the program FIRST show me the screen and after i see the form to start load the file I have try with the 'Application.DoEvents() and System.Threading.Thread.Sleep(200) without any effect?
i want to show context menu on drop down menu item right click...As an example,Suppose we add bookmark in mozilla & when we right click on that item..context menu is showing
Code:
Private Sub MenuAddToFavorites_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MenuAddToFavorites.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
[Code]......
Is it possible to programatically block users for accesing the context menu on files listed after showing an openfiledialog control that comes with the .net framework?
The intent is to block them from accessing "open" or "open with" and only allow them to pick a file from the list.
My only other idea is to build my own control instead of using System.Windows.Forms.OpenFileDialog
I want to show a context menu on right click on a menu, but the menu disappears every time it is right clicked and I dont get the right coordinates for my menu.
Here is my code:
Code:Private Sub colMenus_MenuContextMenu(ByRef Sender As Object, ByRef e As clscolMenus.MenuContextEventArgs) Handles colMenus.MenuContextMenu Dim p As Drawing.Point Dim tm As ToolStripMenuItem
[Code].....
This is VBA6.5.1040 using an Excel 2007 (12.0.6524.5003) SP2 MSO (12.0.6529.5000) spreadsheet. The aim is to use a cell in which one can type "Y" or "N" in answer to a question. Before proceeding, the code forces the user to choose one or the other (section B). This works perfectly well. I then added the code in section A so that the user could type "y" or "Y". It would then convert "y" to "Y" and the code would proceed as normal, and similarly for "N". However, the following code in section A produces: "Compile Error: End If without block If," and high-lights the first 'End If'.
[Code]...
Im pretty newbie in coding as my only resource of learning Visualbasic is from the internet..And , I would like to disable some key inputs when my application starts.Means i will put the script given by you guys at MyBase.Load.
View 10 RepliesIs it possible to start a timer on a separate thread so it doesn't block the user interface, or do I have to make a thread that I call from the timer?
View 2 RepliesI'm working on a program that allows me to edit XML data in a DataGridView. I have most everything working but I don't like my current TreeView Structure.I load the XML data into a DataSet and edit it there, so that is what I'd prefer to base my TreeView on. I've tried a few things such as..
[code]...
What I'd really like to have is a tree view that shows the Parent Child objects nested. I'm not sure exactly how to accomplish that in this case...
In my app, I have an option to install another app (that I don't have any control over).
Once this second app is installed, I want to be able to remove the Start Menu items that it creates - how easy would this be to do?
I know the names of the menu items.
I created shortcuts for some of my exe's in the program menu. For example, I might create shortcuts for a.exe, v.exe, and g.exe. By default, it aligns as a, g, v (in alphabetical order). I want to place my shortcuts in a different order, such as (v, a, g).
In short, I want to be able to change the order for the shortcuts it creates to something other than alphabetical order.
I am using wshshellobject in vb. I created a dll; through that I created my shortcuts
I'm using this code to get the StartMenu handle:
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal IpClassName As String, ByVal IpWindowName As String) As IntPtr
Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal
[Code]....
But it doesn't seem to work, I can get the taskbar handle but not the start menu handle
How do I make a menu item on a menu strip link to another windows form (like a menu item that links to an about page already created in the project). I know that every coder knows how to do this, but i've read most of the instructions in the world for Visual Basic coding, but can't find ANYTHING I know coding fairly well, so I can modify it, but I can't create it my self.
View 4 RepliesThis is going to be hard to explain but oh well.I have a form with a menu. When I hit option one, it opens another form (form2) inside that same form (mdiparent). When I hit X on form2, then try to open it again from the original form with a menu thru the menu, It says it cant access a disposed object. Here is the code: Form1:
[Code]...
Suppose I have ToolStripMenuItem mnuOrderOptions that contains the three drop down items. I want to copy all the items are their respective event handlers to Contextmenu on button click & then bound that context menu with the form.
Private Sub AToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AToolStripMenuItem.Click
MsgBox("A")
End Sub[code]....
how to clone the menu items and then bound it to form context menu.
how can I disable the start menu! Or completely shut down the entire "explorer" in Windows Windows Mobile 6.1, so that users can not go out of my program.I have try [URL], but then Windows Mobile 6.1 hang.
View 2 RepliesI have got a surprise when my app did not work as I expected when I started it from the Windows Start Menu. I explain: When starting the program from the application directory, it works fine, because the "Application Path" property gives the right path to find the access database located in the same directory, BUT, the problems comes when I start the program from the Windows Start Menu. What can I do to solve this?
View 7 RepliesI went through 10 pages between 3 searches and none of the topics were even relevant.
View 2 Repliesit is possible to make an application which uses the input of the search bar in the windows 7 start menu..
View 2 RepliesI'm making a security program that locks the users screen. I have already figured out how to disable task manager but now I need to disable the task bar from showing and the start menu. Also, trying to do an event on alt+F4 doesn't seem to stop the program from exiting. Any other solutions? This program is intended for security reasons and I am not using it for any viruses.
View 6 RepliesI'm running into this one very specific issue:
- I have a VB.Net 2005 Project for which I've created a Setup Project.
- In my Setup Project, I've added a shortcut on my Start Menu, that points to my Application.
- After deploying it, all works great.
- One of my users chooses to *copy* the shortcut from the Start Menu into their Desktop.
- I then create an upgrade for this Application. Again, the deployment works great. They can start my application from the Start menu.
- They double-click on their icon in the Desktop and they get a popup: Title of the message box: Problem with Shortcut Description of the message box: (X) The parameter is incorrect.
The shortcut's Target, is blank ( which I believe is the problem ).I'd love to be able to specify an actual [TARGETDIR]myApp.exe type of string as the shortcut's target in my Setup Project, but I can't do this.Instead I have to point it via UI, to my Target Application ( which I'm assuming is resolved at install-time ). The problem with this is that it appears that the shortcuts get re-evaluated every time you re-install / upgrade the application. Since my previous version is technically not installed anymore, my shortcut gets invalidaded, even though the target path is still the same and I haven't changed my executable's file name.
i just got visual studio 2010 professional edition and it automatically opens up C++ i need it to open up a menue where i can choose visual basic or c++ just like at my college.
View 5 RepliesI finished True Tune and built it then published it, but it doesn't appear in the win7 start menu or as an icon on the desktop.
View 6 RepliesSo I need to disable to start menu and have found a code on a website but it doesn't seem to work. Heres the
Dim TFlag As Boolean
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (byval hWnd1 as Long, byval hWnd2 as Long, byval lpsz1 asstring, byval lpsz2 asstring as Long
Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
[code]....
Edit: I'm creating a program for places like schools or library where the password for all users are the same. I already made the program go to full screen and always on top and have disabled the user from using taskbar but I can't stop the start menu from appearing.
How can I get my application to load the Sub Main at the start rather than loading a form on start up.
I have tried declaring 'Public Sub Main' on my forms and in some modules, yet in my project properties, it is not one of the options.
How do you clear the Recently Opened Program Lists in the start menu?
I've been making a computer cleaner, and I've Googeling and I guess binging so much to find an answer but i couldn't, does any1 know how?
The most I could find was: [URL]
BTW I know how to clear it, but I need to know with VB code.
I've built a couple of Apps successfully, but having published them to a Network Folder, Non-Admin Users can't install them themselves because the Install attempts to create an Entry in the Start Menu. There may be other Security issues (I need 4 of the permissions included if I publish it as a Partial Trust Applications, which I think affect this) after this point that I'm not aware of, but yeah, it fails when trying to create a Start Menu item -
+ Access to the path 'C:Documents and SettingsJameOStart MenuProgramsMynas' is denied.
I think excluding the right is just part of the SOE, but is there some way I can create this and have it NOT create a Start Menu item, haven't been able to find any?
What must I add to the deployment project so that when the user clicks Start>All Programs>My icon, my program runs. Now the explorer comes up pointing to the application directory.
View 10 Replies