Hello!
I am quite new to programming and hope this forum will help me with a case i have.
I am using VB.net Visual Studio 2010 framework 4.0.
My question is this:
I am trying to make a word 2007 application which opens a document made in Visual Studio with lots of textboxes and comboboxes which is related to a access database and saves and retrieve data from the database. I wonder if its possible to make a tabcontrol with some pages and make richtextboxes inside the tabpages and make this visible in the document. The richtextboxes will be related to fields in the database. I cant find the TabControl in the toolbox so i am afraid this is not a part of the GUI of a word app!?
I have tried writing something like this but with no result:
Private sub myTabs()
Dim tabControl1 as New TabControl()
Dim tabPageA as New TabPage()
tabPage1.Text = "A"
Dim tabPageB as New TabPage()
tabPage1.Text = "B"
tabControl1.Controls.AddRange(New Control() {tabPageA, tabPageB}
tabControl1.Visible = true
tabControl1.BringToFront()
tabControl1.Location = New System.Drawing.Point(100, 100)
tabControl1.Show()
tabControl.SelectedIndex = 1
end sub
But the tabControl will not appear in the word document. Why?
I have also tried to set the location to defined points in the document like bookmarks or panels like this because thats what i want (make the tabs visible on different defined locations in the document) but i am not sure if it will work:
tabControl.Location = Bookmarks("tab")
Can someone help me with this? nothing in the world would make mo more happier right now
Have a nice weekend
I am quite new to programming and hope this forum will help me with a case i have.
I am using VB.net Visual Studio 2010 framework 4.0.
My question is this:
I am trying to make a word 2007 application which opens a document made in Visual Studio with lots of textboxes and comboboxes which is related to a access database and saves and retrieve data from the database. I wonder if its possible to make a tabcontrol with some pages and make richtextboxes inside the tabpages and make this visible in the document. The richtextboxes will be related to fields in the database. I cant find the TabControl in the toolbox so i am afraid this is not a part of the GUI of a word app!?
I have tried writing something like this but with no result:
Private sub myTabs()
Dim tabControl1 as New TabControl()
Dim tabPageA as New TabPage()
tabPage1.Text = "A"
Dim tabPageB as New TabPage()
tabPage1.Text = "B"
tabControl1.Controls.AddRange(New Control() {tabPageA, tabPageB}
tabControl1.Visible = true
tabControl1.BringToFront()
tabControl1.Location = New System.Drawing.Point(100, 100)
tabControl1.Show()
tabControl.SelectedIndex = 1
end sub
But the tabControl will not appear in the word document. Why?
I have also tried to set the location to defined points in the document like bookmarks or panels like this because thats what i want (make the tabs visible on different defined locations in the document) but i am not sure if it will work:
tabControl.Location = Bookmarks("tab")
Can someone help me with this? nothing in the world would make mo more happier right now
Have a nice weekend