|
This code shows a web browser window with CodeProject in it:
dim url as string = "http://www.codeproject.com/"
System.Diagnostics.Process.Start(url)
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I want to use 2 identical databases(with different data). I use a database component. I want to know how I can change the connection's path (change form 1 database to the other) so that I don't need to change all the adapters' connections.
|
|
|
|
|
<br />
DB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DBPath + ";Mode=ReadWrite|Share Deny None;Persist Security Info=False"<br />
DB.RecordSource = SQL_QUERY<br />
DB.Refresh<br />
I'm using an ADO control to hook up to my DB, but I presume its quite similar with a DAO DB. Notice DBPath is a variable used to supply the path to the DB you want to switch to.
|
|
|
|
|
that smiley face has bloody appeared, NOTE it should be "Share Deny None; Persist...".
Alan.
|
|
|
|
|
Hello Everyone,
I was wondering if anyone can tell me how to close a main form from the second form. I know ME.Close() will close the current form. I actually want to exit the solution from the second form.
Thanks In Advance,
Tom
|
|
|
|
|
Hello
A simple answer is the form.unload command
Hope it helps!
didijoe
|
|
|
|
|
How can i rotate text in a label 90 degree( or label rotate 90 degree for horizontal text)?
MkhProgrammer
|
|
|
|
|
I'd like to know if ther is anybody who knows just how should I go about implementing my owb web browser application using winsokets. I want to create an application that would just connect to a web server. Then make a request for a web page that is located on the server and based upon the response from the server to make another request for another page.
I suppose I need to se winsokets on the port 80 but I don't know how to make the requests and get the responses and how to maintain the same connection throughout the whole process.
Miky
|
|
|
|
|
|
Hello everyone.
I've got a very small problem, for most of you this could be very stupid, but hey I'm new in the programming world.
I need to create a small program using VB 6.0 but I have a small problem with it.
Here it goes,
I have a form with a command button, when clicked is gonna open an inputbox asking for a value, but I need to say that if the value is less than 45 please display a word, if it's equal or greater than 45 but less than 60 display a different word, if it's equal or greater than 60 but less than 70 display another word and if it's equal or greater than 70 but less than 80 display other word.
I've got something like this in the code:
dim weight as single
weight = inputBox("Please type weight...")
If weight < 45 then
label.Caption = "reject"
Else
If weight >= 45 ... HERE IS WHERE I HAVE THE PROBLEM, i DON'T KNOW HOW TO WRITE THIS STATEMENT WITH the two values
label.Caption = "Small"
Else
If weigh ...the same ...
label.caption = "medium"
Else
(...)
End if
End if
End if
Please help me!!! thanks very much for any help
ASP.NET capo
|
|
|
|
|
If weight >= 45 And weight<60 Then
'Value between 44 & 60
End if
|
|
|
|
|
Actually to get a value between 45 and 60 you need to write:
If weight >= 45 And weight <= 60 Then
'Value between 44 & 60
End If
If you leave out the = in the second '<= 60' you only get the values between 45 and 59.
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."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Don't you guys just live for the simple questions?
|
|
|
|
|
Thanks you guys
you people are very kind,
Thanks, that's one part of an assignment that is due today. I'm very happy thanks to you, I owe u heaps!
But now I need more help PLEASE; it's from the same exercise. I need to make a loop until the value 0 is input, then print the total number of items weighted.
for that i created a variable called counter as int.
dim counter as integer
Counter = 0
do until weight = 0
Counter = counter + 1
Loop
weight = inputbox(...)
(...code you guys gave me goes here)
Loop
End If
(...)
When I try to run it I get a runtime error '6', Overflow, but I have no idea what I'm doing wrong, please give a hand with that
THANKS AGAIN!
Cheers,
IJ
ASP.NET capo
|
|
|
|
|
I have the following code:
My question is: how to pass a element od array to procedure to validate?
Private Sub btnStart_Click()
Dim Age(0 To 5) As String '6 element array
Dim Counter As Integer
For Counter = 0 To 5
Age(Counter) = InputBox("Records entered:" & Counter & " Please Enter Age :")
Call checkAge(Age())
Next
End Sub
Sub checkAge(Age())
If Age < 17 Then
MsgBox "You should not drive yet"
Else
MsgBox "Eligible for driving"
End If
End Sub
|
|
|
|
|
Looking in the help index I find usefull code to read excel data into a dataset. Only I have one question about this subject and I hope someone has had this problem as well...
Connecting and receiving data is done really quick using the code below. It's only that excel data can only be interpreted if values are doubles. Any other format can't be recognized and will give value DBNull...
Does anybody know how to solve this problem?
Thnx,
.Netplayer
============================================================
Dim DS As System.Data.DataSet
Dim MyCommand As System.Data.OleDb.OleDbDataAdapter
Dim MyConnection As System.Data.OleDb.OleDbConnection
MyConnection = New System.Data.OleDb.OleDbConnection( _
"provider=Microsoft.Jet.OLEDB.4.0; " & _
"data source=C:\myData.XLS; " & _
"Extended Properties=Excel 8.0;")
' Select the data from Sheet1 of the workbook.
MyCommand = New System.Data.OleDb.OleDbDataAdapter( _
"select * from [Sheet1$]", MyConnection)
DS = New System.Data.DataSet()
MyCommand.Fill(DS)
MyConnection.Close()
=================================================================
|
|
|
|
|
We are using an ASPX file to create a webform. We are creating an interface to generate a graph. This interface has a timescale with a drop down list of annually, quarterly, and monthly. It also has a time period listbox where one to many years can be selected from 1995 to 2003. There is also a choice of indicator that the figures are based on say for instance hospital admissions of respiratory disease. These indicators are drawn from a database. As well as this there is a listbox of geographical divisions for each type of organisation. These organisations are District Health boards, Regional Councils, and Territorial local Authorities. Only one type of organisation can be picked but out of each type one to many say regional councils can be selected. These lists are connected to a database . Then there is a button titled Graph the data which is to graph the data. Line graphs and bar graphs are wanted. All figures to create the graph are from a database. They are drawn from the an Microsoft Access database. Is there a way to do this through ASPX? If not what VB.net code would we have to write? We have a deadline coming soon. Any feedback would be greatly appreciated.
|
|
|
|
|
I want to lock the Access database in my project (VB.6) . but i don't know anything about this . please help me .
|
|
|
|
|
shoma bayad baraye in kar az access estefade konid.
dar access ha dar menue toos bayad security ro entekhab konid. vali dao in no' bank ra nemishnasad va bayad az ado va az getengine 4 estefade konid!!!!
M.Khayatan
MkhProgrammer
|
|
|
|
|
Is there a way to return the file pointer back to the beginning of the line you are currently reading? For instance, if you're reading a text file char by char using the Read method, then you want to back up to the beginning of that line, is there a way to do that?
Or how about answering this stupid question: Is there a way to read in a set of characters from a file and stop once you hit a delimiter (i.e. a space)?
|
|
|
|
|
I guess Split might helps you...
Is it?
Regards,
NetPointer
|
|
|
|
|
I have a simple VB.net app that connects to an access Database.
The database has one table ("Chums").
In that table there are 2 columns("Name" & "Sound")
There are three records:
1 "Steve" & "Hello.wav"
2 "Fred" & "Goodbye.wav"
3 "Dave" & "Seeya.wav"
I want to be able to track the user's movement through the grid, and play the corresponding sound based on the selected record. The sound playing I have a handle on - can someone help me with a code snippet to navigate a DataGrid?
Thanks.
Steve
|
|
|
|
|
I know VB doubles are 4bits while VC doubles are 8. I'm passing a double from vb to a vc dll, how do I convert the data back and forth?
|
|
|
|
|
I don't know where you saw that VB doubles are 4 bit but they're not. They're exactly the same as VC doubles...
From MSDN Visual Basic reference:
Double data type
A data type that holds double-precision floating-point numbers as 64-bit numbers in the range -1.79769313486231E308 to -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values. The number sign (#) type-declaration character represents the Double in Visual Basic.
look up "type conversion functions"
Beware the chickens, for in their silence, they plot...
Two fish are in a tank. One says to the other: "I'll man the guns, you drive!"
Life is too short to be taken seriously.
-- Oscar Wilde
|
|
|
|
|
From what I understand the structure byte alignments for vb vs vc are 4 bytes and 8 bytes respectively. VB dynamically decides the byte alignment which is usually 4 but it can change it to optimize class structures.
The reason I'm asking this is I'm passing a structure with a double array inside it from VB to a VC dll. When I change the value of the double array inside the dll, it doesn't change the vb value. I'm passing by reference.
Here is my vb code:
<br />
Public Type assetvar<br />
cutoff_prin_bal(400) As Double<br />
End Type<br />
<br />
Public Type collateralvar<br />
subissue(100) As Integer<br />
asset As assetvar<br />
End Type<br />
<br />
Public Declare Function test Lib "PSAEngine.dll" Alias "_test@8" _<br />
(ByVal j As Integer, ByRef collateral As collateralvar) As Double<br />
The vc dll is:
<br />
struct assetvar<br />
{<br />
double cutoff_prin_bal[400];<br />
};<br />
<br />
struct collateralvar<br />
{<br />
int subissue[100];<br />
struct assetvar asset;<br />
};<br />
<br />
__declspec( dllexport ) double test(int j, struct collateralvar *collateral);<br />
Here is what I am doing inside the dll function:
<br />
__declspec( dllexport ) double test(int j, struct collateralvar *collateral)<br />
{<br />
collateral->asset.cutoff_prin_bal[j]=14;<br />
<br />
return(1);<br />
}<br />
from VB I'm calling the dll this way:
<br />
dim x as double<br />
collateral.asset.cutoff_prin_bal(0) = 423149.74<br />
x = test(0, collateral)<br />
I still get 423149.74 instead of 14.0. Therefore they are not the same thing.
|
|
|
|