|
Is there a way to get the source code from axWebbrowser.
I have a web site that get a cookie for me where i go to it. I want to be able to get the source code.
I'm have tried WebRequest but this doesn't send the cookie it need to log on the their web site.
The source code i get from the WebRequest is to log on to the web site.
I want the source code of a page that i have to send a cookie to log on to see the right source code.
Can any one Help
Tdaigs
|
|
|
|
|
I need help here. Usually in the old VB6 world, I used the standard ado connectivity to connect to to my Oracle Databases, with Oracle Client installed on my box, system DSN entries and a TNS Names File.
I am now attempting to connect to my Oracle DB through VB.Net and the System.Data.OracleClient because I need to take advantage of a stored proc that returns a cursor. All examples of connection strings for the OracleCleint.Connection are akin to "Data Source=Oracle8i;Integrated Security=yes" or "Data Source=Oracle8i;User Id=userid;Password=pwd". This is not helping me at all. On the server I need to connect to there are 3 Oracle 9i servers running. Each with its own sid. I have tried things like "Data Source=sidname;User id=userid;Password=pwd" and get TNS Listener errors.
Should I be using something more like "Data Source=serverip,sidname;User id=userid;Password=pwd"? Any help would be appreciated.
Steve
|
|
|
|
|
Hello yall!!
Can anyone tell me why this API call works in vb 6.0 but not in vb .net
this is the functions:
Private Declare Function GetDeviceGammaRamp Lib "gdi32" (ByVal hdc As Long, lpv As Integer) As Boolean
Private Declare Function SetDeviceGammaRamp Lib "gdi32" (ByVal hdc As Long, lpv As Integer) As Boolean
this functions returns true if scucessful and false if not
in vb 6.0 it returns true but in vb .net it returns false
by the way the functions is used to set and get the screen gamma/brightness
SuperDude84
|
|
|
|
|
You might want to post the code your used in VB.NET, so we can see what your doing...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i give you the code:
Private Declare Function GetDeviceGammaRamp Lib "gdi32" (ByVal hdc As Long, lpv As Integer) As Boolean
Private Declare Function SetDeviceGammaRamp Lib "gdi32" (ByVal hdc As Long, lpv As Integer) As Boolean
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Integer, Source As Long, ByVal Length As Long)
Dim SavedRamp(255, 2) As Integer
public REG_KEY as string = ""
Private Function CheckReg() As Boolean
If REG_KEY = "password" Then
CheckReg = True
Else
CheckReg = False
End If
End Function
Private Function Lng2Int(Value As Long) As Integer
CopyMemory Lng2Int, Value, 2
End Function
Public Function GetGamma() As Double
If CheckReg = False Then Exit Function
If GetDeviceGammaRamp(GetDC(0), SavedRamp(0, 0)) = False Then Exit Function
Dim rgb(2) As Double
Dim I As Integer
Dim J As Integer
On Error Resume Next
rgb(0) = 1.01
rgb(1) = 1.01
rgb(2) = 1.01
For I = 0 To 2
Dim Csum As Double
Dim Ccount As Integer
Csum = 0
Ccount = 0
For J = 0 To 255
If J <> 0 And SavedRamp(J, I) <> 0 And SavedRamp(J, I) <> 65536 Then
Dim A As Double
Dim B As Double
Dim C As Double
B = (J Mod 256) / 256.01
A = SavedRamp(J, I) / 65536.01
C = Log(A) / Log(B)
Csum = Csum + C
Ccount = Ccount + 1
End If
Next J
rgb(I) = Csum / Ccount
Next I
GetGamma = rgb(0)
End Function
'Gamma is between 0 and 2
Public Function SetGamma(Gamma As Double) As Boolean
If CheckReg = False Then Exit Function
Dim Ramp(255, 2) As Integer
Dim nVal As Integer
Dim I As Integer
For I = 0 To 255
nVal = Lng2Int((((I + 1) / 256.01) ^ Gamma) * 65535 + 0.5)
Ramp(I, 0) = nVal
Ramp(I, 1) = nVal
Ramp(I, 2) = nVal
Next I
SetGamma = SetDeviceGammaRamp(GetDC(0), Ramp(0, 0))
End Function
Try this out in vb 6.0 and vb.net
|
|
|
|
|
An integer in .NET is 32 bits
If you want to get a 16 bit number use Int16...
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
I have tryed to change all of the integers to int16 but it didn't help!
i have one solution that i have been using and that is to create a dll using vb 6.0 and referance it in vb.net
that solution works great but only om my computer. on other computers i get a error, something about dll is now registered
i have tried using "c:\WINDOWS\system32\regsvr32.exe" but that dosen't work either??
help please?
|
|
|
|
|
Hi, I have som dynamic data that I want to send via Email with CDO.Message but I dont know
how I get the Loop inside the msg.HTMLBody.
This is the code I need to run to create the dynamic part, how to I get it inside the msg,HTMLBody?
sTotal = 0
For Each Key in dictCart
aParameters = GetItemParameters(Key)
%>
<%= aParameters(1) %><%= dictCart(Key) %><%= strCurrency%> <%= aParameters(2) %><%= strCurrency%> <%= FormatNumber(dictCart(Key) * CSng(aParameters(2)),2) %>
<%
sTotal = sTotal + (dictCart(Key) * CSng(aParameters(2)))
Next
'Calculate shipping - you might want to pull this out into a function if your shipping
' calculations are more complicated then ours.
If sTotal <> 0 Then
If strCurrency = "SEK" Then
sShipping = (rsShipping.Fields.Item("FieldShippingSEK").Value)
Else IF strCurrency = "USD" Then
sShipping = (rsShipping.Fields.Item("FieldShippingUSD").Value)
Else
sShipping = (rsShipping.Fields.Item("FieldShippingEUR").Value)
End IF
End IF
Else
sShipping = 0
End If
sTotal = sTotal + sShipping
%>
Shipping (<%=strCountry%>):<%= strCurrency%> <%= FormatNumber(sShipping,2) %>TOTAL:<%= strCurrency%> <%= FormatNumber(sTotal,2) %>
Best Regards
Martin
|
|
|
|
|
Hello All
how can i connect to remote sql server FROM VB6
This is my sample connections strings
Dim rs As New ADODB.Recordset
Dim cn As New ADODB.Connection
Dim str As String
On Error GoTo HAND
cn.ConnectionTimeout = 30
Dim ConnString As String
Method 1
--------
cn.Open "Trusted_Connection=yes;driver=SQL Server;server=20.19.69.13;database=XXXX;User Id=YYYYY;Password=ZZZZ"
str = "Provider=SQLOLEDB.1;Server=23.19.69.13;Database=xxxx;Uid=yyyy;Pwd=zzzz"
cn.Open str
Method 2
--------
cn.Open "Provider=MS Remote;Data Source=XXXX;Remote Server=http://www.mysite.com;USER ID=XXX;PASSWORD=YYYY"
|
|
|
|
|
Try to check the connection from here[^] and let me know whether it is working not.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I have recently written a program in Visual Basic 6.0 that use ADO to talk to both a SQL Server database and also an MS Access 2000 database. They both use the same code to talk to the database.
When run on the development machine (XP Pro) the program can talk to the SQL Server database and MS Access database with ease.
When run on a virginal XP Pro machine the program can talk to the SQL Server database - SELECT, UPDATE, INSERT and DELETE all work fine. However, when trying to do the same on the MS Access database only SELECT and DELETE works? INSERT and UPDATE cause the program to freeze. No errors are thrown up, the program just locks up!
I have checked the folder / file permissions of the MS Access database to ensure I have the correct priviledges (I do) but cannot resolve the problem?!
I am a bit desperate here as the program needs to be delivered in the next week and this was the final stage of packaging!
Many thanks in advance!
- Pete -
|
|
|
|
|
Pete Belcher wrote:
Visual Basic 6.0 that use ADO to talk to both a SQL Server database and also an MS Access 2000 database
Please post the connection string between VB -> SQL and VB -> Ms access.
Pete Belcher wrote:
when trying to do the same on the MS Access database only SELECT and DELETE works? INSERT and UPDATE cause the program to freeze. No errors are thrown up, the program just locks up
Please post the code that have a problem in your application. One morething, do you use VB6 or VB.Net?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Found out it was the actual PC that was failing!!
Install MS Access to see if a driver etc was missing but MS Access was unable to open any tables within ANY database. You could open an Access database and see the tables but whenever you tried to open the table an error box appeared with just "Unknown" written in it!!
Guessing whatever it was that caused Access to fail also caused my application to fail!! Tried to reinstall Windows but the Keyboard no longer works etc... Something very odd is happening!!
Setting up another new machine from scratch to see if it will work!
Thanks for your suggestions though!
- Pete -
|
|
|
|
|
Hi
i use this code to retrieve my image field from sql server
(my file isn't picture !!!)
***********
Dim MyData() As Byte
MyData = Ds.Tables(mytable).Rows(0).Item(myfield) 'For Example
Dim K As Long
K = UBound(MyData)
Dim fs As New FileStream("c:\mkh.xml", FileMode.OpenOrCreate, FileAccess.Write) 'in this line get error
fs.Write(MyData, 0, K)
fs.Close()
fs = Nothing
Ds = Nothing
************
but it doesn't work and give me this error in ASP.Net(With Vb)
<<access to="" the="" path="" "c:\mkh.xml"="" is="" denied.="">>
i get this code from microsoft msdn and alot of furoms !!!!
then why doesn't work??
MkhProgrammer
|
|
|
|
|
In my opinion, this my be came from the security setting of your folder. Try to go to windows explorer and right click on the folder that contain file that you want to access the information (in this case your file in the root drive C:\ ) then click on the Properties of the context menu. Then click on the Security tab then click Add group. In the Select computer, user, or group dialog box click Advance button and click Find now button. Then select ASPNET from the list then click OK button. Then give the ASPNET group with Read and Write permission.
Note: If the SECURITY tab did not display in the the properties dialog box, go to Start menu -> Control panel -> Tools -> Folder Option -> View tab , in the Advance setting list make sure that option Use simeple file sharing (Recommend) is cleared.
Try to do it and let me know if it woork or not... Good luck
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Thanks The man from SCN-CO
I do that and it work !!!!
but i can't do this in any computer that has this acount ?!!!
always we should do this ??
thanks again
best regards
MkhProgrammer
|
|
|
|
|
Does the other computer has the .Net framework install on it? Or did you create the setup project for your application? I got this idea from this book[^] while I read the chapter of working with ASP.NET.
MKhayatan wrote:
but i can't do this in any computer that has this acount ?!!!
always we should do this ??
I'm not sure too with this area, I have only one machine that have the problem and I write an application for testing purpose only. I did not deploy it to any other machine.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
hi,i have to develop a Speech Recognition system with VB.Net.
I would like to know is there any free software download available for speech recognition?
Beside that, may i know what the difference between Micosoft Speech SDK and Microsoft Agent?
|
|
|
|
|
I am trying to make one cell in a DataGrid bold based on it's value (i.e. If a customer's number of orders is greater than ten, bold the orders field for that customer). I read somewhere that the key to doing this is through the DataGridColumnStyles but I can't seem to find anything there for this. Does anybody know how this gets done?
You think you know everything
I'll show you what everyone else can see
It's too late to change anything
What's here is all that we need to be!
|
|
|
|
|
Private Sub myDataGrid_ItemDataBound(ByVal sender As Object, ByVal e As DataGridItemEventArgs) Handles myDataGrid.ItemDataBound
If CType(e.Item.Cells(2).Text, Integer) > 10 Then
e.Item.Cells(2).ForeColor = Color.Red
End If
End Sub
You can put in something like this.
A datagrid is zero-based, so this(cells(2)) would be the third column from the left.
Have Fun!
|
|
|
|
|
Hye..how to write the code to check hardware status whether is function properly or not?
|
|
|
|
|
Well, this question is for both VB and C# programers
This is a chapter from C# help that best explains my problem:
Invoking an event: Once a class has declared an event, it can treat that event just like a field of the indicated delegate type. The field will either be null, if no client has hooked up a delegate to the event, or else it refers to a delegate that should be called when the event is invoked. Thus, invoking an event is generally done by first checking for null and then calling the event.
if (Changed != null)
Changed(this, e);
The question is how to make a runtime check in VB (just like in this C# example) to see if any event handler is hooked on that event.
|
|
|
|
|
Actually, it's not a problem at all. VB handles event a little differnetly than C# does. You COULD do the equivilent of C#'s code by doing something like this:
If Not Changed Is Nothing Then
RaiseEvent Changed(Me, e)
End If
But, you don't have to do this at all. When the RaiseEvent statement is executed, it automatically checks to see if there are any subscribers. If there are, then the event is raised with each subscriber, if not, nothing happens.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks David for your reply
If Not Changed Is Nothing Then
RaiseEvent Changed(Me, e)
End If
First line doesn't work cos you can't call 'Changed' directly (in if...then).
You can only write: RaiseEvent Changed (Me,e)
But as You explained to me, I don't need if...then, and that is enough for me .
Thanks Davor
|
|
|
|
|
I am trying to extract word information from vb app.
when I select a particular file like ms word document
I want to get all or a part of text and put it in DB or
another text to display. The thing is in order to load
word document in object I need to open MS word.
If only one file is selected, no problem. However,
I want to manage multiple files( say 100 ) to do the
same thing. In this case I have to open/close word 100 times,
right? I am afraid it will slow the process and I don't
want to see ms word open/close a hundred of times.
I know if I pay the money, there is a couple of solution.
I am not ready to spend my money unless there is nothing
I can do about.
anyone has a solution to this?
|
|
|
|