Jump to content
Xtreme .Net Talk

jccorner

Avatar/Signature
  • Posts

    146
  • Joined

  • Last visited

Everything posted by jccorner

  1. Not to bore you with details, but I am concerned about 2 things with a project I'm presently working on, first my application size is now over 9mb when compiled using over twenty forms, and secondly should I be breaking down forms into dll�s? I'm looking to see if there is a certain advantage as to breaking down my project into smaller projects and then use them as dlls and is there a certain size I should be concerned with not going beyond in my application?? I have had some problems with the assembly due to the fact I'm using over three thousand textboxes on certain forms. Thank you for any advice anyone has as to tackling such a large project.
  2. Has anyone else run into this issue?? I have a form with a tab control with over two thousand controls and when I go to run, this is the error I receive. Appreicate any help.
  3. The SelectedText will not work on bounded comboboxes. It works only if u add the items using Combobbox1.Items.Add(). For Bounded Columns. please set the value member and display member properly bind the combo like this. Me.ComboBox1.ValueMember = "id" Me.ComboBox1.DisplayMember = "name" Me.ComboBox1.DataSource = dsetUsers.Tables(0) it is important that u must set the value member and display member before set the data source . otherwise the selectedvalue changed event fire's one more time... Public Sub ComboBox1_SelectedValueChaged (byval sender as object, byval e as eventargs) Dim id as string = Convert.ToString(Me.ComboBox1.SelectedValue) ' Contains your selected user's id Dim name as string = Convert.ToString(Me.ComboBox1.SelectedText) ' Contains your selected user's name End Sub
  4. Everyone, thanks for the responses. PD, I have changed my code to use the threadpooling, but I'm still not sure if that answers my question. Will the threadpooling destroy the thread after it has finished running?? For example, a new thread for LoadMemos is created and started each time a child form is called from the main form. When the child form closes, LoadMemos refills the dataset with the updated data. Now this could happen up to fifty times throughtout the day. After the thread has completed, will the threadpooling destroy the thread automatically?? Thanks again for the help.
  5. Okay, well, can anyone answer this?? If I submit a thread as I did above and all it does is load six datasets as such: Private Sub LoadMemos() Loadds(SqlString, DS1) Loadds(SqlString, DS2) Loadds(SqlString, DS3) Loadds(SqlString, DS4) Loadds(SqlString, DS5) Loadds(SqlString, DS6) End Sub Where Loadds is a function call that takes a sql string and the ds to fill but I want this filled in the background since it will be used throughout the app. After the last dataset if filled, what happens to the thread?? Is it still running?? Does it just end?? Is it taking up any memory?? Do I have to perform any cleanup?? Thank you for any help with this.
  6. e.Handled wasn't the answer, the event still fires. Here's the code: Private Sub LoadGrid() If mskSFrom.Text.Trim().Length() > 0 then If IsNumeric(mskSFrom.Text) Then 'Loads the grid Else MsgBox("Please enter a number.", MsgBoxStyle.Exclamation, Globals.ProdName) txtSFrom.Text = String.Empty txtSFrom.Focus() Exit Sub End If End If End Sub Private Sub SearchField_KeyUp(ByVal sender As Object, ByVal e As System.windows.Forms.KeyEventArgs) Handles mskSTo.KeyUp, mskSFrom.KeyUp If e.KeyCode = Keys.Enter Then Me.Cursor = Cursors.WaitCursor If mskSFrom.Text.Trim().Length() > 0 Then LoadGrid() End If End If Me.Cursor = Cursors.Default e.Handled = True End Sub I fixed my problem by blanking out the field when it was not a numeric value but I do realize I'm going to run into this issue again later on so I'm curious as how it would be solved when a simple workaround is not available.
  7. The result is always going to be okay regardless whether the enter key or button is pressed. What I need is the ability to differentiate when the enter key was hit on the messagebox from when there is a mouse click on the messagebox.
  8. Cags, Your theory was not totally sound. It does solve my problem, but it also creates a new one. When the message box appears, I set the boolean to true. If the user does press enter, the keyup event is still fired but since the boolean is true it does not enter the code but it does set the boolean to false now allowing for future key press of the enter key. Here is the bug: The thing is when the message box appears, the boolean is set to true. If the user does in fact use the mouse to click the ok button, the keyup event is never fired therefore not setting the boolean back to false. I now actually have to hit the enter button twice in the search field to fire the keyup event. Does anyone know how I can detect when the message box has been closed??
  9. rfazendeiro, I still want the search field to detect when the enter key is hit so that it can load the grid. What I don't want is for the keyup event to get fired when enter is hit from the messagebox.
  10. I have a search field that when you hit enter it fires the keyup event and loads the grid. Well, in certain cases the field has to be numeric depending upon the search criteria. Well if it is not a messagebox appears and tells the user to enter a number, the problem is if the user hits the enter key, the messagebox is killed but then the keyup event is fired again therefore reexecuting the messagebox because the search field still has a number in it. Pretty much this is an endless loop unless the user actually hits the button using the mouse. Does anyone know how to prevent the keyup event from being fired or how I can detect that the enter key was pressed from a messagebox??
  11. I've used threads in my apps before but wish to make sure that I'm implementing a thread correctly in this case. Here is the function I call on a form.closed event: Private Sub RefreshData Dim ThrData As New Thread(AddressOf LoadMemos) ThrData.Start() End Sub LoadMemos just simply reads a few tables from the database and fills a dataset that the forms will be using. My questions are how can I tell the thread is completed and how do I perform any clean up because every time any of the child forms (up to 5 forms) are closed a new thread is created and called again. Thank you for your time and appreciate your assistance.
  12. I understand I could do that, but here is the situation. I have a client who uses a third party program to process a state approved report. Now we are in the works to also get our report state approved unfortunately this can take up to a year to accomplish. The third party program is using dbase on the backend. I've found that if I can manipulate the records in the dbase file, the client can still use their third party program to print the report. So it's either find a solution to manipulate the current dbase file or wait a year or more to get state approved.
  13. Thanks alot FZelle. When I added the dbt file to the folder it started working. But now I get a "query too complex" message when I try to update or delete a record. This is because I'm using OleDb which only allows 64k of information per record. Is there an alternative way I can use to update the record or somehow get around the error message?? I didn't understand why the delete didn't work but it gave me the same message and I'm unable to change the structure of the records. Thanks for your help.
  14. I've found a dll that can browse dbf files and was unable to add it to my .Net project since it was written in C++. I tried to use Aximp to create a .Net wrapper using this command: C:\>AxImp.exe C:\Temp\CDBFAI.DLL I receive the error: Error loading type library/DLL. I tried using the keywords source and out as well but no luck. Has anyone gotten this error and resolved it??
  15. Thanks Zero for your reply. Unfortunately I am getting an error after copying your code. I get ERROR [42502][Microsoft][ODBC Visual FoxPro Driver]Not a table. I know the data is not unreadable in the dbf file because I downloaded a dbase viewer that was written in C that shows me the data. Now I'm trying to see if first I can view thedata from a vb.net program and then I want to try to add new rows to the file. Greatly appreciate any help anyone can provide.
  16. I'm trying to read a dbase file using the following code: Dim dbstr as String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Temp;Extended Properties=dBase III" Try myConn = New OleDbConnection(dbstr) myCmd = New OleDbCommand("Select [DB1Last] From [ACC.DBF]", myConn) myConn.Open() myReader = myCmd.ExecuteReader() <-- error occurs here MsgBox(CStr(myReader(0))) myReader.Close() Finally myConn.Close() End Try When I try to read the database I get the error: "Unable to locate the requested xbase memo file." Can anyone please help me with this?? And yes, the dbf file does reside in the C:\Temp folder. I've also tried changing the string to include brackets and not include brackets. I've been looking all over the place for some working code to access a dbf file using vb.net.
  17. Question, if I choose to run the app from the server, do I have to run the install on the server itself?? Thank you for the help once again.
  18. penfold, do you manually update the xml file or is it done automatically?? Sounds like an interesting proposition. Only problem I can see with that angle is that if someone is already in the program they won't get the update until the log off other than for checking the date of the xml file every time the user starts the app. Appreciate the replies. Everyone was alot of help.
  19. But wouldn't that consist of including all the dlls and wouldn't the framework have to be installed on the network as well?? Thanks for the reply.
  20. Maybe this has been asked before, but I was unable to find using the search. We created an application and installed onto twenty pcs. We make changes to the program about every two weeks. So that means every two weeks, we have to put the exe in the public directory and copy and paste the new exe onto every pc individually. I'm hoping to see how others have solved this issue. We were thinking about using a windows schedular to copy and paste the executable every time someone logged into the network, but don't have much experience in this department. Thank you for your suggestions.
  21. Thank you both very much. I'll have my web hosting company check into it. Just wanted to make sure it wasn't something I was doing.
  22. According to their website they do. Here are links: http://www.pbpac.org/demo/CourseRegistration.aspx http://www.pbpac.org/demo/default2.aspx On the first page, none of the textfields or comboboxes are shown and on the second page, the calendar does not appear, but the label does.
  23. I have created an ASP.Net app and moved ftped the pages up to my web hosting company's server and when I view the aspx page, the html part of the code is correct. But the calendar control and textfields do not appear. Yet when I run on development pc, everything looks fine. What am I missing?? Appreciate any help.
  24. Can someone direct me to a tutorial where I can set up pages for https?? I just want two pages out of the ten because if every page uses https then I get the security certificate dialog box for each page. Thank you very much.
  25. bri189a, RPG programmers usually congregate in newsgroups. I've found that when I'm looking for something, I go here: http://groups-beta.google.com/groups?q=as400&start=0&scoring=d&hl=en& I've been working on a forum similar to this one for AS400 people to look for help and support. If the groups are not much help then email me and I'll see what information you are looking for.
×
×
  • Create New...