|
VB 2005, I am using the fso object to delete files and move files to other locations.
|
|
|
|
|
Hi,
I create VB.NET applications/utilities for the company I work for and I was wondering what is the policy for using the VB Controls from Code Project in these VB.NET applications/utilities?
I have been looking around the Code Project web site and cannot find anything written specifically about use of code/controls for commercial use, guess I have not been to the right place.
I have seen some good controls here and I do not want to reinvent the wheel, but I need to know if I can use them or require permission or what not.
Thanks,
Jamie
|
|
|
|
|
The general idea is that you can use them, but the sensible approach is to ask the authors of the controls you want to use.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How would you contact the Author, add a message in the Discussion at the bottom of the Article? Is there a way to contact them directly?
Jamie Parsons
|
|
|
|
|
Hello all,
I have an app that requires a certain active X plug in be installed. During testing, if i uninstall the active x control, I am presented with a rather nasty error. I have trapped other error messages with...
<br />
'Unhandled exception error<br />
Dim WithEvents ap As AppDomain<br />
<br />
<br />
Private Sub ap_UnhandledException(ByVal sender As Object, ByVal e As System.UnhandledExceptionEventArgs) Handles ap.UnhandledException<br />
<br />
Try<br />
WriteErrorLog(e.ToString)<br />
Catch ex As Exception<br />
WriteErrorLog(ex.ToString)<br />
End Try<br />
<br />
End Sub<br />
How can i capture this one too?
|
|
|
|
|
remove the variable and the 'handles' from the subroutine.
AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf ap_UnhandledException
|
|
|
|
|
I am doing a game of Blackjack. I have only one problem to figure out.
I cannot get the dealers cards to add up if it is more than two cards.
i am giving two cards to the dealer on the on the first deal. I can get the dealers total hear, but i can't get the totals if the dealer needs more than two cards. I am using arrays for the cards and card values plus piture boxes. I also have an array for the players and dealers last four cards. The players four extra cards i have on a click event. It is just the dealers totals i cannot work out.
Regards
Zeldacat
|
|
|
|
|
You're going to have to give us more information about what is going wrong in your code. Are you getting an error? What code are you using right now?
|
|
|
|
|
Are you storing the value of the dealers cards in an array? If so, is it large enough to hold as many cards as he has? Some example code may help get you an answer.
|
|
|
|
|
Thank you all. Sorry, I do have problem describing details about things.
I have changed the arrays around a bit, so i can now do the total scores.
Once again thank you.
Regards
Zeldacat
|
|
|
|
|
Just as an FYI rather than making a sub-post it's more helpful if you modify your message title with [SOLVED] behind it.
|
|
|
|
|
I haved used a VLOOKUP to select the field i require, however i need to select all fields that appear in this column and put them in a table. VLOOKUP will only selects the first cell in the column where this data appears. How can i get it to loop round all of them?
|
|
|
|
|
Hi all
Im trying to connect to a mysql db on a remote host using vb.net (windows ) but I get the following error message
Unable to connect to any of the specified mysql hosts
Here is the code im using to connect to the local and remote servers
Please note that this code works fine on the local
Dim mydatabase As String = "gdfgdfg"
strServername = "dfgdfg"
pword = "dfgd"
Dim userid As String = "dfg_31"
Dim MySQLConnectionString = "Server=strServername;" & _
"Database=myDatabase;" & _
"Uid=userid;" & _
"Pwd=pword;" & _
"Connect Timeout=30;"
Or
Dim dbConn As New MySqlConnection("Server= '" & strServername & "'; Database=payperclick; User ID='" & userid & "' ; Password='" & pword & "';")
Dim dbConn As New MySqlConnection(MySQLConnectionString)
Try
dbConn.Open()
dbConnect = dbConn
Catch ex As MySqlException
MsgBox(ex.Number & vbCrLf & ex.Message & vbCrLf & ex.Source)
Please note that this code works fine on my local pc
im a junior developer at a company called securemail in south africa
|
|
|
|
|
Is "Remote Connection" enabled on the host in question? If not you won't be able to connect to it.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
hi,
thanx for the response.
im not sure of whether remote access is enabled on the host but, ive got colleagues who can connecting to the host using php.
does this mean that remote access is enabled
im a junior developer at a company called securemail in south africa
|
|
|
|
|
Hi,
I have the following code, and my application falls into the if statement and exits but i cant find why. Can anyone tell me the solution.
--------------
Private Sub TimerInitialize_Timer()
'On the simulator, use the TmpMdb data base, that contains the new elemets.
'On the server pass "" to use the default data base (MDB).
TimerInitialize.Enabled = False
If InitSystem() <> True Then
'Can't start
Application.Exit()
End If
'#If afServiceEnabled Then
' NTServiceCtrl.StopService
'#End If
End Sub
--------------
the InitSystem code is the following.
---------------------------------------
Public Function InitSystem() As Boolean
'-------------------------------------------------------------------
' Initialize and start the system. Called from the main Load_Form.
' Inputs: none ' Outputs: none
'-------------------------------------------------------------------
Dim DnList As Collection
Dim MyDn 'must be variant to enumerate collection items
Dim ch As Long
'The following causes: [32021] TAPI properties not supported in this build:
'Dim myLineApp As Long 'myLineApp = LineGroup1.AppHandle(1)
'Open data base
myDataAccess = New DatabaseAccess(Application.StartupPath)
'Setup path to the MediaPath repository location
SysOptions.sMsgRepositoryPath = Environ(CTIDIR_TOKEN)
If SysOptions.sMsgRepositoryPath = "" Then
'No set in the environment, use default
SysOptions.sMsgRepositoryPath = CTIDIR_DEFAULT
End If
' Set the voice directory path
MainFrame.VoiceDirectory = SysOptions.sMsgRepositoryPath & VAP_FILE_DIR
' Start the engine
MainFrame.StartSystem(False)
'On Error GoTo Err_InitSystem
DnList = GetDnListToMonitor(APP_NAME)
BugMessage("Number of entries: " & CStr(DnList.Count))
If DnList.Count > 0 Then
'Found some valid channels
iMaxChannel = 0
iMinChannel = 1000
For Each MyDn In DnList
ch = DirectoryNumToTapiDeviceID(0, MyDn)
If ch = -1 Then
BugMessage("Unknown TAPI device name: " & MyDn)
Else
'Channels can be added dynamically but only after StartSystem.
'Also, you must add 1 to the raw TAPI device ID for AddChannel.
ch = ch + 1 'Must add one
MainLineGroup.AddChannel(ch)
If ch > iMaxChannel Then
iMaxChannel = ch
End If
If ch < iMinChannel Then
iMinChannel = ch
End If
BugMessage("Added ch:" & ch & " for " & MyDn)
End If
Next MyDn
'Allocate per channel data for all channels
ReDim CallData(0 To iMaxChannel + 1)
Else
'No chanels to monitor, it's not gonna work...
BugMessage("InitSystem: No channels to monitor")
InitSystem = False
Exit Function
End If
' Initialize global System Options from MediaPath data base
mdbGetSysOptions(SysOptions)
InitSystem = True
Exit Function
Err_InitSystem:
If Err.Number = 32302 Then 'System already running
BugMessage("InitSystem: system already started")
Err.Clear()
Resume Next
End If
BugMessage("InitSystem: [" & Err.Number & "] " & Err.Description)
Err.Clear()
InitSystem = False
End Function
-- modified at 10:13 Monday 5th November, 2007
|
|
|
|
|
Have you tried setting a breakpoint and walking through the program? You should be able to tell while walking through it where the program gets a value that you weren't expecting.
|
|
|
|
|
i did,
" TimerInitialize.Enabled = False
If InitSystem() <> True Then
'Can't start
Application.Exit()
End If" this is where it exits.
|
|
|
|
|
Right...but that means that InitSystem is returning a true value, and I'm guessing you were not expecting a true value.... unless that is your problem right there. Did you mean to say If InitSystem() = False????
If not, debug into the InitSystem and see why it is returning true.
|
|
|
|
|
My Visual Basic 6.0 program allows me at home to Write to and Read from Random Access files and, and to produce in the end a paper sheet with results. In fact I entry the raw scores of a psychological test and after 'treatment' the program comes up with the results. I would like to make a website which I can approach from any computer to achieve the same. Is that possible and what means should I use?
Paul
|
|
|
|
|
|
DigiOz Multimedia wrote: I had a long discussion about this topic on a different forum/website. Take a look at this thread:
http://www.programmingtalk.com/showthread.php?t=28166&highlight=automate+website[^]
Also, the following post may help:
http://www.codeproject.com/script/comments/forums.asp?msg=2218907&forumid=1646&mode=all&userid=1587313#xx2218907xx[^]
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
Hi Pete,
Thank you for your fast reply. Really in the way computers should work
Allthough I learned a lot from it, it did not solve my problem.
Maybe I stated my problem in the wrong way.
Let me put it this way then:
Is it possible to upload a "normal" Visual Basic 6.0 program into the server of my webhost and make it approachable from my home computerso that I can entry data into that program and make it print results on my home printer?
I am ok with VB but a newbie considering web things
Thanks,
Paul
The Netherlands
Paul
|
|
|
|
|
PaulMiedema wrote: Is it possible to upload a "normal" Visual Basic 6.0 program into the server of my webhost and make it approachable from my home computerso that I can entry data into that program and make it print results on my home printer?
As far as I know, this will not be possible, at least not in the way you envisage...
VB6 requires a lot of run-time files, and there maybe other dependencies in your program too, which will need to be registered on every client that will access your program.
You will likely not get any assistance in trying to do this app with VB6 since it is now obsolete, so its best you shift over to some other language like VB.Net or C#.
|
|
|
|
|
Thank you ChandraRam for taking the trouble to answer my request. But I think it will be not be possible with C# too the way I imagine things. My idea was that it might be possible to upload a Windows application, be it VB or C#, to my web host, and then approach it from my home computer with some kind of HTML, or something like that. Why does it have to be so complicated
SIGH
|
|
|
|
|
PaulMiedema wrote: Is it possible to upload a "normal" Visual Basic 6.0 program into the server of my webhost and make it approachable from my home computerso that I can entry data into that program and make it print results on my home printer?
Although there are easier ways to do this, you could do this if you create a setting like this:
1. You have to have administrative rights to the server / webhost machine.
2. You would have to install the application on that machine by remoting in using remote desktop.
3. The firewall setting on the webhost machine has to allow incoming socket connection on a specific port you choose.
4. You would have to create a listener / client application on your home machine to receive the incoming socket communication.
5. Items 1, 2 and 3 will have to also be valid for your home machine obviously.
A simpler way to do this would be:
1. Create a Web Service in VS.NET which would expose a Function, which would return a dataset to the client software.
2. Create a Client Application using VS.NET which would reference that Web Service, and would obtain the dataset. This would allow you to format the data in whatever format you see fit and print it out at home.
As you can see the second way is a lot simpler then what you initially intended to do. I hope this helps.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|