|
Right click on the toolbar and select 'choose items'. I'm running 2.0, but I'm sure it's always been there.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
ok, I found one that seems usable
There doesn't seem to be a .NET 1.1 version of a web browser, but there is a Microsoft Web Browser COM component that I can add that does what I want.
Thanks for your help Christian
Jason
|
|
|
|
|
Is there anyone in the Southern Maryland area that could teach me how to write Visual Basic.
You can contact me at vincemaier@hotmail.com or vincemaier@metrocast.net
Thanks
Vince
-- moved at 20:19 Sunday 17th September, 2006
|
|
|
|
|
Are you offering to pay someone ? Do you want to learn VB.NET or VB6 ? What do you hope to achieve ?
Really, what you should do is buy some books, work through them, ask questions here and try to join a local user group.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Using SQl Server 2000 Reporting Services ??
hi
i am Using SQl Server 2000 Reporting Services with:
1)- windows 2003 server
2)- VS 2003 VB(asp.net)
3) sql 2000 server
what the VB code that i can use it to display and print report within web app
by using VB(asp.net) code ??
|
|
|
|
|
Not sure what you mean. but if our trying to call a report in the ASP.NET page, then try loading the report link itself.
|
|
|
|
|
how to get an image from folder in computer
|
|
|
|
|
What do you want to do ? Load an image ? Image.FromFile will do that.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello,
I have to display a document into a form. I can do this for rtf and txt files, but not for other files e.g. doc.
The user wants to be able to view a small picture of the file itself on the form. So I used the richtextbox tool. This is easy to do when the document is a picture, but if the document is a excel file of a word file than I am not sure how to do this.
What l have done is have a richtextbox tool on the form and assign the document to it. This only works for rtf and txt. How would I do this for word or excel.
The document will also need to be printed. The user would like to be able to click on the picture and be able to print this. I am not sure how to do this in visual basic. Is it possible to open up crystal forms and print from there?
This is the code below:
<br />
'Get the file path of the document<br />
Private Sub ultbtnDocument_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ultbtnDocument.Click<br />
<br />
ofdGetDocument.InitialDirectory = "d:\\"<br />
ofdGetDocument.RestoreDirectory = True<br />
ofdGetDocument.Filter = "Text Files (*.txt)|*.txt|Rich Text Format (*.rft)|*.rtf)|" & " All Files (*.*)|*.*"<br />
<br />
If (ofdGetDocument.ShowDialog() = DialogResult.OK) Then<br />
Dim fileName As String<br />
fileName = ofdGetDocument.FileName<br />
If (fileName.Length <> 0) Then<br />
Try<br />
ReadFileInfo(fileName)<br />
Catch ex As Exception<br />
MessageBox.Show(String.Format("{0} is not " & "a valid image file", fileName), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)<br />
End Try<br />
End If<br />
End If<br />
End Sub<br />
<br />
'Create a file stream and load the richtextbox with the file to display to the user<br />
Private Sub ReadFileInfo(ByVal fileName As String)<br />
Try<br />
Dim fs As FileStream<br />
Dim fInfo As FileInfo<br />
Dim fText As String<br />
<br />
fs = New FileStream(fileName, FileMode.Open, FileAccess.Read)<br />
fInfo = New FileInfo(fileName)<br />
fText = fInfo.Extension.ToUpper()<br />
<br />
If (fText.Equals(".RFT")) Then<br />
rtxtDocument.LoadFile(fs, RichTextBoxStreamType.RichText)<br />
ElseIf (fText.Equals(".TXT")) Then<br />
rtxtDocument.LoadFile(fs, RichTextBoxStreamType.PlainText)<br />
End If<br />
Catch ex As Exception<br />
MessageBox.Show(ex.Message & ex.StackTrace)<br />
End Try<br />
End Sub<br />
Is there a way to convert the excel, word, or other document to a jpeg format. That would be much easier. Moreover, the user would like to click on the document once it is displayed in the form, and open a large form with the actual size of the document. Is this possible?
Many thanks in advance,
Steve
-- modified at 8:36 Sunday 17th September, 2006
|
|
|
|
|
To load an Office document, you need to control Office in your application, using .NET or COM. There's no way to render an Office doc as a jpeg that I know of.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Try to load your document on a WebBrowser control WebBrowser1.Navigate("C:\New Microsoft Word.doc").
Sakis
|
|
|
|
|
Will this code populate my combobox with all item in the datatable column if place in form_load
Dim mytable As New DataTable()<br />
mytable = myset.Tables("doc_reg")<br />
cbodoctor.DataSource = mytable<br />
cbodoctor.DisplayMember = "ColumnName"<br />
cbodoctor.ValueMember = "ColumnName" <br />
myfend_liang & _mubashir thanks
Fikunmi Feyijin
Hicad Systems
Nigeria
|
|
|
|
|
You need to call the DataBind method also.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
I have created an Shared Add In application for MS Office. In that
I am trying to remove an Button, which is added to standard tool bar in MS word.
I am using following code to add an button in MS Word. Which written on OnStartUpComplete event.
Dim WithEvents MyButton As CommandBarButton
Dim oCommandBars As CommandBars
Dim oStandardBar As CommandBar
On Error Resume Next
oCommandBars = applicationObject.CommandBars
If oCommandBars Is Nothing Then
oCommandBars = applicationObject.ActiveExplorer.CommandBars
End If
oStandardBar = oCommandBars.Item("Standard")
If oStandardBar Is Nothing Then
oStandardBar = oCommandBars.Item("Database")
End If
If MyButton Is Nothing Then
MyButton= oStandardBar.Controls.Add(1)
With MyButton
.Caption = "My Button"
.Style = MsoButtonStyle.msoButtonCaption
.OnAction = "!<mycomaddin.connect>"
.Visible = True
End With
End If
I have written following code to remove button
On OnBeginShutDown event
On Error Resume Next
MyButton.Delete()
MyButton= Nothing
but its not working
Anyone can help me please.
Thanks & Regards
AMOL
|
|
|
|
|
I made a VB.NET Control used in VB6 Application... I checked the Register Object fo Com Interop in the project properties. after compiling placed it in a testing machine tried registering it and gives an error "The DLLRegisterServer entry point was not found. File Cannot be registered." so i placed this code inside the control guessing this would somehow solve the problem...
-------------------------------------------------------------------------------------
Public Class ComRegistration
#Region "COM Registration "
' This function is called when registered
<comregisterfunction()> _
Private Shared Sub ComRegister(ByVal t As Type)
Dim keyName As String = "CLSID\" & t.GUID.ToString("B")
Dim key As RegistryKey = Registry.ClassesRoot.OpenSubKey(keyName, True)
key.CreateSubKey("Control").Close()
Dim subkey As RegistryKey = key.CreateSubKey("MiscStatus")
subkey.SetValue("", "131457")
subkey = key.CreateSubKey("TypeLib")
Dim libid As Guid = Marshal.GetTypeLibGuidForAssembly(t.Assembly)
subkey.SetValue("", libid.ToString("B"))
subkey = key.CreateSubKey("Version")
Dim ver As Version = t.Assembly.GetName().Version
Dim version As String = String.Format("{0}.{1}", ver.Major, ver.Minor)
If version = "0.0" Then version = "1.0"
subkey.SetValue("", version)
End Sub
' This is called when unregistering
<comunregisterfunction()> _
Private Shared Sub ComUnregister(ByVal t As Type)
' Delete entire CLSID\{clsid} subtree
Dim keyName As String = "CLSID\" + t.GUID.ToString("B")
Registry.ClassesRoot.DeleteSubKeyTree(keyName)
End Sub
#End Region
------------------------------------------------------------------------------------
after compiling the project and registering it in a testing machine still doesnt work...
Can anyone help me? I might have missed something...
|
|
|
|
|
You don't need that code in your component. You can't use REGSVR32 to register a COM exposed .NET component. You have to use REGASM[^] for that.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Ok now thats a big help... thanks...
|
|
|
|
|
Hi all,
I am developing a shopping cart with VS.net 2005, but have some problems about cookies.
my project workflow is, once i click an "Add to cart" button, the images of selected product are put into the shopping cart page, and then when i click "Buy Now" button, if the user has already loggin, all images' urls are saved into the SQL database, otherwise, the user will be reminded to login.
I am trying to save all images' urls into cookies and put into a dataset first, because i need to show them in the shopping cart page without putting urls into database, but i am not sure whether i can save several image urls from different panels at one time, and also is the cookies solution the best one, so can anyone give me help??
Thanks a lot!
cheers
Jackie Ding
Jackie Ding
|
|
|
|
|
You can store any text you like in cookies. You should be aware of two things when you are using cookies in this way, though:
:: There is a size limit for all the cookies from your site. The limit varies somewhat depending on the browser, but a typical value is 4 kb. If you try to store more than this, the browser just stops accepting more cookies.
:: All the cookies that you set will be sent in every request to the server. This increases the traffic to the server and the response time for every page.
I would suggest that you store the information in a separate table in the database until the user gets to the checkout counter.
---
b { font-weight: normal; }
|
|
|
|
|
Hi Guffa,
Thank you for your reply...It's really helpful!!
but if i store information in a separate table, shall i build relationship between it and other tables, like user table? or just keep it seperate all the time, and once the user logs in, the information from the seperate table will be put into the "orders" table, which is related to the "user" table???
i am looking forward your reply, thanks again!!!!
cheers
Jackie Ding
|
|
|
|
|
What you store in the table is up to you. If you want to tie it to the user table, you need to know who the user is, i.e. the user has to be logged in.
---
b { font-weight: normal; }
|
|
|
|
|
ok....
i think i'd better keep it seperate!!;P
thanks a lot
cheers
Jackie Ding
|
|
|
|
|
Hi,
i want to merge 2 cells in excel when i am Exporting data from datagrid to cells. how can i do that .please send me a reply.
i am using code like this to export data
Dim XlApp As Excel.Application
Dim XlBk As Excel.Workbook
Dim XlSht As Excel.Worksheet
Dim r As Excel.Range
XlApp = CreateObject("Excel.Application")
XlBk = XlApp.Workbooks.Add
XlSht = XlBk.Worksheets(1)
XlApp.Visible = True
XlApp.Cells(1, 2).Font.Name = "Arial"
XlApp.Cells(1,2).Font.Bold = True
XlApp.Cells(1, 2).Font.Size = 9
XlApp.Cells(1, 2).value = "Mode Of Shipment"
r = XlApp.Cells(1, 2)
r.ColumnWidth = "Mode Of Shipment".ToString.Length * 1.5
XlApp.Cells(2, 2).Font.Name = "Arial"
XlApp.Cells(2, 2).Font.Bold = False
XlApp.Cells(2, 2).Font.Size = 9
XlApp.Cells(2, 2).value = DtGenReport.Rows(0)("Item").
if the heading is large i want to merge 2 cells.
Thanks and Rgards
Anu
|
|
|
|
|
hi,
try using this statement
objExcel.Range(a1,b1).Merge
hope this works.
Nitin...
|
|
|
|
|
Why won't this code clear all of the data from the ORDERS table?
I must be missing something obvious!
thank you!
Me.DataSet1.ORDERS.Clear()
Me.DataSet1.ORDERS.AcceptChanges()
|
|
|
|