Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I was able to convert the lib to vb 2010 and build it. Try taking the attached dll and dropping it on the toolbox in visual studio. I've used it in a couple of projects and it works just fine. It has the same properties/methods as a picturebox with a few extras.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

is what you're telling no shit?

Actually, I believe the correct phrasing would be "is what you're telling me not shit?" as in "either this is or is not shit". In any case, I still use the expression "no shit?", no matter how grammatically incorrect it may or may not be.

Or would that be "may or may no be"?

I believe I'll start drinking heavily now.

Stuugie commented: LoL, me too. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Keep in mind that chat is not the best option for getting help for anything other than the simplest problems.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I don't recall ever missing a day of school because of snow and from grades 1-12 I lived in the country. It was 1/4 mile walk to school (not uphill and into the wind both ways though). My dad was superintendant of Public Works and our municipality had a great record for keeping the roads ploughed. And, yes, that probably explains all the beatings I got from the kids at school ;-)

Stuugie commented: LoL, we don't miss a beat in this province when it comes to snow. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I will criticize people whose first language is English and who express themselves so poorly that they can't ask a coherent question. For the rest I usually explain that I do not understand the question and suggest they get help with the translation.

I was taught that when sending a email/posting it was important to get your main point across quickly. The technique was to start with the phrase "I want to tell you that...", finish the phrase as appropriate, then delete the first six words. I used to work with someone who would start a reply (verbally) with "I think we should keep in mind, I mean, what I want to say is that, when we consider everything and you look at the big picture..." By the time he eventually got to the point (if there was one) everyone had tuned him out. His emails were eerily simiilar. You had to read through several paragraphs to figure out what the point of the email was. I usually ignored anything I received.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

and if you ask on facebook and twitter 95% no doubt thinks the entire universe revolves around them...

Mostly people in Toronto and New York.

[edit]
But we're kind of derailing this thread, arent' we?
[/edit]

diafol commented: yes indeed +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I can sympathize with people for whom English is a (distant) second language. They want help but have trouble describing the problem in an unfamiliar language. Simple communication is difficult enough. Technical communication is near impossible. However, I would rather put the onus on the person posing the question to ensure that it is clear rather than on the community to try to make sense of the question.

I get more upset with people who have the basic English skills but can't be bothered to use them.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I have XP Pro running on an IBM Thinkpad 40 with 512K RAM. The case is falling apart and the screen is glued in one position since the hinge broke. I'll keep it running XP until it crumbles.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It the OP manages to do this it would be the very definition of a cache cow.

rubberman commented: Very funny Reverend! +12
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Just checking your profile. Can you clarify something? You mention

Pretty mad individual

Are we talking "monster raving looney" mad or "mad as hell and I'm not going to take it anymore" mad? Or possibly even "a little from column A and a little from column B"?

Just curious ;-P

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Saying someone has only a grade 8 education is not "dissing". It's merely stating a fact. It also does not attest to the state of her education or her intelligence. My dad completed grade 9 (in 1925) before leaving school to work on the farm. In spite of that he was extremely well read and continued to "self educate" for the rest of his life. In spite of his limited formal education he became the superintendent of public works, a municipal councilman, a member of the school board and an executive of the local YMCA. He also ran for parliament in 1953 (fortunately, he lost). He was one of the most intelligent and open-minded men I have ever known.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Have a look here and here.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You could use a BackGroundWorker control to execute the code in another thread.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Funny thing. I haven't checked on the reviews or ratings for Dark City in some years but I recall many bad reviews and anyone I knew who saw it really didn't like it. I see on IMDB that it has a 7.8 rating so it looks like it is finally being appreciated.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Funny if you are in the 1%. Not so funny to the rest of us.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

When you do

Dim myarr(2) As Integer

You are declaring an array of integers (indices 0, 1, 2). When you do

Dim myarr(2)() As Integer

You are declaring an array of array of integers. This structure can contain 3 arrays of indeterminate length as in

Dim myarr(2)() As Integer

myarr(0) = {1, 2, 3}
myarr(1) = {4, 5}
myarr(2) = {6, 7, 8, 9}
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I suggest using CTRL instead of ALT for two reasons:

  1. CTRL-ENTER is used in many other apps for this purpose
  2. ALT typically activates the menu
cambalinho commented: thansk for correct me ;) +2
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can specify the sort order when you retrieve the records by using the ORDER BY clause in the query.

SELECT * FROM mytable ORDER BY fieldname
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

EA used to produce great software. They created some of the best software released on the Amiga. However, from what I hear about them these days they are pretty much evil incarnate.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I had a similar problem. I have lost some hearing in the higher frequencies and was looking for a way to adjust the sound over all applications. I found Equalizer EPO. You can download the 32 bit version here. There is a 64 bit version available as well but you may have to look around for it. You configure it using a text file. I have written a GUI front end in vb.net which I can post if you need it.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Seen it. Love it.

rubberman commented: Post a link? :-) +12
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Start with this

Dim sdate As Date = CDate("2014-01-01")
Dim edate As Date = CDate("2014-01-31")

Do While sdate <= edate
    If IsWeekDay(sdate) Then
        ListBox1.Items.Add(sdate & " " & WeekdayName(Weekday(sdate)))
    End If
    sdate = DateAdd(DateInterval.Day, 1, sdate)
Loop

Private Function IsWeekDay(d As Date) As Boolean
    Return d.DayOfWeek >= DayOfWeek.Monday And
           d.DayOfWeek <= DayOfWeek.Friday
End Function

This shows how to determine if a date falls between Monday and Friday.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I had to shovel steps into the snowbank that has piled up outside my back fence in order to get out of the yard.
2d6a69ed62f6dc76ed62cc7756e269fc

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

See this example (con is the connection object)

    Dim cmd As New SqlCommand("", con)
    cmd.CommandType = CommandType.StoredProcedure
    cmd.CommandText = "InsertRecord"
    cmd.Parameters.Add("@Details", SqlDbType.VarChar)

    con.Open()

    cmd.Parameters("@Details").Value = "Sample details 1"
    cmd.ExecuteNonQuery()
    cmd.Parameters("@Details").Value = "Sample details 2"
    cmd.ExecuteNonQuery()
    cmd.Parameters("@Details").Value = "Sample details 3"
    cmd.ExecuteNonQuery()

    con.Close()

Just replace the centre block (between con.Open and con.Close) with your loop.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Can I ask why, since you are a beginner, you are choosing to learn VB6 rather than VB.net?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What are the fields in the tables Salup and Salary? And when you say monthly salary do you mean total or per employee? Please provide an explanation as to what the fields are. The names Dsgn, Doj and Bp are not descriptive.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Perhaps the problem is that nobody understands what you are intending. For example, a 3x10 matrix, by any definition I am familiar with, is a structure with 3 rows and 10 columns. I don't know what definition you are using. Also, because this is a database forum, it would be helpful to show the structure of the tables you are working with.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

To be clear, that's vb.net 2008, not vb.net 8.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

A local columnist, Doug Spiers (a local version of Dave Barry) as part of a list of OUT and IN today listed the following (for American readers please substitute Congress for Senate)

OUT - The Senate
IN - Hardened street criminals
Because - If someone is going to steal our money and act like they are above the law, we'd rather they didn't lie to our faces and pretend they are doing it to make the country a better place for everyone.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Hard to imagine someone celebrating a harvest festival while I'm looking out my window at three feet of snow but have a great time. I had a look at the recipe for Pongal and when I translated (moong dal? jeerea?) I realized I had all the ingredients. I think I'll give it a go.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

He gave the English translation. Same thing.

oussama_1 commented: exactly +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

@sneekula

I've been retired since 2008. I saved for my retirement by paying into

  1. company pension plan
  2. Canada Pension Plan
  3. investments/bank accounts
  4. RRSP (registered retirement saving plan)

I am not a drain on society. I paid taxes all of my working life. And now I continue to support the economy by spending my retirement income. I drive much less (now that I no longer commute) so my carbon footprint is much smaller and I am a regular contributor on daniweb and on several other forums. So all in all I consider your "drag on society" and "putting up with" comments more than just a little insulting and insensitive.

As for the "major source of income for the medical profession" comment - I used the Canadian medical system very little until I reached retirement. I had major surgery in 1978 after a skiing accident then not much else other than the occasional bout of whatever until 2009 when I got thyroid cancer. I paid into medical insurance via income and other taxes for 40+ years so if you are one of those people who believes the system should now abandon me because I am a "drag on society" then you can kiss my a$$.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Wouldn't it make more sense to spell it "fonetik"?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Death doesn't have a point. Things just wear out.

Evolution doesn't have a point. Evolution is just a process that occurs (mostly) as a result of random mutations.

Life doesn't have a point. It just is.

However, I have a point. And that point is that things don't need to have a purpose other than those things that we create. It is perfectly valid to say "what is the point of a hammer" because we created hammers for a purpose. They are the creation of our intelligence. If you consider that the universe (and humans) were created by something with intelligence, i.e. God (a viewpoint that I do not share) then trying to find our purpose is tantamount to understanding the mind of God, something that religion tells us is beyond our ken.

You might as well ask what is the point of gravity or what is the point of time. However, Bill Cosby has been able to answer the question "why is there air" (to blow up basketballs).

What is the meaning of life? It's whatever you decide for yourself.

My reasoning here is that the fact that you are conscious was impossible to have not happened.

No. The fact that you are conscious means that it did happen, not that it had to. Does the existence of the play, Hamlet, mean that it was impossible for it not to have existed?

I recall reading recently that some physicists hypothesize that time is en emergent property of …

Ketsuekiame commented: Thought-provoking counter argument +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

From Wikipedia:

Piet Hein (16 December 1905 – 17 April 1996) was a Danish scientist, mathematician, inventor, designer, author, and poet, often writing under the Old Norse pseudonym "Kumbel" meaning "tombstone". His short poems, known as gruks or grooks (Danish: gruk), first started to appear in the daily newspaper "Politiken" shortly after the Nazi occupation in April 1940 under the pseudonym "Kumbel Kumbell"

Some examples

CONSOLATION GROOK

Losing one glove
is certainly painful,
but nothing
compared to the pain,
of losing one,
throwing away the other,
and finding
the first one again.

THE ROAD TO WISDOM

The road to wisdom?
-- Well, it's plain
and simple to express:
Err
and err
and err again
but less
and less
and less.

ASTRO-GYMNASTICS

Go on a starlit night,
stand on your head,
leave your feet dangling
outwards into space,
and let the starry
firmament you tread
be, for the moment,
your elected base.

Feel Earth's colossal weight
of ice and granite,
of molten magma,
water, iron, and lead;
and briefly hold
this strangely solid planet
balanced upon
your strangely solid head.

EXPERTS

Experts have
their expert fun
ex cathedra
telling one
just how nothing
can be done.

ON PROBLEMS

Our choicest plans
have fallen through,
our airiest castles
tumbled over,
because of …

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

A renowned atheist, Isaac Asimov, once said “There is nothing frightening about an eternal dreamless sleep. Surely it is better than eternal torment in Hell or eternal boredom in Heaven.”

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Nice to hear it works well on a fast PC. I'll have to get me one. Mine is a 2008 Dell Inspiron 1720. Peppy at the time but a little slow in comparison with the new stuff.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

As part of a project to manage my collection of photos, I wanted to add the capability of displaying a series of files as thumbnails. This posed me with three problems:

  1. how to preserve the aspect ratio of the original images
  2. how to generate the thumbnails without tying up the application
  3. how to avoid running out of memory

Because generating thumbnails of images is (I think) of reasonably wide interest I thought I'd write it up as a code snippet. To recreate the project, start with a blank form and add two buttons, btnDetails and btnThumbs. Add a BackgroundWorker control named bgwThumbs. Add a ListView control and dock it to the bottom of the form. Add one column (Name) to the Details display.

The only thing you should have to change in the code is the value of the global variable, Path. Set this to the fully qualified path of a folder containing image files. The variable, Filter, is currently set to ignore all files except jpg, png and gif.

When you run the application you will see the list of files in the specified folder presented in Details view. Click on Thumbs to see the thumbnails. If you have a lot of files you will see the thumbnails being displayed as they are generated by the background thread. Because the generation is being done in the background you can switch between views at will. The thumbnail generation will not tie up the GUI.

Further comments on the code …

pritaeas commented: Nice one, rev. +14
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That seems to have done it. If I change the code to

Private Function MakeThumb(file As String) As Bitmap

    Dim srce As New Bitmap(Image.FromFile(file))
    Dim dest As Bitmap = ResizeImage(srce, imgFiles.ImageSize.Width, imgFiles.ImageSize.Height)
    srce.Dispose
    GC.Collect()
    Return dest

End Function

Then the memory stays within reason. I can probably fine tune it to run GC.Collect() on every nth thumbnail gen rather than on every one.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

There was a great episode of an old show (WKRP In Cincinatti) where a local man of the cloth (who was leading a "moral" crusade to clean up the airwaves) told the radio station director that "Imagine" must not be played because it says there's no heaven. The director replies, "No. It says 'imagine' there's no heaven."

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

He was speaking to people who believe in heaven.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Back from Bulgaria?

Stuugie commented: LoL, yeah I really like Archer. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It is the custom of each community to form the minds of its young in a mold, introducing a binding agent of prejudice. The result is a remarkably tough substance capable of withstanding successfully even the pressure of many innate tendencies and instincts. In this way it has been possible to produce a man who against all his basic sense of self-preservation will voluntarily risk death for an ideal - but also in this way is produced the dolt who is sure of everything and knows what is 'right'.

John Wyndham

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

queue?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Here in Manitoba we just let the old farts keep driving until they kill themselves. Unfortunately they sometimes take a few of the younger folk with them. More often it's just a tree or a fence.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Tables do not need to be restricted to a one to one relationship. Databases would not be very useful if this was the case. For example, one student can take many courses. In that case you might have (as an example)

StudentsTable
-------------
StudentID (PK)
LastName
FirstName
.
.
.

CourseTable
-----------
CourseID (PK)
CourseName
.
.
.

StudentCourseTable
------------------
StudentID (FK)
CourseID (FK)
Grade
.
.
.

Because you need to have a primary key to uniquely ID a record in the StudentCourse table, the primary key (PK) is a compound key consisting of the StudentID and CourseID which are also foreign keys (PK) because they link back to other tables. In real life it gets much more compliciated because you would need at least two more tables for courses. The primary would detail each course but you would need another one-many because each course would be offered in multiple slots and multiple terms, and yet another to specify the prerequisites.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You have to strike a balance between normalization and usability. For a student table, you should keep basic information like

Name
Address
Telephone
StudentID (which will be used as a foreign key in other tables)
Status

In one table. This is information that is used to uniquely identify a student. Academic information such as courses, grades, etc. belong in a separate table. These other tables will refer back to the student table via the StndentID.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I think you should have thought of that before you started trolling. I suggest you take the time from now until your infractions expire and try to acquire a little maturity.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you have access to another computer you could download TrendMicro Housecall and burn it to a CD. Boot the infected computer from that CD to run.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

When the religious right tells everyone what Jesus would think and do and most people don't read the bible to find out for themselves what the book actually says then most people won't know they are being lied to. Similarly, if the NSA says "We've stopped spying on US citizens" and then classifies all NSA activity as top secret then the public will know whether or not they are being lied to. If a husband says to his wife, "I have never cheated on you" and the wife is blissfully ignorant of the truth then it is still a lie. Technically, yes, someone (the husband and the other woman) know the truth, so instead of literally interpreting the words consider the meaning.