Jump to content
Xtreme .Net Talk

FalconDEW

Avatar/Signature
  • Posts

    44
  • Joined

  • Last visited

Everything posted by FalconDEW

  1. Try this What about trying it like this: Public Structure StructField Public FieldName As String Public FieldStartPos As Integer Public FieldLength As Integer End Structure Public Structure Blah Public Fields_OTT() As StructField Public Fields_SSN() As StructField Public Fields_BIW() As StructField end Structure dim WhateverSize as Integer = 100 'Declare your Field_Type variable dim Field_Type as Blah 'Or declare it like: dim Field_Type(WhateverSize) as Blah 'Now set the size of the arrays since you can't define them within the structure Redim Field_Type.Fields_OTT(WhateverSize) Redim Field_Type.Fields_SSN(WhateverSize) Redim Field_Type.Fields_BIW(WhateverSize) -Falcon
  2. Shell Have you tried using the shell command to run the .exe? I've used this in the past and you can pass it true/false if you want it to wait until the execution is complete before continuing. Shell(".\bcp.exe", AppWinStyle.Hide, True) Additionally as a cheap method of a progress bar... you can .show a form right before this that has information that the event is running... then .close the form after the Shell command is complete. The only note though is that if you .show a form before the command, toss in a .refresh as well to make sure it draws correctly. -Falcon
  3. Yeah... Yeah - I'm talking about a textbox. I have code that checks validates the content entered into the textbox on it's 'leave' event. I also have code that runs in the event of the form closing that checks to see if the user has saved their data, and if not - prompts them for what to do. Pretty typical stuff... but it seems like it works as such: * Enter content into textbox that will fail the validation code set in the 'leave' sub * Close the program * Form close event code informs the user they haven't saved * After declining to save data - a message box appears from the leave event saying that the data entered was not valid. * Application closes Hmmm... maybe it's just something in my Form Close event? It's very simple though - I just have an if statement followed by some message boxes. Maybe I'll throw an "application.exit" at the end of my form close sub and see what happens. -Falcon
  4. Is it possible to STOP a field from running its leave event sub when the user exits the program? Currently when I am on a field, and quit my app, the leave sub still tries to run. :( -Falcon
  5. Is it possible to format individual entries in a dropdownlist? e.g. make one of the list items appear "bold" within the list?
  6. Not sure... I'm not sure I understand how you would implement the data layer, etc that you recommended. Can you elaborate on what you use to create these... e.g. forms, classes, modules, etc? -Falcon
  7. I have recently successfully implemented 128-bit encryption for my vb.net app. I hammered out a random string for my 'key' and a random string of numbers for my byte array which is used in my encrypt/decrypt functions. My question is - before I deploy my app... are there steps I need to take within my code to protect the key / byte array? I have this paranoid feeling that perhaps somebody could decompile my .exe, find my key, and reverse my encryption I use for several output files. hahaha - am I being ridiculous? -Falcon
  8. That worked great! Thanks guys - that did the trick. I appreciate the code example too! Now I understand how this works. PlausiblyDamp - in response to your questions... my main form class has become massive with about 60+ subs/functions - and I'm not even close to finishing. I have already grouped most of the code into regions so I can close them off - but I wanted to use classes for the sake of breaking out my code more. Will I suffer any type of performance loss by doing this? I guess my background in C++ is making me feel like I need to write classes for everthing... haha. -Falcon
  9. I have a single form program and I would like to control text boxes on the form via a class. How can I create a proper reference to the form from the class? Thanks! -Falcon
  10. I am writing an option in my app to require a password upon launch. I am using MD5 encryption to store the password since I don't need to decrypt it. My question is - where can you store something as simple as a boolean option that the user has chosen to require a password at launch? I keep thinking that wherever I store the option - a person could just find it and delete it... giving them access to the program. -Falcon
  11. I have an array of a custom data structure that I want to write out to a form in my app. I basically want to write each instance of the array out to a line, with some basic formatting (color, font, etc.) throughout... and repeat for the remaining array members. Any recommendations as to a good method to program this? -Falcon
  12. Thanks Nerseus! This worked perfectly.
  13. Hello all - If you define a structure, with another structure inside of it... how can you define the second structure's size? E.g.: public Structure Blah public Nest() as NestedStructure end Structure public Structure NestedStructure dim whatever as Integer end Structure dim HereWeGo(50) as Blah Now - how can I set HereWeGo.Nest to a particular size... like how I defined HereWeGo to be of size "50"? Thanks in advance for anybody who can help me out!
  14. Robby - thanks a lot! I know that seemed simple, but the advice for the TextChanged event really got me going in the right direction. I've figured out both of my problems. Thanks!
  15. Ok - I figured out #1 using the .closing event. However, any advice for #2 would still be greatly appreciated! Thanks. -Falcon
  16. Hi all - I'm currently trying to research a few quick things I am trying to implement, and while I continue - I thought there may be a faster turnaround time if I just post my questions here. 1. In VB.NET how do you tap into the program exit event? I want to code a few things to happen whenever the program is exited or terminated. 2. I have 2 text box fields that I want to have a sort of 'or' relationship. i.e. when somebody enters data into one, the other is disabled - and vice versa. I'm not sure what the best event is to do this - whether it's on entry, or leaving, etc. I was wondering what the best method for doing this was. Thanks for any help anybody can supply! -Falcon
  17. I've been reading tons of posts between the File IO forum and the Database forum. Lots of them have been really helpful, but I'm still torn on getting an answer to my problem. I'm writing a simple program that will require me to store data I collect. I don't have any tricky data, it's really just like 20 variables on each user... with a max of 100 users. I've considered just defining a type to hold the variables, and then write everything to a file... but I don't want to be reinventing the wheel if I can try to figure out the ADO or XML DB solutions in VB.NET. Can somebody recommend what method they would use to track this data? Preferrably, since I'm new to .NET and things seem a bit more complicated than they used to in VB6, can you also give me a few keywords or snippets of code for me to disect? It really helps when I know what keywords to research. Thanks in advance!
×
×
  • Create New...