Search results for query: *

  1. F

    Best Practices? Import and alias same namespace, bad idea?

    Thank you, jmcilhinney. Yeah i did it because i had a name clash in one of the classes i created in that namespace, but i used the import because most of them didn't and i really didn't feel like writing the alias over and over just because of a few name clashes. Thanks for the feedback.
  2. F

    Best Practices? Import and alias same namespace, bad idea?

    quick question, what do you guys think about this? Bad idea, bad practice? or doesn't really matter? low priority. Thanks in advance. Imports SIMS_GTalkMsgSystem Imports sgt = SIMS_GTalkMsgSystem
  3. F

    add text to textbox?

    handle the keydown event like johnH said. you'd probably want to check first that the text doesn't already contain the prefix/suffix you want to add. then add it if it doesn't. example code: Private Sub TextBox1_KeyDown(ByVal sender As System.Object, ByVal e As...
  4. F

    Question Windows Beeps when Key Combination entered

    set e.SuppressKeyPress = True after you change the text, should do the trick
  5. F

    Create User Input function

    like johnH said use the ShowDialog Method. if you are using VS.net, you can go to add item and add a Dialog, it's a template for what you need. Heres a screenshot from 2010. example code for using showDialog Dim dialog As New Dialog2 Dim result As DialogResult =...
  6. F

    matrix structures problem

    Maybe someone else on here can help? I'm sorry, I don't have the time to look over your code and i don't really know much about Matrix's. Maybe someone else on here or one of the mods can help you with it... As far as the output, in a textbox / console, i do not believe there is a way to...
  7. F

    matrix structures problem

    Sample Code Here's my entire code for this example. It's a bit rough but it works. This is for a console application, but you can adapt it for the windows forms. Module Module1 Sub Main() Dim intMatrix(6, 4) As Integer If intMatrix.GetUpperBound(1) > 0 AndAlso...
  8. F

    matrix structures problem

    What do you mean you can't find the correct code? I'm not sure if i understand what the problem is exactly? But if your just trying to create that pattern you can just use a for loop,a multi-dimension array, and some variables. Maybe you can create a class for this matrix object if that's what...
  9. F

    Question "Do : Loop Until Completed" Feels like a bad idea?

    Thanks, good catch. fixed it. Gotta test it but i think this should do it. Sub ReloadRoster() Dim action As New Threading.AutoResetEvent(False) Dim RosterLoadEnd As ObjectHandler = Sub(sender As Object) action.Set() Dim RosterAddItem As RosterHandler = Sub(sender...
  10. F

    Question "Do : Loop Until Completed" Feels like a bad idea?

    Thanks JohnH. I didn't get the chance to do too much reading, but i think for now a AutoResetEvent will do the trick. What do you think of this? Sub ReloadRoster() Dim ActionCompleted As New Threading.AutoResetEvent(False) Dim RosterLoadEnd As ObjectHandler = Sub(sender As...
  11. F

    Question "Do : Loop Until Completed" Feels like a bad idea?

    Sub ReloadRoster() Dim Completed As Boolean = False AddHandler OnRosterEnd, Sub() Completed = True AddHandler OnRosterItem, Sub(sender As Object, item As RosterItem) Roster.Add(item) End Sub...
  12. F

    Memory exception error

    you really should try posting your code formatted correctly, http://www.vbdotnetforums.com/forum-feedback/14540-how-do-i-add-my-code-here.html I'm not sure what imageCollection is suppose to be so i improvised with a dictionary. Also i'm assuming that cmbPaths is a combobox. I'm assuming you...
  13. F

    A message box depends on time

    was browsing. small notes: i think 'Now.TimeOfDay.Hours' returns an integer? a integer data type will probably be enough? if you didn't want/need to use variables you could also do 'Select Case Now.TimeOfDay.Hours'
  14. F

    Question DisplayFormat/DisplayStyle property of TextBox

    Use String Formatting? I don't know of any properties that can set the formatting for a textbox, but you could just use String Formatting, should be fairly simple. You can just set the Text property of the textbox and when you do use ToString or Format method to set the formatting. Ex...
  15. F

    question about multiple forms

    only showing relevant info in quote: It looks like the reason why your only showing data from form1 is because 'Form2' is not where you entered the data. Notice that in form1 you created a New Instance of Form2 and you named it 'nextform' A quick solution for this problem would be to make...
  16. F

    whats the quickest way to get this program done

    no problem. Glad to be of help. :) There's a button on the bottom left of this post that looks like a black 6pt Star, on mouse over it says "Add to this user's reputation". Thanks
  17. F

    whats the quickest way to get this program done

    i think it looks fine... typically i think its a good idea to check the type before converting or use a try catch block, but since your just doing exercises and you know exactly whats going to be in the listbox, and you know there will only be Employee type objects in there i think this is fine.
  18. F

    whats the quickest way to get this program done

    sorry i meant the second one on that post. To avoid confusion, i mean do something like this Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Emp As Employee = CType(lstEmployeeNames.SelectedItem, Employee) Dim frm2 As New Form2...
  19. F

    whats the quickest way to get this program done

    Also just a quick note, you may want to check that the selectedItem in the listbox is of type Employee before you convert it. Although in this situation you won't really encounter a problem because you know all of the objects will be Employee, but if your not sure what is put into the listbox it...
Back
Top