|
Hope that component will release soon. Dave, how about the method to read the content of PDF and transfer it to hidden RichTextBox control (RichTextBox control could keep some original text formatted). After the process is finish, you can transfer the content of RichTextBox control to word application. Is this way could solve this problem? Have you use this method before?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I haven't read anything from a .PDF files because I've never had the need to. You could use a RichTextBox control, but you would have to read the .PDF and supply the code to parse it and reformat it in RTF markup. The RichTextBox control knows nothing of the .PDF format, so loading it into a RichTextBox control would do much of anything to solve the problem.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
HI all!
When designing a control, i embedded some pictures into the project.
But when i try to access them i get no joy!
the thing is the code i use works fine on just a standard project, but when i try it in the control, no stream is returned!
The namespace im using is correct, and ive even tried putting the resourses in both the usercontrol project and the test project!
Heres the code i use for standard projects:
Public Function GetEmbeddedImage(ByVal AppForm As Object, ByVal strImageName As String) As Bitmap<br />
Dim Exec_Assem As [Assembly] = AppForm.GetType.Assembly.GetEntryAssembly<br />
Dim myNameSpace As String = Exec_Assem.GetName.Name.ToString<br />
Dim PicStream As Stream<br />
Dim BMP As Bitmap<br />
<br />
PicStream = Exec_Assem.GetManifestResourceStream(myNameSpace + "." + strImageName)<br />
BMP = New Bitmap(PicStream)<br />
GetEmbeddedImage = BMP.Clone()<br />
<br />
BMP.Dispose()<br />
PicStream.Close()<br />
<br />
<br />
End Function<br />
<br />
the only differnce in code i use when calling from the usercontrol is :
GetEntryAssembly
Instead of which i use
GetExecuting Assembly
as this returns the user control assembly instead of the test project assembly.
Thanks for your help!
|
|
|
|
|
We can Add IExplorer component in Vb 6.0 ... How to Add The browser Control Of Internet Explorer in VB.Net..
|
|
|
|
|
On the toolbox, right-click anywhere and select "Customize toolbox"
Scroll down to reach "Microsoft Web Browser"
Check it and click Ok
A new browser control is added to the toolbox...just drag and drop it on your form and start working
|
|
|
|
|
Right click on the the toolbox, choose Add/Remove Items, go to COM Components Tab, and search for Microsoft Internet Browser (Path: ....\system32\shdocvw.dll)
|
|
|
|
|
Can someone please tell me the difference between these two statements
1 Public DataForm12 As New Form1
And
2 Dim DataForm12 As Form1
The first one is declared in a startup module, but when I try to access any of its controls from another form in the same app, I get no response. For instance: if I try to set a control on DataForm12 to enabled=false nothing happens.
The second one I just do not know about
Thanks
|
|
|
|
|
Public DataForm12 As New Form1
Declares the public member DataForm12 with the type Form1 and (because of New ) initializes it with a reference to a newly created Form1 object.
Dim DataForm12 As Form1
This DataForm12 however is valid in the code block in which it has been declared. Because there is no New operator this variable is initialized with Nothing . If you don't need two instances of Form1 you don't need the second variable anyway. Supposed you have got this code:
Module MyModule
Public DataForm12 As New Form1
End Module
Then you can access the member DataForm12 anywhere else in your project because a modul behaves like a static class.
MyModule.DataForm12.Show()
Best regards
Dennis
|
|
|
|
|
Hi Dennis
Thanks to you I finally saw what my problem was: I had not only declared the form in the module(Public), but I had declared it a couple other times(Dim) in other areas of the app also.
Thanks
|
|
|
|
|
Hi,
I'm sending mail using System.Web.Mail namespace. My email body is come from a rich text box (rtf property of richtextbox).
I also set the email body format to MailFormat.Html
But when sending mail successfully, the email body display all the format tag, not html format, like this
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}} \viewkind4\uc1\pard\b\f0\fs17 alo\b0 \par \par \ul\i ola\ulnone\i0\par }
How could my body have html format?
Please help me.
Thanks.
|
|
|
|
|
You have to convert the RTF formatted text to HTML yourself, wheather by your own code, or using a 3rd party component. There is nothing in the .NET Base Class Library (BCL) that will do this for you. Most commercial 3rd party components for this conversion aren't cheap either. But, you might want to check out the OpenSource sites, like SourceForge. I found DocFrac[^] there. I haven't used it, but it might do the job for you.
After you convert the RTF to HTML, all you have to do is assign the HTML string to the Body property...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Have you found something that will convert this RTF code into HTML for you? I've been searching for free libraries or utilities for a while, but there all lacking something. What have you done about your issue?
|
|
|
|
|
Hello
I am OK with VB6 language, can not understand VC or much else unless is simply explained.
What i am trying to do is record the sound received from my Hauppauge WinTV USB2 device to a file. I need to start recording to the WAV file and at a set time stop recording, allowing the WAV file to be played like any other WAV or audio file.
I have tried experimenting with code like...
'MCI command to save the WAV file<br />
i = mciSendString("save capture " & CommonDialog1.FileName, 0&, 0, 0)
... but no WAV file is created
My current success is...
Private Sub Command1_Click()<br />
'Start Recording<br />
With MMControl1<br />
.DeviceType = "WaveAudio"<br />
.FileName = "F:\New.wav"<br />
.RecordMode = mciRecordOverwrite<br />
.UpdateInterval = 10<br />
.Command = "Open"<br />
.Command = "Record"<br />
End With<br />
<br />
'End Recording<br />
End Sub<br />
<br />
Private Sub Command2_Click()<br />
MMControl1.Command = "Save"<br />
MMControl1.Command = "Close"<br />
End Sub
... but this records any sound, where i only want the sound that the Hauppauge device receives.
Can any one help, hope theres enough information to understand what im trying to do?
|
|
|
|
|
Hello,
I want to know, how can i enable/disable internet access to certain systems on the network ?
Is there any class/... for this ?
Regards,
Asim
|
|
|
|
|
No there isn't. There is nothing simple to doing this either. This is exactly what Firewall/Proxy servers are for. In order to control this, you'll need a Proxy server that will sit between the clients and the Internet. On each client, you'll configure the web browser to use the proxy server. When the browser requests a page, the request will go to the proxy and the proxy will go out and get the page and return it to the client. The nice part about this is, the proxy server can ask for a username and password to allow access to the Internet.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I just set up ADSL router to share the internet connection. I think this function work as the part of the hardware too. My ADSL router, has built in command that could set the date/time and an IP address of some system to access/block the internet.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I am able to fill a dataset and fill the datagrid.
The issue that I am having is that I only want certain columns in the data grid. If there is 10 columns in a database, how can I display 3 of them and only them three in a datagrid? Any suggestions or examples is greatly appreciated. Thanks.
Beginner in ASP.Net and VB.Net
|
|
|
|
|
Dim oConn As New OleDbConnection
Dim oCmd As New OleDbCommand
Some thing like this:
Dim oDS As New DataSet
Dim oDSNew As New DataSet
Dim oDA As New OleDbDataAdapter(oCmd)
Dim oCol As New DataColumn
Dim oCol2 As New DataColumn
Dim oCol3 As New DataColumn
Dim oRows As DataRow
Dim oTable As New DataTable
oConn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=HealthandSafety;Data Source=."
oConn.Open()
oCmd.CommandType = CommandType.Text
oCmd.Connection = oConn
oCmd.CommandText = "SELECT * FROM HSDocumentFloorZone"
oDA.Fill(oDS)
With oDS.Tables(0)
oCol = .Columns(1)
oCol2 = .Columns(3)
oCol3 = .Columns(5)
End With
oDS.Tables(0).Columns.Clear()
oDS.Clear()
oDS.Dispose()
With oTable
.Columns.Add(oCol)
.Columns.Add(oCol2)
.Columns.Add(oCol3)
End With
oDSNew.Tables.Add(oTable)
With DataGrid1
.DataSource = oDSNew
End With
Many Thanks
Harry
|
|
|
|
|
Manually add a mapping to those specific columns by adding columnstyles to your datagrid. The columnstyles are accesible through the TableStyle property at design-time.
Note: you will also have to map the TableStyle to your table
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
|
|
|
|
|
What would be the mapping name? The database is Address and the table is ADDDAT. The combo box only displays none and I tried typing in Address.ADDDAT but nothing happened. Do you know where I can find some examples of this? Thanks.
Beginner in ASP.Net and VB.Net
|
|
|
|
|
Let's say I have a table named "user" and columns "name","sex", "address" in that table, and I want to display only name and sex in the datagrid.
Therefore, the mapping name for the tablestyle would be "user", and I'll create two columnstyles with the mapping name "name" and "sex".
HTH.
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
|
|
|
|
|
What I have done was mapped the table style to Address and mapped the columns to First, Last, and Work (using First, Last, and Work). This all seems to make sense to me but nothing seems to happen when I load the form. Is there something that I might be missing? Do I have to programatically fill the datagrid using the new tablestyle?
Thanks.
Beginner in ASP.Net and VB.Net
|
|
|
|
|
That's weird.
Well this is how I do it.
In Design View, I drag the datagrid onto the form. Then on the property grid, click on the ellipse for the TableStyle property. A dialog box will appear. Click Add to add a tablestyle, set the Mapping Name property to your tablename, then click on the ellipse for the gridcolumnstyle property. Another dialog box will appear. Click on Add to add a columnstyle, then set the mapping name to the column you want to show. Repeat this last bit for each column.
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
|
|
|
|
|
So there is nothing to do programatically? I have done the above steps and rechecked them but nothing still happens. Would you mind me zipping up my project and emailing it too you to see if you see the problem? I'm sure there is something that I am doing wrong.
Thanks.
Beginner in ASP.Net and VB.Net
|
|
|
|
|
Sure, go ahead.
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
|
|
|
|