
Phreak
Avatar/Signature-
Posts
63 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Phreak
-
Got it! Substitute 'Keys.Separator' in the above WrongKey function for 'Keys.OemQuestion'. Now it works perfectly.
-
I've come up with a solution to the problem (there may be an easier way, but this works... kind of), however, I can't get it to work for the / key. (otherwise known as the ? key). I got the / on the numpad to work, but not the other one. Here is the code: Protected Overrides Function ProcessDialogKey(ByVal keyData As System.Windows.Forms.Keys) As Boolean If (keyData And Keys.Return) = Keys.Return Then If (keyData And Keys.Shift) = 0 Then If WrongKey(keyData) = False Then If TypeOf TopLevelControl Is Form Then If Not DirectCast(TopLevelControl, Form).AcceptButton Is Nothing Then DirectCast(TopLevelControl, Form).AcceptButton.PerformClick() End If End If Return True End If Return False Else Return False End If Else Return MyBase.ProcessDialogKey(keyData) End If End Function Private Function WrongKey(ByVal PKEY As System.Windows.Forms.Keys) As Boolean If PKEY <> Nothing Then Select Case PKEY Case Keys.OemMinus Return True Case Keys.Subtract Return True Case Keys.O Return True Case Keys.OemCloseBrackets Return True Case Keys.M Return True Case Keys.Divide Return True Case Keys.Separator Return True Case Else Return False End Select Else Return False End If End Function Let me know if anyone knows the key value or "other name" for the forward slash (/) key to implement into the function.
-
I have the EXACT same problem with the EXACT same keys. I will keep looking into it. Let me know if anyone finds anything out, I will do the same.
-
They would be custom made services. For a chat program that a friend of mine and I are writing. We want to run a couple of services on a Win2k machine, one for handling authentication and one for "being connected" and transferring messages between users. And on top of that, we want to take an administration program, that we are also creating, and be able to read data from the "connected service", and see who is connected. Anyone have any idea of how to retrieve info like this from a windows service and pass values between these services? Or would a main administration program to handle everything, be the way to go?
-
Oops... my fault, I should have specified. Windows service.
-
Ok, I know how to set the tab index of my controls, but that is still a little slow and inconvenient. How could I setup a text box and button so that when I was done entering in data into the text field, it would submit the data using the button, by just pushing the ENTER key?
-
How could I go about passing values from 1 service to another? For instance, someone's account information. They provide login information to an authentication service and then that authentication service passes certain account information to another service I have running?
-
Can one TCPListener maintain multiple connections through one port from multiple clients? Or how would one go about setting up a "listen" server to accept multiple connections through one port?
-
Thanks for all of the help so far guys! Well, I wouldn't say I'm a "n00b" :), but I'm by far an expert. To give you guys a little more of an idea of what we're doing, here is what we have planned for about the next 6 weeks (just planning what we're going to do): 1. What DBMS and platform do we want to use? 2. How many different services are we going to need? Authentication, notification, update, etc. 3. What exactly do we want the program to do besides IM? File transfer? 4. What kind of UI do we want? Basic planning things like these. We want to make sure we have the basic plan of attack down on laying the ground work out. Any other ideas of what we should maybe look into?
-
A friend of mine and I are wanting to write an Instant Messaging Service much like the "well-known" services such as AIM and MSN Instant Messenger. We're not doing it to try to develop a competitive product, but to just expand our knowledge and experience of programming. So I would like to ask a few questions and by all means, please give us all of your thoughts and opinions. Here are the questions I'm seeking advice on: 1. We're wanting to write this application/service(s) in VB.NET. At least in .NET if not VB. Any language advice or preferences anyone can give for a project like this? 2. What type of DBMS (Database Management System) would you recommend. We're thinking of using MS SQL Server 2000. Any ideas or suggestions on this? 3. We're also thinking of encryption between "buddy" messages. And whether or not they should be peer-to-peer or sent through a server. Any thoughts or opinions? Any suggestions for encryption? That's all for now. I don't want to bombard anyone with too many questions. Please post your suggestions if you have any, as we are REALLY looking for some professional expertise on this. Thanks a ton!
-
I too had this same problem. What I did to solve the issue was: Added a new blank setup project to my current solution. Once the project is created in your solution. Right click on the project. Click Add, then Merge Module. Find the regwiz.msm module and add that. Then under the properties for that file, add the license key you received from Crystal Decisions in the License Key field. Make sure you enter the correct key. I believe you get a few keys/registration numbers back from Crystal Decisions when you register your product. Also, you can try running this on both the dev machine, (then rebuild solution and deploy again) and the client machine. ftp://ftp.crystaldecisions.com/outgoing/EHF/cr10netwin_en.zip
-
Can anyone tell me how to quickly detect how many machines are on a particular subnet? Say I want to scan the network address 192.168.1.0 for all systems on that network/subnet. Right now I'm using a timer that goes off every 1ms. Here is the code I'm using: Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick strFixedNetAddr = IP If iCounter < 255 Then bIPScan = True iCounter = iCounter + 1 strFixedNetAddr = strFixedNetAddr & iCounter frmProgress.Show() frmProgress.ProgressBar1.Value = ((iCounter / 255) * 100) Try tcpClient.Connect(strFixedNetAddr, 27960) Catch ex As System.Exception If ex.Message.ToString = "No connection could be made because the target machine actively refused it" Then arrIPsToSend(iIPCounter) = strFixedNetAddr iIPCounter += 1 Else 'no machine found so continue End If 'MsgBox(arrIPsToSend(iIPCounter)) lblFound.Text = iIPCounter End Try Else 'we've sent 255 packets, and are done waiting. bIPScan = False iCounter = 0 Timer1.Enabled = False End If btnSend.Enabled = True End Sub Right now it's taking forever to detect the machines, what I really want to know is if a machine is NOT at a specific address, to just skip it right away and move on to the next address. Because now I'm waiting for it to timeout which takes forever. Thanks.
-
Yes, it does work. So far I haven't had any problems whatsoever. So hopefully this will continue to work and I won't have any more problems. Thanks a ton.
-
What do you mean ThreadState? What state am I looking for? And if the t.Abort() is misplaced, where should it go? Like I said, I'm not familiar with using threads at all. I just need to use them in this particular occassion because of the time it takes to fill the dataset. Thanks for the reply.
-
I'm not completely sure on how to use threads, but I followed a small fairly simple tutorial and what I used and how I used it is below. PROBLEM: Sometimes the dataset in the FillDataSet() procedure is filled (usually after you run it a second time, usually doesn't ever work the 1st time), and sometimes it doesn't. But I receive NO error of any kind. Maybe I'm not using threads correctly. Could anyone give me some input or a better way to use threads? [These two procedures are taken out of the main form.] Sorry if it's a little long. Private Sub OracleConnect() Dim dbInfo As New loginInfo() Dim frmProgress As New progress() t = New Thread(AddressOf Me.FillDataSet) If frmLogin.DialogResult = DialogResult.OK Or cmdRefresh = 1 Then 'run the next couple of IFs to handle someone pushing the REFRESH 'button if they aren't logged in If frmLogin.txtUser.Text = "" Or frmLogin.txtPwd.Text = "" Or frmLogin.txtServer.Text = "" Then cmdRefresh = MsgBox("Unable to refresh tables because you are not currently logged on." & _ vbCrLf & "Would you like to logon now?", MsgBoxStyle.YesNo, "Refresh Problem") End If If cmdRefresh = 6 Then cmdRefresh = 0 frmLogin.ShowDialog() OracleConnectString(frmLogin.txtUser.Text, frmLogin.txtPwd.Text, frmLogin.txtServer.Text) OracleConnect() Exit Sub ElseIf cmdRefresh = 7 Then cmdRefresh = 0 Exit Sub End If frmProgress.Timer1.Start() t.Start() frmProgress.ShowDialog() frmProgress.Timer1.Stop() 'clear combobox items cmbTables.Items.Clear() 'cmbTables.Items.Add("--None Selected--") 'clear datagrid dsSeedList.Clear() dsSeedList.Reset() DataSet21.Clear() DataGrid1.Refresh() OleDbConnection1.Close() frmProgress.Timer1.Start() t.Start() frmProgress.ShowDialog() frmProgress.Timer1.Stop() intTblCnt = DataSet21.USER_TABLES.Rows.Count cmbTables.DropDownStyle = ComboBoxStyle.DropDownList 'put avail tables into listbox (combobox) For i = 0 To intTblCnt - 1 Step 1 cmbTables.Items.Add(DataSet21.USER_TABLES.Rows.Item(i).Item(0)) Next If cmbTables.Items.Count > 0 Then cmbTables.SelectedItem = cmbTables.Items.Item(0) End If If connError = 1 Then connError = 0 connError = CType(MsgBox("There was an error while trying to connect to the database." & _ " Would you like to try again?", MsgBoxStyle.YesNo, "Retry Connection?"), Short) If connError <> 6 Then connError = 0 Else frmLogin.ShowDialog() If frmLogin.DialogResult = DialogResult.Cancel Then Exit Sub Else With dbInfo .user = frmLogin.txtUser.Text .pass = frmLogin.txtPwd.Text .serv = frmLogin.txtServer.Text End With Call OracleConnectString(dbInfo.user, dbInfo.pass, dbInfo.serv) Call OracleConnect() ButtonPressed = False End If End If End If End If cmdRefresh = 0 connError = 0 t.Abort() Call CheckForTables() End Sub #End Region #Region "Fill Table Listing" Private Sub FillDataSet() Try 'fill the dataset with the list of tables OleDbDataAdapter2.Fill(DataSet21, "USER_TABLES") Catch ex As System.Exception 'in case an exception is thrown, give an error box and 'a moderate description of where the exception was thrown If ex.GetType.ToString = "System.Threading.ThreadAbortException" Then 'do nothing... just ignore it. it's dumb and has no idea what it's doing. Else MsgBox("Error retrieving tables!" & vbCrLf & "Details:" & vbCrLf & " " & _ ex.GetType.ToString & vbCrLf & vbCrLf & "Check your username and password " & _ "and make sure they are correct.", MsgBoxStyle.Critical, "Table Retrieval Error") connError = 1 End If Finally OleDbConnection1.Close() End Try End Sub #End Region
-
I've just started testing my program on some client machines and found that there is a small issue. I use the Crystal Reports Engine in my program to create reports and everything works fine and dandy on machines that have VS.NET installed on them. However, on client machines that only have the .NET Framework (latest SP btw), I get an unhandled exception and says that the KeyCodeV2.dll file is missing. I searched my DEV machine for it and found it to be in "C:\Program Files\Common Files\Crystal Decisions\1.0\bin". I tried packaging the .DLL file into my setup and it put it in the application folder when installed. However, I still get the same error. Any idea what to do?
-
GOT IT! Process.Start("C:\ORANT\BIN\PLUS80W.EXE", "@ '" & Application.StartupPath & "\seedlistp1.sql'") Thanks for all your help and getting me on the right track. However, the program SQL Plus 8, only allows for 79 characters in the argument. But it will work from the Program Files distribution folder so that's all that matters. Thanks again!
-
No dice. This is REALLY agrivating! I thought that last option would have worked, and I can't believe I didn't think of that. Any other ideas? Because now, I"m really stumped.
-
No... I don't think it's using the 8.3 format, it just stops truncates it when it comes acrossed a SPACE in the folder name.
-
Well, I found out how to enter arguments in with the PROCESS.START. However, it still wants to use the 8.3 format for the arguments. Any help? Ideas?
-
How do I use switches with that? Say I want to run a SQL script when I start it. It doesn't like what I have below. Process.Start("C:\ORANT\BIN\PLUS80W.EXE @ " & Application.StartupPath & "\seedlistp1.sql")
-
Is there a way to launch an external application without using SHELL? Because when I use shell I have to use the 8 char format, e.g. "C:\Progra~1\.....". When I want to be able to use Application.StartupPath which would return "C:\Program Files\....". Please help!
-
I don't know? How do I tell and if I don't, how can I deploy it with the application?
-
Not sure if this should go under Deployment or not, but here's the deal. I just built my solution and when I run the .EXE on my system that I developed it on, everything works fine. However, when I move it to the 'test' system, I get an OleDbException when the OleDbDataAdapter tries to fill the dataset. Like I said, it works fine on the dev machine, but fails on the test machine. The test machine has the .NET framework and .NET framework SP2 on it. Am I missing a DLL file or something? Any ideas?