Click here to Skip to main content
15,895,805 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
GeneralRe: The 'X' click event Pin
Verolix9-Nov-04 12:00
Verolix9-Nov-04 12:00 
GeneralRe: The 'X' click event Pin
Brad Fackrell10-Nov-04 3:46
Brad Fackrell10-Nov-04 3:46 
GeneralRe: The 'X' click event Pin
Dave Kreskowiak10-Nov-04 8:59
mveDave Kreskowiak10-Nov-04 8:59 
GeneralRe: The 'X' click event Pin
Brad Fackrell10-Nov-04 9:04
Brad Fackrell10-Nov-04 9:04 
GeneralRe: The 'X' click event Pin
Verolix10-Nov-04 10:05
Verolix10-Nov-04 10:05 
GeneralRe: The 'X' click event Pin
Brad Fackrell10-Nov-04 10:35
Brad Fackrell10-Nov-04 10:35 
QuestionDoes anyone know how to access a combobox item in dropdown mode? Pin
lildragon9-Nov-04 6:21
lildragon9-Nov-04 6:21 
GeneralUrgent help..Equivalent to Excel &quot;range&quot; in vb.net Pin
bnathvbdotnet9-Nov-04 5:18
bnathvbdotnet9-Nov-04 5:18 
Generalsystem.io.streamreader.readline Pin
Jayman9119-Nov-04 5:12
Jayman9119-Nov-04 5:12 
GeneralRe: system.io.streamreader.readline Pin
Tom John9-Nov-04 6:14
Tom John9-Nov-04 6:14 
GeneralRe: system.io.streamreader.readline Pin
Jayman9119-Nov-04 6:16
Jayman9119-Nov-04 6:16 
GeneralRe: system.io.streamreader.readline Pin
Fade (Amit BS)10-Nov-04 16:22
Fade (Amit BS)10-Nov-04 16:22 
GeneralRe: system.io.streamreader.readline Pin
Jayman91111-Nov-04 2:51
Jayman91111-Nov-04 2:51 
GeneralFonts used in rich text box Pin
johnjsm9-Nov-04 2:30
johnjsm9-Nov-04 2:30 
GeneralRe: Fonts used in rich text box Pin
Member 14977519-Nov-04 5:43
Member 14977519-Nov-04 5:43 

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.