Click here to Skip to main content
15,903,362 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: FRACTAL FORMULA HELP REQUESTED Pin
The ANZAC4-Sep-07 19:53
The ANZAC4-Sep-07 19:53 
Question[Message Deleted] Pin
Cedrickdeorange4-Sep-07 10:37
Cedrickdeorange4-Sep-07 10:37 
AnswerRe: recent files menu items Pin
Dave Kreskowiak4-Sep-07 16:39
mveDave Kreskowiak4-Sep-07 16:39 
GeneralRe: recent files menu items Pin
Dave Kreskowiak5-Sep-07 2:22
mveDave Kreskowiak5-Sep-07 2:22 
GeneralRe: recent files menu items Pin
Cedrickdeorange5-Sep-07 4:59
Cedrickdeorange5-Sep-07 4:59 
GeneralRe: recent files menu items Pin
Dave Kreskowiak5-Sep-07 5:18
mveDave Kreskowiak5-Sep-07 5:18 
GeneralRe: recent files menu items Pin
Cedrickdeorange5-Sep-07 6:14
Cedrickdeorange5-Sep-07 6:14 
GeneralRe: recent files menu items Pin
Dave Kreskowiak5-Sep-07 8:36
mveDave Kreskowiak5-Sep-07 8:36 
Create a menu item under your File menu with a name of, say, RecentFilesMenu and some appropriate Text.

Here's an example of adding submenu items to a menu:
RecentFilesMenu.DropDownItems.Clear()

For x As Integer = 1 to 5
    Dim filename As String = String.Format("Filename{0}.txt", x)
    Dim newItem As New ToolStripMenuItem(String.Format("&{0} {1}", x, filename), Nothing, AddressOf RecentFile_Click)
    newItem.Tag = filename
    RecentFilesMenu.DropDownItems.Add(newItem)
Next

You'll, of course, need a method to handle the clicking of those menu items, so....
Private Sub RecentFile_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    If TypeOf sender Is ToolStripMenuItem Then
        Dim menuItem As ToolStripMenuItem = DirectCast(sender, ToolStripMenuItem)
        Dim filename As String = DirectCast(menuItem.Tag, String)
        ' Call your Load Document code here...
    End If
End Sub



A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


AnswerRe: recent files menu items Pin
Thomas Stockwell5-Sep-07 7:57
professionalThomas Stockwell5-Sep-07 7:57 
QuestionText file as code Pin
cstrader2324-Sep-07 9:10
cstrader2324-Sep-07 9:10 
AnswerRe: Text file as code Pin
Christian Graus4-Sep-07 9:24
protectorChristian Graus4-Sep-07 9:24 
AnswerRe: Text file as code Pin
Guffa4-Sep-07 10:02
Guffa4-Sep-07 10:02 
GeneralRe: Text file as code Pin
cstrader2324-Sep-07 10:15
cstrader2324-Sep-07 10:15 
Questionlink label problem Pin
bapu28894-Sep-07 9:02
bapu28894-Sep-07 9:02 
AnswerRe: link label problem Pin
Rizwan Bashir5-Sep-07 0:27
Rizwan Bashir5-Sep-07 0:27 
QuestionRe: link label problem Pin
bapu28895-Sep-07 8:15
bapu28895-Sep-07 8:15 
QuestionEdit A Subcontrol within a control Pin
Polymorpher4-Sep-07 9:02
Polymorpher4-Sep-07 9:02 
AnswerRe: Edit A Subcontrol within a control Pin
Dave Kreskowiak4-Sep-07 11:48
mveDave Kreskowiak4-Sep-07 11:48 
GeneralRe: Edit A Subcontrol within a control Pin
Polymorpher4-Sep-07 12:01
Polymorpher4-Sep-07 12:01 
GeneralRe: Edit A Subcontrol within a control Pin
Dave Kreskowiak4-Sep-07 15:38
mveDave Kreskowiak4-Sep-07 15:38 
QuestionPanel VScrollBar to also control's Datagrid's VScrollBar! Pin
jensenx4-Sep-07 7:22
jensenx4-Sep-07 7:22 
AnswerRe: Panel VScrollBar to also control's Datagrid's VScrollBar! Pin
Dave Kreskowiak5-Sep-07 6:10
mveDave Kreskowiak5-Sep-07 6:10 
GeneralRe: Panel VScrollBar to also control's Datagrid's VScrollBar! Pin
jensenx5-Sep-07 8:02
jensenx5-Sep-07 8:02 
GeneralRe: Panel VScrollBar to also control's Datagrid's VScrollBar! Pin
jensenx8-Sep-07 7:10
jensenx8-Sep-07 7:10 
QuestionGlobal variables Pin
A.D.Scott4-Sep-07 4:36
A.D.Scott4-Sep-07 4:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.