|
hi..
what do u mean with (Extract required information ) ??
anyway you can use IE control and use its dhtml object model to retrieve the document elements (all anchors for example if you're making a web spider)
|
|
|
|
|
hey guys, I am trying to get an idea of how I can write functions in C++ which can be used by visual basic 6 programmers.. anyone have any suggestions on where to get started? i have seen how dlls work looking at the introduction to com article, but that dll doesnt seem to work in vb, keeps giving me 'can't fint dll entry point' errors..
im also considering switching to c#, is it easier to write dlls in c# that to learn how to in c++?
if i could just have one example that would work in vb that would help so much.. anyone got any links?
thanks a bunch!
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
use ATL library to create a com component and register it..
from VB instanciate an object of this component..ATL has minimum dependencies...
if you want to call the function using (Declare) as you do with API functions..you need to export the C++ functions using a *.def file
LIBRARY LibName
EXPORTS <br />
MakeFile @1
or See this : http://www.codeguru.com/forum/showthread.php?s=&threadid=225783
|
|
|
|
|
dazinith wrote:
anyone have any suggestions on where to get started?
The best article that I found if you are strictly going from C++ to VB 6.0 is Calling a C++ DLL from Visual Basic - Introduction[^]
dazinith wrote:
im also considering switching to c#, is it easier to write dlls in c# that to learn how to in c++?
There are many options if you choose to work with .NET. Keep in mind that the .dll's that are created under .NET are assemblies, different than what what VC++ 6.0 would produce as a .dll even though they share the same file extension.
-Nick Parker
|
|
|
|
|
dazinith wrote:
still a newb.. cut me some slack
I'll take this is consideration when answering your questions:
dazinith wrote:
hey guys, I am trying to get an idea of how I can write functions in C++ which can be used by visual basic 6 programmers..
There are several ways: the simplest form is creating a COM DLL. Not too easy for a newbie, though.
dazinith wrote:
im also considering switching to c#, is it easier to write dlls in c# that to learn how to in c++?
Yes, much simpler: You only need to create a library project, create a class, and in project properties, you set "Register for COM interop" as true. Your DLL is now ready to go in VB 6. There are step-by-step tutorials about this on CP which show how to do this in greater detail, but this is the general procedure.
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
Hello:
I am dying here I cannot get my application in design mode all I get is a white page with this error in what did I do Please help cause I am new to vb
thanks
|
|
|
|
|
Are you inheriting your forms from anything (visual inheritance)?
I think this error can be caused in some cases by that.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Unknown wrote:
"I love long walks, especialy taken by those that annoy me."
Paraphrased from TMNT:
"Cricket? You have to know what a crumpet is to understand Cricket."
|
|
|
|
|
Are you using any ActiveX controls? I've had similar problems when I load up my projects on machines that don't have all the required ActiveX controls for my program. The consequence is that Visual Studio won't know how to display the control in design mode, and therefore you get a nice blank page with some useless message on it.
If you are using ActiveX controls, you can check under References in the Solution Explorer to see if you are missing any references on the machine. If this is the case, try reinstalling the ActiveX control and that might fix it for you.
If this is not the case, then perhaps you should post the error message you've been getting to give us all an idea of what's going on.
Hope this helps.
Daniel E. Blanchard
|
|
|
|
|
You can also get it if you try use an object that you havent declared as New.
eg:
Dim oMyObject as New ObjectType()
oMyObject.ObjectFunct = "some value"
OR
--
Dim oMyObject as ObjectType
oMyObject = New ObjectType()
oMyObject.ObjectFunct = "some value"
------------------------------------------
I beat the internet - the end guy is hard.
|
|
|
|
|
Thanks alot guys it turned out to be something that I did
I changed the folder name
|
|
|
|
|
are you put any usercontrol on tabcontrol? remove tabcontrol and try on form only
|
|
|
|
|
Public Function addplayer(ByVal player As String, ByVal score As Integer) As String()
Dim please() As String
Dim studx As CPlayer
studx = New CPlayer(player, score) 'passes player name and score to studx?
ReDim Preserve array(number) '<<< must be 'sets the size of the array
array(number) = studx 'passes playername and score to array?
please = buildarray()
Return please
End Function
#End Region
#Region "should build array"
Private Function buildarray() As String()
Dim j As Integer
Dim a(number - 1) As String
For j = 0 To number - 1
a(j) = array(j).ToString '<--- 'it blows up each time it gets to here
Next
Return a
End Function
this is in my Cplayer class
Public Overrides Function toString() As String
Dim strtemp As String
strtemp = Me.player & " : " & CStr(Me.score)
Return strtemp
End Function
can anybody help with this?
|
|
|
|
|
I wrote a macro for Word 2000:
//////////////////////
Sub Macro1()
ActiveDocument.Range(Start:=5000, End:=5000).PasteSpecial
End Sub
/////////////////////
It causes "Run-time error 4198". But if I reduce the number to the range of the 1st page, it works. Why this macro only runs when the spcified range is within the 1st page?
|
|
|
|
|
does anyone knows how to create n maintain a session using code behind? i understand that there are 2 ways to create a session - the normal way, which most article provide information and examples on (inline code).. while the 2nd way is the code behind.. i cant seem to find any article with examples to it..
anyone can help?
Laine
|
|
|
|
|
Hi I have a windows application with several textboxs for input.
I want my programme to be able to detect any changes in the textbox the user may make so that it will prompt the user to save the changes if they leave the form.
Does any know how to do this? Is there an isdirty method or function for this?
Any help is appreciated.
|
|
|
|
|
I usualy set a global var on the form that tracks a boolean value to signal if any of the data on the form has been changed. You can then set the value to true in any of the text boxes changed events. From here, any time you are going to close the form you check the dirty flag you have set up and see if it is true.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Unknown wrote:
"I love long walks, especialy taken by those that annoy me."
Paraphrased from TMNT:
"Cricket? You have to know what a crumpet is to understand Cricket."
|
|
|
|
|
Thanks. I have set an isdirty flag as a boolean. What i was looking for was an event for the textbox to detect the change which was the textchanged event. Everytime one of these events gets invoked, isdirty is set to true.
This works for me so thank you very much for your help.
|
|
|
|
|
I just installed .NET and find myself unable to run VB programs from the debugger. I wrote a little "Hello world" program and tried to run it, and the development environment crashed with an access violation. Anyone know how to fix a broken install? There does not seem to be any support from MS without paying hundreds of dollars.
|
|
|
|
|
Hi,
I want to write an app in VB.net that will go through lots of MP3 files and (quickly) detect the average sound level within the files, notifying someone should they be below a threshold.
I'm sure this must be possible using the .net framework, but would probably take me a week to code.
For this reason, I'm quite happy to use a com component.
Can anyone point me in the right direction?
Regards
Graham
|
|
|
|
|
glaidler wrote:
I want to write an app in VB.net that will go through lots of MP3 files and (quickly) detect the average sound level within the files, notifying someone should they be below a threshold.
I'm sure this must be possible using the .net framework, but would probably take me a week to code.
No need to work a week Just use my nBASS[^] lib, load each file in decode only mode and check the level. Now that is the easy (but ugly) way. Ideally you should write a DSP similar to a normalization DSP. There was questions about detecting silence on the BASS forums a while back that mite be usefull.
All in all, either way, it wont be quick.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Thanks for this.. Very impressed with the nBass assembly. I have loaded the relevant file into a stream object, but don't know how to analyse the level within the stream..
Should I be looking at GetData(buf, 0) method?
Graham
|
|
|
|
|
With Adodc3.Recordset
.MoveFirst
Do While Not .EOF
cPrice = DataGrid1.Columns("Price")
strProductCode = DataGrid1.Columns("ProductCode")
'updating the price table
Dim updateSQL As String
updateSQL = "Update Price set Price = " & cPrice & " " & _
" where PriceCode = '" & strPriceCode & "' " & _
" AND ProductCode = '" & strProductCode & "'"
Set RS = Conn.Execute(updateSQL)
.MoveNext
Loop
End With
the above is code i use to update a datagrid, the only column that is not locked in the datagrid is the price column and the only other piece of code that i think may affect it is a BeforeColUpdate function checking to see only numeric values are entered...is there anything i am doing wrong? it updates the prices fine in the database, is there any way i could catch it to degrade gracefully instead of crashing out? Thanks in advance!
|
|
|
|
|
I have one array with say 10 strings in it> i want to put a subset of these 10 strings that I will identify by name (but not by index) into another array.
So I want to say that if the origArray[i] is "a", or "m" or "l" then put this into my new array newArray() , otherwise keep looking into the old array till its exhausted..
Thanks
Appreciate your help,
ns
|
|
|
|
|
I would make the second array an ArrayList.
Dim origArray() As String = {"a", "b", "c", "d", "e", "f", "m", "z", "l"}
Dim secondArray As ArrayList = New ArrayList()
Dim i As Integer = 0
For i = 0 To (origArray.Length - 1)
Select Case origArray(i)
Case "a", "m", "l"
secondArray.Add(origArray(i).ToString)
Case Else
End Select
Next
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Unknown wrote:
"I love long walks, especialy taken by those that annoy me."
Paraphrased from TMNT:
"Cricket? You have to know what a crumpet is to understand Cricket."
|
|
|
|
|
Hello,
i want to change the mouse cursor (default to hand) when i am on the first column (only the first) of my datagrid.
i try this code and it don't work :
Private Sub DataGrid1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseMove
Dim hti As system.Windows.Forms.DataGrid.HitTestInfo
hti = DataGrid1.HitTest(e.X, e.Y)
If hti.Type = System.Windows.Forms.DataGrid.HitTestType.Cell Then
If hti.Column = 1 Then
DataGrid1.Cursor = System.Windows.Forms.Cursors.Hand
Cursor.Current = System.Windows.Forms.Cursors.Hand
End If
End If
End Sub
Thank you
|
|
|
|