|
Yeh
I looked at ownerdraw, was looking for a shortcut. Yeh right!
I finally figured out that you set the image size in image size.
The images are suppose to go in front of the text, this the view setting like files in a windows form.
I was able to center my image with a wider image, but then the first column shows the image.
So I guess for now, I'll just move the success column to the first position.
|
|
|
|
|
jkirkerx wrote: I looked at ownerdraw, was looking for a shortcut. I've often used it as such
jkirkerx wrote: So I guess for now, I'll just move the success column to the first position. Nice how there's almost always a clean and easy solution.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
How to Add DatagridView in ByVal ComboBox
|
|
|
|
|
|
I am attempting to create a list of lists so I can return a specific list when I reference list(index), for example. I created a custom class and am using it as the list type.
A subroutine reads through a text file (csv) one line at a time. The value in the line indicates the "section number" to which the rest of the line belongs, and all other values on that line are used to set certain properties in my custom class. (Confusing?)
Basically it reads through the lines, and if the first number is the same as the first number in the previous line, it processes the line and adds it to a list. If the number is different, it adds the list to the main list, then clears the list, and adds the current line to the new list.
And repeat until the end of the file.
Here is the code:
Dim EvalTopics As new List(of List(of customClass))
Dim sr As StreamReader = New StreamReader(BLAHBLAHBLAH)
Dim OldSec As Integer = 0, NewSec As Integer = 0 'Old and New Section Numbers
Dim seclist As New List(Of customClass) 'List to be added to EvalTopics
While Not sr.EndOfStream
Dim splits() As String = sr.Readline.Split(",")
NewSec = splits(0) 'Section # is first value
If OldSec <> NewSec Then
EvalTopics.Add(seclist)
seclist.Clear()
OldSec = NewSec
End If
Dim es As customClass = New customClass
With es
'assign the other values to various properties
End With
seclist.Add(es)
End While
EvalTopics.Add(seclist)'Add the last section
sr.Close()
After populating the lists, if I call up EvalTopics(0), I get the same as EvalTopics(3). In fact, every list I call up is the same as the LAST LIST ADDED.
Can someone point me in the right direction? At first I thought I was using lists incorrectly, so I tried an array of lists, then a list of arrays. Nothing worked.
|
|
|
|
|
Instead of
seclist.Clear()
use
seclist = New List(Of customClass)
Adding seclist to Evaltopics adds a reference, not a copy.
So it's necessary to create a new List after adding.
Cheers
|
|
|
|
|
Dang it... I KNEW that, too! I guess it is time to start drinking coffee again.
Thanks to both of you!
|
|
|
|
|
You don't get copies of Lists, or any other reference type, without explicitly making the copies. It's never done implicitly.
|
|
|
|
|
My question has a scenario like this..
Example I made a solution program in vb.net called BookProgram then the compiler for debug is 32bit or x86 and for such coding I simultaneously made also on that solution x64 compiler debug (/assume they were on bin folder)
So is it possible to put a code that design to hide the form x86 program and show x64 form program vice versa without errors even though made in one solution program?
That concrete example is based on an uninstaller program because the anycpu is based on the current bit system and programs are likely missing vice versa to 86x compiler.
|
|
|
|
|
I really hate to tell you this but I've read and re-read your post a dozen times and nothing in your post was understandable. I have no clue what you're doing nor what you're having a problem with.
|
|
|
|
|
You would need a third program that will launch either the 32 or 64-bit version as appropriate.
|
|
|
|
|
What type of program will be like to open either 32 bit and 64 bit?
|
|
|
|
|
If the build target of the program was x86 (i.e. 32bit), the program will run in 32bit mode both on x68 and on x64 computers.
If the build target of the program was x64 (i.e. 64bit), the program will run in 64bit mode on x64 computers, but crash when you try to start it on x86 computers.
If the build target of the program was "Any CPU", the program will run in 32bit mode on x68 computers, and in 64bit mode on x64 computers.
|
|
|
|
|
guys can someone help in this problem i have been trying to save image into access table but the code i using is not working. here is the code
Private Sub Loadpicture_Click()
Dialog1.ShowOpen
Img.Picture = LoadPicture(Dialog1.FileName)
Private Sub Save_Click()
SavePicture Img.Picture, App.Path & "\photos\" & txtfullname.Text & ".jpg"
MsgBox "image saved", vbInformation, "New Solutions"
Adodc1.Refresh
|
|
|
|
|
Your code "isn't working" because you are saving the image to a file, you're not attempting to save it to a database.
Having said that, it is probably the better option - save the image to a specific folder then store the name of the file on your database
|
|
|
|
|
In addition to CHill60's comments, you are displaying a "image saved" message, without any checks to see that you have actually saved it. I see this more and more these days and find it quite worrying.
|
|
|
|
|
Saving images into an Access database can be a very bad idea, depending on the version you are using. Earlier versions stored images as uncompressed bitmaps, even if the original image was in a compressed format, such as jpeg
It's much better to store the image on disk, and store a pointer (path and filename) in the databse, and load the picture at runtime
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Hi,
I've been using batch scripts to help automate pre-loads (pre configurations) of client computers for software installations. We support multiple software packages, from multiple program vendors.
What happens now is that the batch script asks a series of questions to "build" subsequent scripts to help with the automation. It works, but it's old-fashioned and brute force. Unfortunately, my programming background is batch and dBase, so I'm a little out of my depth. I'm up for a project, and would love to learn to program using this task as my educational trip!
Here's What I would like to do:
Have a script / application which starts a "GUI" to collect data (the variables used to install the various applications) and document the installation. Once done, the script should be able to SAVE The data to a file (thinking XML) and then fire off chained installations and or allow the technican to pick and choose what they would like to do (say something breaks mid-way through the chain, re-start at that point).
Is this something I should do with VBScript or a VB Application?
Thanks in advance for any help you can give me,
Scott
|
|
|
|
|
There are various installer programs available that will do all the hard work, and Google will find them for you.
|
|
|
|
|
Richard,
I've looked at a few and feel that the scope of our varied projects kind of precludes using them.
For example: Need to install 3 packages with command-line swithches
Need to apply registry "tweaks" to some based on the data locations found at the client site (we do not control this variable)
Need to apply patches based on end-user preferences.
The flexibility of our current setup is that it allows us to create / re-create on the fly while onsite. We are only onsite for the installation and don't necessarily have return visits to the location.
Thanks for your speedy response,
Scott
|
|
|
|
|
Well just about every other manufacturer finds that one or other of them works OK. If you feel that none of them meets your requirements then you have a long job ahead of you writing your own.
[edit]
I don't think this is a job for either VBScript or VBA, but for a proper programming language, like VB.NET or C#.
[/edit]
|
|
|
|
|
Yes, I was aware of that Richard, my question was would it be better to start it out in VB, VBScript, or perhaps you had a different recommendation. I specifically didn't mention using other vendor products. This isn't a speed-dependent undertaking, it's more of a learning process with a pay-off in the end in terms of having something custom and flexible for our small, but highly custom fishbowl.
Ok, I see you edited the response, thanks for the point. I've got some basic apps written in VB, so I'll most likely continue on using that. Thanks for your help and advice.
-Scott
|
|
|
|
|
It may be worth looking into AutoIT[^].
I have not used it in anger, so to speak, but have heard it recommended on a few occasions and the scripting language does seem to have the features you are looking for.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
HI, Guys
I am new at doing reports in VB.NET 2010. I saw so many tutorial on youtube which explains how to create reports in VS2010 using reportviewer, datasource etc. I saw that connection made by Datasource and then Fields are placed on report, then Create new form, place report viewers then select report from report source etc etc etc .
Basically tutorial explains how to create by report in VS by data source tools but what if I have to move or change path of Database (I use MS access for database).
I am able to do everything to generate report but i want dynamic connection string for report viewer, I am NOT using crystal report
How do I have database path @ run time, is there any link or video tutorial would be very help full.
|
|
|
|
|
Hi All,
I am new to here. I have a situation where I need to create zip files from 5k files but with condition, the size of the zip file should not be more than 2MB so. Here, what I am doing is, creating Numerous zip files from all the 5kfiles.
Is there any script, code already available for this task? Is it possible to achieve this?
Thank you In Advance,
Best Regards,
Arjun
|
|
|
|