Click here to Skip to main content
16,005,437 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Messenger users online/offline? Pin
[DK]KiloDunse10-Nov-04 15:20
[DK]KiloDunse10-Nov-04 15:20 
GeneralRe: Messenger users online/offline? Pin
Fade (Amit BS)10-Nov-04 15:41
Fade (Amit BS)10-Nov-04 15:41 
GeneralRe: Messenger users online/offline? Pin
[DK]KiloDunse10-Nov-04 15:48
[DK]KiloDunse10-Nov-04 15:48 
Generalconnecting two datatables within a dataset and forming relation HELP Pin
cavall10-Nov-04 11:27
cavall10-Nov-04 11:27 
Generalcrystal reports Pin
kixville10-Nov-04 9:48
kixville10-Nov-04 9:48 
GeneralCreate login form Pin
axing10-Nov-04 5:54
axing10-Nov-04 5:54 
GeneralRe: Create login form Pin
Mekong River10-Nov-04 17:01
Mekong River10-Nov-04 17:01 
GeneralTabControl Pin
Jeeva Jose10-Nov-04 5:38
Jeeva Jose10-Nov-04 5:38 
GeneralRe: TabControl Pin
Fade (Amit BS)10-Nov-04 15:59
Fade (Amit BS)10-Nov-04 15:59 
GeneralLoad Data Interchange File to dataset Pin
RDoes10-Nov-04 5:19
RDoes10-Nov-04 5:19 
GeneralBlank Message Box Pin
John Collis10-Nov-04 5:17
John Collis10-Nov-04 5:17 
GeneralRe: Blank Message Box Pin
Dave Kreskowiak10-Nov-04 9:04
mveDave Kreskowiak10-Nov-04 9:04 
GeneralRe: Blank Message Box Pin
John Collis10-Nov-04 21:19
John Collis10-Nov-04 21:19 
GeneralSort icon in listview (DotNet) Pin
SelvaRavi9-Nov-04 19:22
SelvaRavi9-Nov-04 19:22 
GeneralImport Data from Access to SQL Server Pin
Amitux9-Nov-04 18:39
Amitux9-Nov-04 18:39 
GeneralRe: Import Data from Access to SQL Server Pin
Dave Kreskowiak10-Nov-04 3:05
mveDave Kreskowiak10-Nov-04 3:05 
GeneralTAPI in VB.NET Pin
pht99999-Nov-04 14:56
pht99999-Nov-04 14:56 
GeneralRe: TAPI in VB.NET Pin
Dave Kreskowiak10-Nov-04 3:10
mveDave Kreskowiak10-Nov-04 3:10 
Generalsharing folder Pin
Paps29-Nov-04 14:18
Paps29-Nov-04 14:18 
GeneralRe: sharing folder Pin
Dave Kreskowiak10-Nov-04 3:03
mveDave Kreskowiak10-Nov-04 3:03 
GeneralRe: sharing folder Pin
Mekong River10-Nov-04 3:54
Mekong River10-Nov-04 3:54 
GeneralRe: sharing folder Pin
Paps210-Nov-04 16:34
Paps210-Nov-04 16:34 
GeneralMDI Forms and Child Forms Pin
ConfusedStudent9-Nov-04 13:49
ConfusedStudent9-Nov-04 13:49 
I would appreciate it if some one could help me. I don't know how to write the code to save or save as in my forms. Here is the code that I have so far. Note that my parent form has file(new,open, save, save as, close) on it. I have already done the new code and I have been searching through the help files of .Net for 2 hours now with no help what so ever. Also please note that opion strict is set to on.
Public Class frmMDI
Inherits System.Windows.Forms.Form
Dim counter As Integer = 1

Private Sub frmMDI_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Dim j As Integer
'For j = 1 To 3
' Dim frmDocForm As New frmChild
' frmDocForm.MdiParent = Me
' frmDocForm.Show()
'Next
End Sub

Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
If e.Button.Tag Is "new" Then
NewFile()
ElseIf e.Button.Tag Is "open" Then

ElseIf e.Button.Tag Is "save" Then

ElseIf e.Button.Tag Is "bold" Then
Dim frmActiveChild As frmChild = Me.ActiveMdiChild
If (Not frmActiveChild Is Nothing) Then
'process the child form – save, close, whatever
frmActiveChild.txtDoc.Font = New Font(Me.Font, FontStyle.Bold)

End If
End If
End Sub
#Region "Menu Code"
#Region "Window Code"
Private Sub mnuCascade_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuCascade.Click
Me.LayoutMdi(MdiLayout.Cascade)
End Sub


Private Sub mnuHorizontal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuHorizontal.Click
Me.LayoutMdi(MdiLayout.TileHorizontal)
End Sub

Private Sub mnuVertical_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuVertical.Click
Me.LayoutMdi(MdiLayout.TileVertical)
End Sub
#End Region

#Region "File Code"

Private Sub mnuNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuNew.Click
NewFile()
End Sub

Private Sub mnuOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuOpen.Click

End Sub

<b> Private Sub mnuSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuSave.Click

End Sub

Private Sub mnuSaveAs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuSaveAs.Click

End Sub</b>
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click

End Sub
#End Region
#End Region

#Region "Procedures"
Private Sub NewFile()
Dim frmDocForm As New frmChild
frmDocForm.MdiParent = Me
frmDocForm.isDirty = False
frmDocForm.newDoc = True
frmDocForm.docName = "Document" & CStr(counter)
counter += 1
frmDocForm.Text = frmDocForm.docName
frmDocForm.Show()
End Sub
#End Region


this is the code in my child form.

Public Class frmChild
Inherits System.Windows.Forms.Form
'---------------------------------------------------
'Public attributes (instance variables)
'isDirty: Set True if document needs to be saved
Public isDirty As Boolean
'newDoc: Set True if form was just created using New
'(no file on disk yet)
Public newDoc As Boolean
'docName: Set to filename of document (no path info)
Public docName As String
'pathName: Set to path (directory) where file saved
'(does not include filename)
Public pathName As String
End Class
GeneralRe: MDI Forms and Child Forms Pin
Fade (Amit BS)10-Nov-04 16:15
Fade (Amit BS)10-Nov-04 16:15 
GeneralThe 'X' click event Pin
Brad Fackrell9-Nov-04 11:33
Brad Fackrell9-Nov-04 11:33 

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.