|
I have VbNet2005 desktop application that also needs to deploy a dll created in C++. How do I add the dll to the VB deployment project so that it gets installed at the same time? Thanks.
|
|
|
|
|
If the DLL is a standard "C" style DLL that does not require registration (as opposed to a COM DLL) simply add it to your setup development project as a file and set the install folder to the application directory, or the WinSys folder.
If the DLL is a COM DLL then it presumably is already referenced by your NET project and the wizard should add it to the setup automatically. In this case you also need the Primary Interop Assembly (PIA) for the C++ DLL. Again, the setup wizard usually, but not always, adds everything else you need to register a COM DLL referenced by a NET project.
In either case, you must also pay attention to any additional dependency DLLs your C++ DLL may require. You can use the Dependency Walker utility to determine dependency DLLs. If these are all standard system DLLs you should not have to add any dependencies on Win2K or higher systems.
Finally, be certain to test your setup on a "clean" machine - i.e. one with a fresh OS install, but no development tools. Setups generally always "work" when tested on a dev machine, but may easily fail on a "field" target machine.
|
|
|
|
|
Thank you thank you. I followed your detailed instructions and I have installed it on a clean test machine successfully. Thank you for your valuable time and your level of detail.
DD
|
|
|
|
|
I am trying to create a internet browser that will go to a specific site on the net. I can get this to work but when I use the exe on another pc I get errors. (Mozctl.dll missing) I want to use Mozilla and not Internet Explorer. Also the width and height is set to those numbers for a specific reason. I have used this in the past to assist in spyware and virus removal.
Here is my code:
Private Sub Form_Load()
Form1.Width = 11750
Form1.Height = 8475
MozillaBrowser1.Width = 11750
MozillaBrowser1.Height = 8475
MozillaBrowser1.Left = 0
MozillaBrowser1.Top = 0
MozillaBrowser1.Navigate "http://www.helpmeremoveavirus.com"
End Sub
Private Sub Form_Resize()
MozillaBrowser1.Width = Form1.Width
MozillaBrowser1.Height = Form1.Height
End Sub
|
|
|
|
|
From the error message you've given, Mozilla is not installed on that machine, or the correct version is not installed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello,
I have used two datasets for two tables and i have to pass these two datasets into datagrid.. i am using sqlserver 2000
plz help in this regarding,
Thanks & Regards,
Nagalakshmi
-- modified at 6:16 Wednesday 21st December, 2005
|
|
|
|
|
OK. What's the problem?
Do you need to know how to bind a dataset to a datagrid? Are you having problems switching to the second dataset? Are you trying to bind both datasets to the datagrid at the same time?
Roy.
|
|
|
|
|
Firstly I am not clear why you are trying to use two datasets. In my experience a single dataset se globally for the application will meet all the needs and is of course much easier to administer and control. You can keep adding and removing tables from them as and when you need it.
That apart, if you want to just attach the datatable to the datagrid set it as the datasource of the grid.
On the other hand, if you want to extract data from both the datasets and present it in a single datagrid, then I am afraid you must first extract the required info from the datasets in to a single table and then datasource it to the grid.
Hope this helps.
Varadarajan R
|
|
|
|
|
What kind of database are you using?
1.SQL Server
2.MS Access
Paul
|
|
|
|
|
Hi all,
I'm using MSXML to load and parse serveral xml files (obvious ). All works fine while the encoding of the file is utf-8 but when i load a file that has the following header
?xml version="1.0" encoding="UTF-16"?
i get an error telling me that this encoding is not supported.
How can I load files encoded in utf-16?
Thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
I have a project with a number of classes from which I've created a dll.
Within this project is a usercontrol object.
When I reference the dll created from the project I can't handle any events that I've created myself. I can handle the leave event for example.
I presume that the event is being raised because if I try and handle it using code inside the initial project containing the usercontrol the evtn is raised and handled.
The usercontrol is defined as friend and withevents and all the events are public that I want to handle.
The events are passed through three objects. For example, usercontrol1 has a child object1 and object1 has a child object2.
usercontrol-->object1-->object2
The initial event is raised in object2, handled by object1 which raises its own event, this is handled by usercontrol which then raises its own event and it is this final event, triggered by the first event, that I want to handle.
I seem to figure it will be something to do how I idnetify things (public/private/protected/friend) as it works inside and not outside the project. I just don't know where.
Any help would be gratefully appreciated.
An optimist's glass is half full.
A pesimist's glass is half empty.
An engineer goes and gets the right size glass.
-- modified at 18:43 Tuesday 20th December, 2005
I've found the solution at:
http://www.vbip.com/books/1861004915/chapter_4915_09.asp
|
|
|
|
|
I've found the solution at:
http://www.vbip.com/books/1861004915/chapter_4915_09.asp
An optimist's glass is half full.
A pesimist's glass is half empty.
An engineer goes and gets the right size glass.
|
|
|
|
|
I am trying to create an editable listview, where user can edit the data from a specific cell. I wish the put a textbox visible on the specific cell's position, so that the listview is seems to be editable by passing and retrieving the text from the textbox. Is there any way to find out the position of the particular cell in listview?
Thanks a lot
|
|
|
|
|
Here is a routine I've used as part of a subclassed listview that displays a textbox over a specific cell in the listview. The signature of the method indicates the row and column coordinates.
Private subItemSelected As Integer = 0
Private subItemText As String
Private subItemSelected As Integer = 0
Private WithEvents editBox As New TextBox
Private strOriginalText As String
Public Sub ShowTextBox(ByVal lvi As ListViewItem, ByVal subitem As Integer)
Dim localLI As ListViewItem
Dim nStart As Integer = X
For Each localLI In Me.Items
If localLI Is lvi Then
'Found the item they passed in.
li = localLI
Dim liBounds As Rectangle = li.GetBounds(ItemBoundsPortion.Entire)
If subitem >= 0 And subitem <= Me.Columns.Count - 1 Then
'Their subitem is valid.
Dim i As Integer
Dim spos As Integer = liBounds.X
For i = 0 To Me.Columns.Count - 1
If i = subitem Then
'We found the subitem they indicated and now have the bounds.
subItemSelected = i
Dim epos As Integer = spos + Me.Columns(subitem).Width
subItemText = li.SubItems(subitem).Text
editBox.Size = New System.Drawing.Size(epos - spos, li.Bounds.Bottom - li.Bounds.Top)
editBox.Location = New System.Drawing.Point(spos, li.Bounds.Y)
editBox.Show()
strOriginalText = subItemText.Trim
editBox.Text = subItemText.Trim
editBox.SelectAll()
editBox.Focus()
Exit For
End If
spos += Me.Columns(i).Width
Next
End If
End If
Next
End Sub
|
|
|
|
|
Thanks for your solution... however i still have to pass the index of the selected subitem into your routine... and i haven't found the way to get the index of the subitem...
Can you tell me how to get it?
Thanks you very much
-- modified at 2:37 Wednesday 21st December, 2005
|
|
|
|
|
Oh yes, I should have included that.
In the MouseDown event you have the coordinates of the mouse which you can use to determine which column the user clicked in. When I subclassed the listview, I added this:
Private _subitemClicked As Integer
Private li As ListViewItem
Private oldLI As ListViewItem
Private strOriginalText As String
Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs)
Dim X As Integer = 0
Dim Y As Integer = 0
oldLI = li
li = Me.GetItemAt(e.X, e.Y)
X = e.X
Y = e.Y
'Determine the subitem clicked.
If Not li Is Nothing Then
Dim nStart As Integer = X
Dim liBounds As Rectangle = li.GetBounds(ItemBoundsPortion.Entire)
Dim i As Integer
Dim spos As Integer = liBounds.X
For i = 0 To Me.Columns.Count - 1
If nStart >= spos And nStart < (spos + Me.Columns(i).Width) Then
'We found the subitem they indicated.
_subitemClicked = i
Exit For
End If
spos += Me.Columns(i).Width
Next
End If
'Now call any custom code the developer may have added behind the form.
MyBase.OnMouseDown(e)
End Sub
I then added a property which returned the subitem clicked:
<browsable(false), description("gets="" the="" zero-based="" index="" of="" column="" clicked."),="" _
="" category("appearance")=""> _
Public ReadOnly Property SubitemClicked() As Integer
Get
Return _subitemClicked
End Get
End Property
So when you need to display a textbox you can use the Click event:
Private Sub lvwLeft_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lvwLeft.Click
Me.lvwLeft.ShowTextBox(Me.lvwLeft.SelectedItems(0), Me.lvwLeft.SubitemClicked)
End Sub
Now you need a way to transfer the contents of the textbox back to the listview cell. First add this line to the ShowTextBox method right after the editBox.Show() line:
strOriginalText = subItemText.Trim
Add these lines globally to your subclassed listview:
Private bolSkipUpdate As Boolean = False
Public Event ListviewItemChanged(ByVal item As ListViewItem, ByVal subitem As Integer)
Now add these routines:
Private Sub editBox_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles editBox.KeyUp
If e.KeyCode = Keys.Enter Or e.KeyCode = Keys.Tab Then
li.SubItems(subItemSelected).Text = editBox.Text
editBox.Hide()
End If
If e.KeyCode = Keys.Escape Then
bolSkipUpdate = True
editBox.Hide()
bolSkipUpdate = False
End If
End Sub
Private Sub editBox_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles editBox.LostFocus
If Not bolSkipUpdate Then
oldLI.SubItems(subItemSelected).Text = editBox.Text
If strOriginalText <> editBox.Text Then
RaiseEvent ListviewItemChanged(oldLI, subItemSelected)
End If
editBox.Hide()
End If
End Sub
Now, whenever the contents of the textbox are changed and committed to the listview, the ListviewItemChanged event will get raised so you can write custom code to handle it.
Ideally, you want to subclass the listview and include all this code. Otherwise you'll have to duplicate it for every instance of your listview.
Dean
|
|
|
|
|
Thank you so much.. you have solved my problems.. =)
|
|
|
|
|
Dear all.
I m using dll file in my webpage using ASP.now I want my dll to generate a html file and store it into client machine using this web page.My problem is that generated file is currently saved at server.I want it must store this html file on everyone's machine who is using this webpage.Hope so you will understand my problem.I have devloped my dll file in vb.net.
help me all the way.
Urgently required!!
Uttam kumar
trickyuk001@rediffmail.com
try to be the best... whereever you go,
|
|
|
|
|
This question is better asked in the ASP.NET Forum.
But, since the file system of a client machine is off-limits to your code, you can only send the file to the client. They'll actually have to pick a spot to save the file themselves, just like downloading any other file, like a .ZIP.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dear Code project
I am a student in software engineering in under graduate.I want to do a mini project in network exam.for that i used your unolib.net for file transfer and message pass.But i get an earror as "remote ip not reachable".please give me the solution.with out this solution i can't do my project.So i request to all members of Code project to help me please
faithfully
Sivakumar
|
|
|
|
|
|
nandhusivakumar wrote: So i request to all members of Code project to help me please
All 2.5 million of them? That's a lot of help!
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
You best help is going to come from the person who wrote the article your refering too. We, meaning all of us at The Code Project, didn't write this library. An individual did. So ask him/her...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'll clearly tell my exact requirement
1. I have a standard exe project.
2. I also have a compiled chm file.
3. What i want is in my standard exe project whenever a user presses F1 i need to show him the chm file inside this form itself (Inside the application).
4. Or suggest me is there any others ways that i can do this work.
|
|
|
|
|