Jump to content
Xtreme .Net Talk

FalconDEW

Avatar/Signature
  • Posts

    44
  • Joined

  • Last visited

Everything posted by FalconDEW

  1. I need a lot of access to the data... but the way I'm currently doing it is reading in all the data from the text files upon launch... and then saving back out to the files either when the user requests it, or when the program exits. Because it's just a bunch of text info, the save/load works instantaneously. I can't imagine the program ever really storing enough data to require real-time save/load.
  2. It seems like I can never find good enough advice that is specific to my needs - even though the internet is full of db examples. :( I have a small windows application written in vb.net that I am planning on commercially distributing soon. However, all of my data storage currently exists in encrypted text files. Prior to distrubition, I would like to re-write my data storage to be a bit more "professional" and give me more flexibility down the road. I would like a db solution that is simple and free. I do not have a lot of complex data I'm storing - just contact information on users, etc. I want the db to be completely self-contained within the program... i.e. I want it to work just like any other stand alone program that stores data. Could anybody recommend a good solution for me to use, as well as some advice on where I could look to get started on implementing this (i.e. a tutorial, etc). I am a pretty solid programmer... I'm just a complete newbie when it comes to databases. Any help / advice would be great! Thanks!! -Falcon
  3. Thanks for the advice - I really appreciate it. With regards to your suggestion to keep everything in a class... I've written a few classes for specific 'helper' code I've made. If I were to take everything else out an break them into classes... how would I handle loading my form? Would I create a 'sub main' function and load it on app start? I have never made a visual basic app like that, but I've see examples here and there. If you have any quick 'best practice' thoughts on how to do that, I would really apprectiate it. I have a background in programming - so I can pick up and run with whatever you put down. (I'm just not a VB pro yet... haha) Thanks! -Falcon
  4. I have a single form app I'm working on - and I'd like to have 2 differen't layouts of controls, etc. that the user can switch between. This would include font changes, size/location changes, etc, etc. What's the easiest way for me to go about doing this? At first I thought I could make a copy of my original form, adjust everything accordingly, and then somehow swap out to that form when the user selected the different layout - but I'm not sure that's possible since the main form contains all the code for the program, and all of the controls between the two forms would have to have the same name for the code to work properly. As always - thanks for the help! -Falcon
  5. Heh - don't you guys ever just want to keep your programs nice and light? I'm just trying to write a simple program - and while I need to store data... and more recently, to share it... I'm nervous that adding an actual database to my program is going to make it too fat.
  6. I have a standalone application that I save data / settings out to simple text files for storage. I am now looking into trying to create a simple form of networking for my program so that multiple people can share the same data. Can anybody point me in the right direction regarding what technology / solution I should look into for doing this? The only real catch is that the data I write out to a text file is similar to 'records' in a database... so I'm worried that in sharing the file between multiple machines it would be difficult to keep the data consistent. Any tips/pointers would be appreciated. Thanks! -Falcon
  7. Yeah - you're right. I actually figured out my problem too. I was using 2 different forms and forgot to make the constructor between the forms... so every time I tried to access a variable on the original form it threw the error about object referencing. So - my problem is fixed! Thanks!
  8. Sure This is a quick example of what will cause the problem - though slightly diferrent than what I was explaining above. The problem I'm having is simply how to get a string referenced correctly so it can be put into a function that requires an 'Object' as input? Dim cmbExample As ComboBox cmbExample.Items.Add("Test") -Falcon
  9. Ok - please forgive me for this dumb question, but I need help with some basic VB.Net sytax. I want to make use of the combo box .contains method. The method uses "value as object" as it's input. I have a string variable that I want to pass into the method so I can see if my string is contained within the combo box. However, the method keeps generating the "Object reference not set to an instance of an object". How can I reference the string variable correctly? I've tried creating a new object and setting it equal to the string - but I know there is just something stupid I'm missing with my sytax. :mad: -Falcon
  10. Can anybody help point me in the right direction regarding using different forms and buttons for my VB.net app? Ideally - after seeing some of the new windows UI in the new office products - I would like to use that cool blue look to the form with the cartoony-like toolbar buttons. Are these types of forms/toolbar graphics available to use and publish in apps? If not - how about designing my own forms and buttons? Thanks, -Falcon
  11. I am using the IE web browser control in my app - and I'm exectuting a print command using ExecWB as follows: webBrowser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER) Is there a good way to tell when the print dialog that appears is closed, i.e. user hits 'ok' or 'cancel'? The ExecWB function doesn't produce any value, so I can't find a way to hook into the dialog result. Additionally I've thought about running a loop to wait for my program window to return to focus, but that's not solid since it would trigger if the user accidentally clicked back on the program window prior to selecting anything in the print dialog. Any help would be appreciated! Thanks! -Falcon
  12. No - it is a regular Visual Basic .net application. The quote you posted from Microsoft actually answers my question - it appears that it's just not possible to do programmatically. So that leaves me with the solution I previously settled on - modifying the registry myself and then changing it back after I'm finished printing. I assume modifying the registry is going to retrict my program only to users who have access to the registry. Unless the "current user" segment of the registry can always be modified regarless of local machine access rights? I may have to research / experiement with that. Thanks for the help!
  13. I have the IE web control in my app - and I'm using the EXECWB command to print the current page. However, I'm trying to remove the header / footer that is automatically placed on the page. The only real way I've found to do this so far is by modifying the registry. I'm concerned that my method for doing this will restrict my program if being used by a person with restricted access to a machine (i.e. can't write to the registery). Any thoughts on whether or not this method is a bad/sloppy way of doing this, or if there is a better/cleaner method? Let me know! Dim IERegKey As RegistryKey Dim header, footer As String IERegKey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Internet Explorer\\PageSetup", True) footer = RegValue.GetValue("footer", 0) header = RegValue.GetValue("header", 0) IERegKey.SetValue("footer", "") IERegKey.SetValue("header", "") AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT) ' Reset the values after printing is completed 'IERegKey.SetValue("footer", footer) 'IERegKey.SetValue("header", header) -Falcon
  14. Thanks! Adding <body oncontextmenu="return false;"> to my html file worked like a charm. -Falcon
  15. I've researched this pretty extensively - and I haven't been able to find a good solution. Is it possible to disable the context menu for the IE web browser control? I've tried: webBrowser.ContextMenu = New ContextMenu() ...which didn't work. I've also seen solutions to actually disable the context menu in the registry. I was looking for a more 'targeted' solution to just disable the menu for the browser within my program. Any ideas? -Falcon
  16. I'd prefer that my output just be within a field on the form - like a textbox. I'm using VB.net. I'm not concerned with any of the coding (looping, array, etc. etc.) because I have all of that handled. What I'm trying to do is find a way to present a nice report of the data I've collected to the user. The best way I can describe this is with students/report cards. Let's say I have data tracked on a bunch of students, varying from their names, birthdays, and grades. In my program I want to display a 'report card' page... that, when accessed, uses a standard template with a nice header, possibly colors, lines, etc... and then fills in the data from the student record in a format that I specifiy. Basically all I'm trying to do is find a way to do on-screen reporting. There are expensive report-writer components for sale out there that would probably work - but all of them work off of databases... whereas I'm just trying to work from an array. I hope that makes sense... thanks for your help so far!
  17. What I'm trying to do seems very simple, but it's been hard for me to ever find a solution. I have an array of data that I want to display to the user. Just like in any type of reporting, I want to create a simple format for the data to appear in, then loop through the array and display each instance in some type of field on my form. Any 'reporting' tools I've looked at for VB.net seem to require a database to hook into, and will not work with an array. Does anybody know of how I can apply some type of formatting / style template and then fill it in with contents of an array?
  18. Already using that... I'm already doing that. What I was trying to say up above, is that while I already have handlers in place for the btn.keypresses, along with the form.keypress, if I disable the button after it's been clicked on... it seems that neither the form or the button has focus - so I can't find a way to catch keypresses any more after than. I guess what I'm looking for is a universal way to catch keypresses, regardless of focus... or a way to change the focus back to the main form (which I could then use at the end of any button click action). -Falcon
  19. I have a form with several buttons on it, and I created a typical case select function to handle keypress events. In order to get the keypresses to be picked up when I ran the program, I added a handler for form1.keypress and pointed it to my function. I soon found out that if I clicked on any button on the form, keypress events would break... so I ended up adding handlers for every button (button1.keypres, etc) and pointed them all the the keypress case select function as well. I'm wondering if there's a different way to handle this? As I continued to create my program... the handlers I added for each button.keypress broke, because keypresses when a button is selected are not being picked up. I'm hoping there's a better way. Any help would be appreciated!
  20. Reporting No - I never found a solution to this problem... but I did find an alternative. I am incorporating the Microsoft Web Browser com into my project... then writing the contents of my array into that window, using HTML formatting (tables, color, etc) to get the job done. I am still implementing this alternative solution, so I can't speak to how well it will work yet. -Falcon
  21. Does anybody know if it's possible to create reports based off of data within an array? I am not using a database connection in my program... only text files which I read into array structures. I would like to display reports on them but for the life of me I can't figure out how to do it. Does anybody have any suggestions? -Falcon
  22. Is there a way to restart your VB.NET app from within code? Thanks, -Falcon
  23. Windows This is a windows app. Any help you could give me would be greatly appreciated! I'm desperate to learn how I can format data (regular text saved in a delimited text file) in a window / report. I basically just use the text file to store variables entered into my program - which I would like to display in a formatted report for printing. -Falcon
  24. That's just what I was looking for! Thanks! -Falcon
  25. I have a form that has a single textbox. When the textbox has focus, I have a listener for the "enter" keypress that will press the OK button. Other windows programs will highlight the default button (like OK) with a thin black border around the button. Is it possible to do this with VB.NET forms? Thanks! -Falcon
×
×
  • Create New...