Jump to content
Xtreme .Net Talk

my_lou

Avatar/Signature
  • Posts

    45
  • Joined

  • Last visited

Everything posted by my_lou

  1. hey dude, here is the deal: i would suggest going to.....school. yes, i know it's boring and such, but it's a very good place to learn. you don't have to go for a Bachelors degree, you can just take the courses you need. For example, if you a computer science course includes GUI(Graphical User Interface) in its name, take it. if you don't want to go to school, i'd recommend reading a book. a good software design book is User Interface Design for Programmers by Joel Spolsky. whatever you do, don't take the easy way out. trust me, it will come back and haunt you if you do. in large scale software software applications the planning and designing phases are more important than the actual coding, i know that from a personal experience.
  2. just get rid of the last line "viewer1.RefreshReport();" i think that might work, at least it worked for me.
  3. yes, i am aware of that, but the problem with CrystalReports is that its support for runtime customization is limited compared to Office Automation with .NET. For an example, let's say that i wanted to place a barcode in the form of a Bitmap image on my label, but i do not in advance know the name or the location of said image file. Only during runtime will those two parameters be known. As far as i know, there isn't any way to specify the the file name and location of an image to include in CrystalReports report during runtime, while the .NET Office Automation object model makes that task easy. Another example: let's assume that i don't know which label type the user will want to print the labels on in advance. The user may want to print the label in Avery 5162, or Avery 5160, or something different altogether like Formtec LS-3101. Or they may not even want to use any of the predefined label templates, they might want to create their own custom label instead. And all that during runtime. Again, .NET Office Automation provides for accomplishing those tasks easily enough, while i don't think you could that with CrystalReports.
  4. i decided to use Office Automation with MS Word. for those of you that don't know Office Automation is just a fancy name for programming MS Word documents from within .NET applications so that solves my problem nicely. i can decide what goes on my label in runtime and then create an MS Word doc within my VB.NET application and print it.
  5. so like, here is my question: when creating a new CrystalReport document with the built-in VS.NET designer, one of the types of reports you can create is a mailing label. so let's say you create a new lable report and then you have to set the settings for Mailing Label Type (i.e. Avery 5160, etc...), Mailing Label Size, Gap Between Labels, and so on. Can you set those settings at runtime? For example, let's assume i picked an Avery 5160 for Mailing Label Type, but then i want to change it to Avery 5260 at runtime. Or i picked 0.00 inches for the Horizontal Gap Bewteen labels but then i want to change it to 1.00 inches at runtime. Is that doable at all or not? And if so how? also, if i put some text on my label at design time, can i change it at runtime? and how? thanks all.
  6. hey folks, like the subject says, i was wondering what would be the best way to create mailing type Avery lables in a VB.NET application? i guess there are 2 options: 1. launch MS Word from VB.NET and populate the necessary information in the Word document from within the VB.NET app. or 2. create the label entirely in the VB.NET application and then just print as many copies as i want. any suggestions, comments, etc.? thanks.
  7. hey folks, what's the best way to run another application within a VB.NET Windows app? i need to be able to generate barcodes in my VB.NET application and i have this shareware program that already does that. so i figured i could just run this little program within my application to solve the problem. this program is nothing but an .exe file. so what i need is a way to run an .exe file in VB.NET. now, i know i can do that using the Shell command, but the reason why i am posting this is because i wanted to get some opinions on what would be the most professional and elegant way of doing it. Any advice? thanks all.
  8. hi folks, about adding controls at runtime: i know that when i add controls at runtime i need to adjust their starting location otherwise they'll just end up stacked on top of each other. so i accomplish this like so: For loop Dim locProcessItemControl As New ProcessItem locProcessItemControl.Name = "MatchedItem" & CType(locOrderItemID.ToString, Integer) & "_ProcessItemUserControl" locProcessItemControl.Top = locTop locTop = locTop + locProcessItemControl.Height Me.MatchedItemsContainer_Panel.Controls.Add(locProcessItemControl) End If Next 'End For Me.MatchedItemsContainer_Panel.ResumeLayout(), i.e. i adjust the Top parameter of each new one to be the value for Top of the previous one plus the height of the control, assuming all of them are of the same height. so far so good. However, when you want to remove a control from the Panel you have to go through some serios mumbo-jumbo For loops to get the starting locations of all controls right, i.e. something like this: Dim locCounter As Integer Dim locRemovedIndex As Integer Dim locControl As ProcessItem For Each locControl In MatchedItemsContainer_Panel.Controls If locControl.BackColor.Equals(Color.FromKnownColor(KnownColor.InactiveCaptionText)) Then locRemovedIndex = locControl.Parent.Controls.IndexOf(locControl) 'Remove the highlighted control. locControl.Parent.Controls.Remove(locControl) Exit For End If Next 'End For For locCounter = locRemovedIndex To MatchedItemsContainer_Panel.Controls.Count - 1 MatchedItemsContainer_Panel.Controls.Item(locCounter).Top -= MatchedItemsContainer_Panel.Controls.Item(locCounter).Height Next Now, that does work but it looks kind of, ...amateurish, to me. It seems to me there should an easier and more elegant way to do this. Isn't there any way, i.e. a property to set or something, to just tell the parent control to not stack the controls added at runtime on top of each other, but use some kind of a set off for each control's Top properyt?
  9. hi all, is there a way to find out how many rows were returned by OracleDataReader? i find it odd that the OracleDataReader class would have methods like Depth, FieldCount, and HasRows but no way to tell you how many rows were returned by the call to the database. Thanks.
  10. can anyone recommend any good books on how to design User Interface using Windows forms? thanks.
  11. are there any free VB.NET controls for generating barcodes? or some free barcode generating software? also, anybody know where i can find some free barcode fonts?
  12. that makes sense, but could you elaborate a bit. i am total newbe in dealing with barcodes, :-) i thought i'd give some more information about the app i am working on in case somebody else gets in on the thread and wanted to answer my question: it is essentially a bookstore mangement app. it handles six main functions: book inventory, ordering of new books from vendors/publishers, processing newly arrived books, selling books, book buy back, and re-selling books to vendors. i've done some research and i found out that a barcode system generally consists of 4 parts: 1. Printing barcodes 2. Generating barcodes and applying them on labels 3. Scanning barcodes 4. External database Now, i already have the external database set up and working and i there is no way around purchasing a scanner so that's 3 and 4 out of the way (although there is still the question about which scanner to buy). As far as printing the barcodes, we already have a label printer in use in my organization for printing small number of labels, 1 or 2, and for large numbers i can just use regular printer. Generating the barcodes and applying them on labels is where i am sort of stuck. We currently use a shareware program for the generation part so i am now exploring the possibility of integrating said program in my VB.NET application somehow. Another free (that's the keyword here) option would be to use some of the free barcode fonts available and do some coding to generate the barcodes myself. As far as labeling, would it be possible to somehow get the generated barcode and paste in a Word document? The Word document in question could be a label template of sorts. Word docs are easy enough to print. thanks all.
  13. hey folks, i am looking into purchasing a new barcode scanner for the application i am working on. can anyone recommend any good ones? i'll also need to draw/generate barcodes in my application so i guess it would be nice if i could get some sort of a bundle, something like barcode scanner that comes with user control for generating barcodes and printing them on labels. any ideas? thanks all.
  14. i need to have barcode reading/drawing functionality in my VB.NET windows application. i have this scanner here, but i've never messed with stuff like that before so i am kind of in the dark about how to handle this whole thing. anyway, i had a question: i assume the scanner comes with some sort of scannig software for reading barcodes, but i'd like to be able to read barcodes directly from my VB.NET app, so the question is: can i use the software that comes with the scanner in my VB.NET app or do i have to have some kind of different software (like User control maybe), or do i have to code it my self or what? also, for drawing i'd like to avoid using any third party tools since they cost money. is there any free solution? thanks much.
  15. here is the problem i am having: I have a form and in it i have a ListView control with CheckBoxes set to true, i.e. there is a check box by each item in the ListView. so what i want to be able to do is when a check box is checked to change the BackColor of the item checked. so my CheckedItem routine looks like this: Private Sub VendorsListView_ItemCheck(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemCheckEventArgs) Handles VendorsListView.ItemCheck 'Variables declaration. Dim checkedItemIndex As Integer 'Variables initialization. checkedItemIndex = e.Index 'If the item is currently unchecked change its color to 'NavajoWhite, otherwise to white. If e.CurrentValue = CheckState.Unchecked Then VendorsListView.Items(checkedItemIndex).BackColor = Color.NavajoWhite Else VendorsListView.Items(checkedItemIndex).BackColor = Color.White End If End Sub now this works for all items but the first one in the list, basically if i check the check box on the first item nothing happens, but it works fine for every other item in the ListView. I noticed it has something to do with which ListView item is selected because if, after the form is loaded, i select any of the ListView items and only after that check the check box on the first ListView item it changes its BackColor fine, but if i try to check off its check box right off the bat without selecting any ListView item, then it does not change the BackColor. Any ideas? That's VB.NET, btw. Thanks.
  16. oh ok, that makes sense. there is another problem though, the function AlignAlpha will be called from several different forms and it needs to be flexible enough to where it would be able to receive a parameter Object reference to any of those different froms. For example, if i am calling AlignAlpha from the form CourseSelPanel.vb then it should be able to take an Object of type CourseSelPanel as input, if i am calling from another object called ShippingPanel.vb then it should be able to take ShippingPanel Object as an input and so on. i tried declaring the input parameter as a Form, i.e. something like this: Sub AlignAlpha(ByRef FormToInitialize As System.Windows.Forms.Form), but that didn't give me access to the specific methods for the different forms calling the function. Then i tried declaring is as an Object, i.e.: Sub AlignAlpha(ByRef FormToInitialize As Object), but that only gives me access to one method, GetType. what can i do? thanks.
  17. hi folks, i have this sub-routine that needs to be able to take an Object as a parameter. so the routine looks something like this: Sub AlignAlpha(ByRef FormToInitialize As System.Windows.Forms.Form) ..... End Sub and then i have this form called CourseSelPanel.vb and within it, i need to be able to call the sub-routine AlignAlpha and pass the object CourseSelPanel itself as a parameter. so i guess something like this: Friend Class CourseSelPanel Inherits System.Windows.Forms.Form ............... AlignAlpha(pass CourseSelPanel as a parameter???????) ............... End Class How do i do that? Thanks all.
  18. hi all, i get the following error in my VB.NET app, which was by the way upgraded from a VB6 app: "An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Patroklos.exe Additional information: ImageList must be initialized before it can be used Unhandled Exception: System.Runtime.InteropServices.COMException (0x800A8B1D): ImageList must be initialized before it can be used at MSComctlLib.NodesClass.Add(Object& Relative, Object& Relationship, Object& Key, Object& Text, Object& Image, Object& SelectedImage) at Patroklos.CourseSelPanel.PopulateLevel(Int16 ContextLevel, Int16 ALevel, Int16 BLevel, Int16 CLevel, Int16 DLevel) in C:\Mentor\Source Code\mentor_proj\Patroklos.NET1\CourseSelPanel.vb:line 469" where line 469 is: Call StructureList.Nodes.Add(, , SubKey, DisplayValue, ImageValue) SubKey, DisplayValue, and ImageValue are all declared as String. StructureList is declared as follows: Public WithEvents StructureList As AxMSComctlLib.AxTreeView And ImageList was declared as: Public WithEvents ListIcons As AxMSComctlLib.AxImageList I think ImageList is already intialized since i have the following lines of code: Me.ListIcons = New AxMSComctlLib.AxImageList ..................... CType(Me.ListIcons, System.ComponentModel.ISupportInitialize).BeginInit() ..................... Me.ListIcons.Enabled = True Me.ListIcons.Location = New System.Drawing.Point(208, 424) Me.ListIcons.Name = "ListIcons" Me.ListIcons.OcxState = CType(resources.GetObject("ListIcons.OcxState"), System.Windows.Forms.AxHost.State) Me.ListIcons.Size = New System.Drawing.Size(38, 38) Me.ListIcons.TabIndex = 7 ......................... Me.Controls.Add(Me.ListIcons .......................... CType(Me.ListIcons, System.ComponentModel.ISupportInitialize).EndInit() .......................... any help would be appreciated.
  19. hey, thanks buddy, that worked like a charm. :-)
  20. hey all, i have this MDI child form in my application and i can't get its starting location where i want it. i've set the StartPosition property to Manual and then i set the Location property to some coordinates, but no matter what i put in there, the form always starts from location 0,0. anybody know what's going on here? thanks.
×
×
  • Create New...