Comatose 290 Taboo Programmer Team Colleague

Right.

I don't know about knoppix, but I know that Red Hat 9 (and cooresponding Fedora Core) was able to load a USB drive (the little usb drives that hold like, 128, or 256 or whatever...that fit on a keychain) from a company called "scandisk". This USB drive loaded with no trouble at all with a simple:

mount -t msdos /dev/sda1 /mnt/usb

Again, I don't know if knoppix supports it, or has the driver for it. Something to look at is the lsusb command. Anyway, let me know what you figure out.

Comatose 290 Taboo Programmer Team Colleague

K. Change the & to a +

Comatose 290 Taboo Programmer Team Colleague

You can't save your files, because as far as knoppix is concerned, your CD IS the hard drive. It already actually mounts the hard drive... so where are you trying to save the files to? If you look around, under the mnt folder... or a similar folder, you may find the hd1 or 2, or 0.... and try to save there (chances are slim, if your hard drive is running windows [that is NOT FAT]). If you are, however, running 2000 or XP on your hard drive (which, I'm guessing you are), then you might want to try to save the programs to a floppy drive. If you go to a prompt (either through the Xwindows interface.... umn, new xterm or something) and make sure you have privs to do so (might require root access), you can execute the mount command (make sure a floppy is in the drive):

mount /dev/fd0 /mnt/floppy

Broken down, that says "I want you to take the disk that is in the floppy drive, and associate the directory (folder) /mnt/floppy with it." /dev/fd0 is device floppy drive 0 (the first one). Now, if the disk is formatted as a dos or window disk, you may have to tell it that it is so. You can do that with the -t flag

mount -t msdos /dev/fd0 /mnt/floppy

You can (at a prompt) type in: man mount
and it will give you more information than you ever wanted to know about the …

Comatose 290 Taboo Programmer Team Colleague

:-|

I have an idea what you are refering to..... are you talking about adding your own custom menu to a program like excel? So that you can click something along the lines of "My Menu" and get a menu of your own? If This is the case, then drop me an e-mail... and we'll talk about solutions to this problem. You can e-mail me by clicking my name on the left, and choosing send mail.

Comatose 290 Taboo Programmer Team Colleague

This can most certainly be done in VB6, doing this in VBA (such as access, or VB within Access) on the other hand, is a whole different story.

Comatose 290 Taboo Programmer Team Colleague

helllooooooo? Does anyone know the answer to this mysterious and magical question? I have tried several programs to do this but none seem to work!!! Is there just a few lines of code I can use? Any ideas?
Thanks for your time even if you don't know the answer,
Pilky

It's been AGES since I've even messed with QBasic.... I am pretty sure there is a sound function (sound, snd, something like that) it might PLAY, but I don't remember. Anyway, you pass the function a value, a number of some kind, and it will play the sound. This has only worked through the PC Speaker for me, but it might work through real speakers. I'm guessing you might want to try something like... reading in the midi as binary, and passing those values to the function, in some kind of loop. I'm in Linux... so actually testing these out are ... well... you know.

Comatose 290 Taboo Programmer Team Colleague

There is nothing wrong with that code.... UNLESS:

1) the form that you are trying to load the image to is NOT called form1
2) the file "096.jpg" is NOT in the same folder as the EXE file you created.

Now, On the second note, (I don't remember the path, but you could do a msgbox app.path to find out), the file 096.jpg MUST BE IN THE SAME FOLDER as the program. If you make the program an EXE (file, make exe) then that EXE must be in the same folder as the picture file when the program runs, in order for it to work. If you are using the VB IDE (clicking start, and running it from within VB) then you'll have to know the path that it's running, and put the picture file there.

Comatose 290 Taboo Programmer Team Colleague

depends.... the point is, is that a protocol is a specific set of instructions that have to be followed in order to keep something working right. so, your computer has to follow a specific order for you to chat in IRC. There are a bunch of "front ends" that let you interface with it. You can download stuff to do it.... you can go to the chat on daniweb: http://www.daniweb.com/chat/ and you can use the "java client" which will load right inside the page. You can go to http://www.mirc.com and download a program that sits next to the time.... it all depends.

Comatose 290 Taboo Programmer Team Colleague

As far as I know, it was the very first protocol established to have instant communication over the internet. It's a very old and established protocol... there have been programs built for all different operating systems (mirc, bitchx, ircii) to interface with IRC. Even the earlier web page chats (like that of MSN and Yahoo web chat) were based on a modified version of the protocol.

Programmers: http://www.irchelp.org/irchelp/rfc/rfc.html

Comatose 290 Taboo Programmer Team Colleague

follow Tks's advice about the registry with the values... but instead of going to
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System

try:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\currentversion\policies\system

I've found stuff hiding in that one :)

Comatose 290 Taboo Programmer Team Colleague

Can you get to the properties of anything else? If you right click on my computer, or the network thingy, can you get it's properties window to load?

Comatose 290 Taboo Programmer Team Colleague

Does Anyone know if such a utility exists in Linux? A picture viewer that runs in text mode? I like to use links sometimes, and hate having to switch back to an Xinterface in order to see an image.... is there a textbased picture viewer?

Comatose 290 Taboo Programmer Team Colleague

A Couple of us stay in there fairly regularly.... Toba, Myself, Squires, Big K.

Comatose 290 Taboo Programmer Team Colleague

Use cookies. google it with javascript and cookies. There are a ton of functions for it.

Comatose 290 Taboo Programmer Team Colleague
cell_value = DataGrid1.Item(rowindex, columnindex)
Comatose 290 Taboo Programmer Team Colleague

There has been a lot of talk about getting QBasic to run on XP, with no luck.....however, someone had uploaded a file that mixed a couple of the needed programs to make it work....umn:

thread: http://www.daniweb.com/techtalkforums/thread798.html
download: http://divminds.250free.com/index.html

Comatose 290 Taboo Programmer Team Colleague

Well, That depends entirely on portability, and what you are after. If you want it to be contained within the EXE... so you don't have to try to keep track of such and such.jpg, then it would be better to do it in a picturebox. The drawback to this, is EXE file size, and loading time... but ultimately, it's a matter of what you are trying to accomplish.

Comatose 290 Taboo Programmer Team Colleague

Actually, Uniquestar, if you look through this thread, you'll notice that shell has been tried in both WScript and VB, and the solution to make it launch the EXE associated with the .extention was to use shellexecute.

Comatose 290 Taboo Programmer Team Colleague

It should either not work on both, or work on both.... have you tried copying the from home and bringing it to the school? (instead of the recreation)

Comatose 290 Taboo Programmer Team Colleague

Hmn.... ok. And You are sure that the .mdb is the same one that you are using at home, and not corrupted in any way? (I know it seems like simple stuff, but the best of us forget the simple stuff some times)

Comatose 290 Taboo Programmer Team Colleague

Are you sure the control is pointing to the same directory and file path as it does on your own computer?

Comatose 290 Taboo Programmer Team Colleague

The last do of buildexperimenttrial sub requires your attention, and is commented. The others that I could find have been fixed and commented.... let me know how it turns out....

By The Way, The only changes I made where in the module.

Comatose 290 Taboo Programmer Team Colleague

well.... there is something, but it's not easy. You COULD find a way to use objects (like a java chat, to IRC) which would be a java interface to IRC (sort of like the one here on daniweb). You might also consider looking at: http://www.aftermath.net/irc/
Which is a CGI that uses server pushes to force the IRC connection to stay open.... really whacky, and a TON of work to try to set up for your site..... but you see the result.

Comatose 290 Taboo Programmer Team Colleague

I'm guessing you have an "option explicit" specified somewhere. If that's the case then age is not defined.... you'll need to DIM age as integer, first, or Remove Options Explcit. ;)

A better explaination of what is going on is this...
You need to know the person's age. That's what's in the table. The person's age. So, you figure out the person's age, by taking today's year, and subtracting that other year, right? Ok, So, We've got the person's age. Now, we need to test the conditions.... is the person older than 50... etc, etc.

Comatose 290 Taboo Programmer Team Colleague

If I'm not misunderstanding, you want to make a web page, that works like a guest book right, or a news page or something that is virtually dynamic right?

Comatose 290 Taboo Programmer Team Colleague

ok, I'm assuming this is VB6, if you want to send me the code in a zip file, I'll see what I can do with it.... I'm not seeing why there is a problem, since colourx through colourx is globally defined (I'm assuming they are globally defined in a code module). Anyway, send me the project and the files in a zip file, and I'll sift through it, and try to debug it for you.

Comatose 290 Taboo Programmer Team Colleague

I actaully love the changes, I'm just not used to them. They only one that I have to take with a grain of salt is.... is that I'm now known as a posting whiz.... as opposed to a techie whiz. I liked being a techie :cool:

Comatose 290 Taboo Programmer Team Colleague

so, the usernames and passwords are stored in an access database?

Comatose 290 Taboo Programmer Team Colleague

There is a couple of solutions.... one is to put the picture in the same folder as the VB EXE that is going to be running it. And then use the code

form1.picture = app.path & "\picturename.jpg"

Another alternative, is to use a picturebox.... and set it's attributes to hidden. Set it's pictures property to the image you want. You should be able to get away without having to move the file around everywhere. Copy and paste.... you should be able to paste it into a picture box... but I'm not positive. Anyway, if you use a picture box, you could set the form with:

form1.picture = picture1.picture

Let me know what you think.

Comatose 290 Taboo Programmer Team Colleague

Are you sure the VB program is only reading 10 table names from the database, or is the treeview only displaying 10 items?

Comatose 290 Taboo Programmer Team Colleague

Well, changing the form color is pretty easy, it's just:

Form1.BackColor = vbBlack

For example..... you could use RGB

form1.backcolor = rgb(75, 110, 256)

But the key is: form1.backcolor. Use the menu editor to make a menu, then in the click event, change the form to the color specified.

Comatose 290 Taboo Programmer Team Colleague

Alright, let us know how it goes.

Comatose 290 Taboo Programmer Team Colleague

Post the code?

Also, I don't recall how much of a difference it makes, but you might consider changing (if it's in a module) public to global.

so:

global varname as whatever

Comatose 290 Taboo Programmer Team Colleague

this line: If thisyear - cmbDOB > 1955 will NEVER be true (2005 - anything in the 1900's)
what you need to do, is NOT compare by year... compare by the subtracted number. instead of thisyear - cmbdob > 1955, use your table:

*Over 50yrs- maximum mortage = 15yrs
*between 40 - 50 = 20yrs
*Between 30 - 40 = 25
*betwen 18 - 30 = 30yrs
*Under 18yrs - NO mortgage

age = 2005 - 1995 right? Age is 10 now..... so you can say
if age < 18 then.... we know it is, because the kid is 10, but you are comparing to whole dates. So like if 2005 - 1995 (which is ten) > 1955. The comparison, in english, says "if the age is greater than 1955 then." I wouldn't ever want to live to be 1955... I'll be honest. 70 is pushing it for me :)

Test it by age, not year.

age = thisyear - val(cmbdob.text)
if age > 50 then
     ' they are over 50
elseif age < 50 and age > 40 then
     ' between 40 and 50
end if

What do you think?

Comatose 290 Taboo Programmer Team Colleague

K.... let me know how it turns out.

Comatose 290 Taboo Programmer Team Colleague
ElseIf thisyear - Val(cmbDOB.Text) < 1987 Then
     lblMortgage.Text = "NO MORTGAGE"
End If

' /* What is this line all about!?!?!? */
lblMortgage.Text = thisyear - Val(cmbDOB.Text)

after you figure out your calculations, using the else if block..... you end your if, right? Immediately after that, you set lblMortgage.text (which, was set in the elseif block) to whatever thisyear = cmbDob.text is.....(which for 1995 is 10, because 2005 -1995 = X?)

Remove that last line:
lblMortgage.Text = thisyear - Val(cmbDOB.Text)

And it should work.

Comatose 290 Taboo Programmer Team Colleague

hmn, you could try converting the string to a number first. I'm not sure if .NET does that for you right off the bat or not. You might have to cast it, or you might be able to use val, like: thisyear - val(cmdDob.txt) > 1995 then?

Comatose 290 Taboo Programmer Team Colleague

I was wrong. I'm sorry. I was still operating under the rules of VB6, not .net. The Label is supposed to be .Text, not .Caption.... but instead of using just lblMortgage = try using lblMortgage.text =

Comatose 290 Taboo Programmer Team Colleague

Nah, I've got some example almost done... 3 projects.

Alright, I've got 3 VB Projects In that zip file. You should look at them in the order of: browser, example, cool.

Basically, the first one is just a browser with no navigation buttons or anything... it just loads up and goes to http://www.daniweb.com. Plain and simple. Goal: understand that VB Apps can have built in web-browsers.

Example, On the other hand, on form load launches an inputbox to get a string from the user. It stores it in a variable. It then makes a variable (called html) that stores a custom google page. (my own personal favorite). It has nothing but a form, a textbox, and a button. Plain and simple. The thing about this one, is that you see in the vb code, that whatever the person types in the inputbox, gets put into the textbox on the web page (by adding it in the HTML before it's written to the file).
Goal: understand that we can write our HTML file, with information from the user, and have that page load up. (you still have to click the submit button on the page for this one)

Cool, now, is the final project. It is basically Example, only it adds some javascript to the page that we write, AFTER the closing FORM Tag, but before the closing HTML Tag. The HTML That We Add, actually submits the page, using javascript with the forms …

Comatose 290 Taboo Programmer Team Colleague

Wow. That one made me think. The solution is to use pure API Calls to create the file. Which means, forget about the whole:

open "yada.txt" for input as #1
     'Stuff
close #1

You'll Have to use:

public Const GENERIC_WRITE = &H40000000
public Const GENERIC_READ = &H80000000
public Const FILE_ATTRIBUTE_NORMAL = &H80
public Const CREATE_ALWAYS = 2
public Const OPEN_ALWAYS = 4
public Const INVALID_HANDLE_VALUE = -1

public Declare Function ReadFile Lib "kernel32" _
    (ByVal hFile As Long, lpBuffer As Any, _
    ByVal nNumberOfBytesToRead As Long, _
    lpNumberOfBytesRead As Long, _
    ByVal lpOverlapped As Long) As Long


public Declare Function CloseHandle Lib "kernel32" _
    (ByVal hObject As Long) As Long

public Declare Function WriteFile Lib "kernel32" _
   (ByVal hFile As Long, lpBuffer As Any, _
    ByVal nNumberOfBytesToWrite As Long, _
    lpNumberOfBytesWritten As Long, _
    ByVal lpOverlapped As Long) As Long
    
public Declare Function CreateFile Lib _
   "kernel32" Alias "CreateFileA" _
   (ByVal lpFileName As String, _
   ByVal dwDesiredAccess As Long, _
   ByVal dwShareMode As Long, _
   ByVal lpSecurityAttributes As Long, _
   ByVal dwCreationDisposition As Long, _
   ByVal dwFlagsAndAttributes As Long, _
   ByVal hTemplateFile As Long) As Long
   
public Declare Function FlushFileBuffers Lib "kernel32" _
   (ByVal hFile As Long) As Long

Then use them in the code to open, write, flush, write and close the file.... I've always been a personal fan of the API :)

Comatose 290 Taboo Programmer Team Colleague

Alright:

http://www.digitalnemesis.com/ash/projects/picservo/SERVOTST.BAS
http://www.aaroncake.net/electronics/qblpt.htm

and to do this in Visual Basic (Maybe More Productive?):

http://www.aaroncake.net/electronics/vblpt.htm

Sorry I couldn't give you more of a link-list, or better description.... hope this helps some.

Comatose 290 Taboo Programmer Team Colleague

My Pleasure. You need any other help, I'll be here frequently.

Comatose 290 Taboo Programmer Team Colleague

Simply? Well, no. Is this being done with VB6 or .NET? Is This using Flat (text) files or database systems (ado, sql?). Is there a deadline right now?

Comatose 290 Taboo Programmer Team Colleague

I'm guessing lblmortgage is a label (not a textbox) and therefore, would require the use of .caption instead of .text and I'm guessing it's not a variable... so you should also add .caption to the others.... such as

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbDOB.SelectedIndexChanged
cmbDOB.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Dim i As Integer
For i = 1940 To 1995
cmbDOB.Items.Add(i)
Next i
End Sub

Private Sub btnMortgage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMortgage.Click
Dim thisyear As Integer = 2005

If thisyear - cmbDOB.Text > 50 Then
lblMortgage.caption = "mortgage years are 15"
ElseIf thisyear - cmbDOB.Text <= 50 And thisyear - cmbDOB.Text >= 40 Then
lblMortgage.caption = ("mortgage years are 25")
ElseIf thisyear - cmbDOB.Text <= 40 And thisyear - cmbDOB.Text >= 30 Then
lblMortgage.caption = ("You maximum morgage years are 25")
ElseIf thisyear - cmbDOB.Text <= 30 And thisyear - cmbDOB.Text >= 18 Then
lblMortgage.caption = ("You maximum morgage years are 30")
ElseIf thisyear - cmbDOB.Text < 18 Then
lblMortgage.caption = ("You are to young to get a morgage")
End If
lblMortgage.caption = thisyear - cmbDOB.Text

End Sub
End Class
Comatose 290 Taboo Programmer Team Colleague

Ok,

If you have an XP CD (or whatever version you ultimately want to install) then you need to put the CD in the drive, and turn off the computer, then turn the computer back on, and boot to the CD. This might require that you go into setup (you know, that whole, hit del to enter setup thing at the begining... it might be f1, or some other variation, but the idea is the same), and make sure that the first boot device is set to CD-Rom.... that way you know you can boot to the CD. Depending on what version of windows you will be installing, will determine the actual process... but at some point (I know in XP it does) you will need to work with partitions. There is a tutorial on installing windows XP, if you Click here It will take you to microsoft's walkthrough regarding installing XP. Remember To Follow the steps, that you need to delete a partion, and then make a new partition, using the max size. Then install on the newly installed partition....

Comatose 290 Taboo Programmer Team Colleague

Well, I would code this for you, but I don' t have any knowledge about BBChat at all... but as a web designer, you know that you can make 100 different pages that all call the same server side app (cgi, asp, etc). I can have 10 different pages, that all log me in to the same mail system, or 10 different pages that log me into a news post. I could use a different page for each day of the week. Friday's Logo could be a black page, with TGIF at the top.... Monday's could be white with WHY ME!?, and they are 2 completely different HTML pages....but they both do the exact same thing (log into a mail system). The same is true for bbchat. You can make your own HTML Page, that will let you post to bbchat.... it says "This Is My BBChat Page" instead of the standard junk that comes with bbchat (assuming it's so). Well, you could make your VB program actually write this page locally.... and then make your vb program, through code "surf" to this new page.... and submit it. This would submit the page to BBChat, and effectively post. You don't have a link to this bbchat do you?

Comatose 290 Taboo Programmer Team Colleague

No No, That little minor snippit is only an example, and nothing else. Since the form method is POST, It's not going to change the URL any.... so, to my knowledge, changing the URL isn't going to do any good. What you will need to do, is make you VB app, pretty much duplicate the PHTML page that SUBMITS the data to the server side.... An Example, is that I can make a page, that looks absolutely nothing like ... say, yahoo's mail page, but if I make my own page, and I make the same names (the same names that yahoo uses for the names of their username and password boxes) the same in mine... and I make my page's <FORM ACTION go to the same place as yahoo's.... I should be able to log in to yahoo with my own login page, right?

Well, if you make your own HTML Page or PHTML Page, that does the same thing as the bbchat page, then it should accept all the data you send to it.... effectively "duplicating" the effects of the original page. You use the internet control (it's a webbrowser control) to navigate to the page that your vb program made to duplicate the bbchat.... with me so far?

Comatose 290 Taboo Programmer Team Colleague

Normally I would have... I just am not thinking straight tonight. I can't delete it now :(, but thanx for the head's up.

Comatose 290 Taboo Programmer Team Colleague

If you can remember the name of your other account (probably "owner" or something similar) then you should be able to go to:
my computer
c drive (or whichever drive it's installed on)
documents and settings
and then into the account name that was previously used (in the first windows install)
and then desktop. All of your icons and everything should still be there.

Bad news.... all of the things that were installed, however, probably won't run... because when you reinstall windows, it erases, and makes a new "registry" which is a place of settings for windows to use. All of the programs that get installed use this mystical "registry".... and so the programs that were installed on the first windows installation, most likely will not work on the second.

I just realize how I responded to what you posted, and I apologize. I misunderstood your situation. The unfortunate event that you have recently encountered... sounds to me, like the only solution is to format the drive, and cleanly install windows again (without EITHER copy on the computer).

Comatose 290 Taboo Programmer Team Colleague

Oh Goodness,

I don't use it any more, but, you have to figure out if bbchat uses POST or GET, and that will change the way you have to go about doing this.... but the internet transfer control, basically just loads a web page. So, if the url, when you post a bbchat is something like this:

http://someserver.com/bbchat/bbchat.php?someuser=coma&somepost=fooey

or whatever the case may be.... then you'll need to construct such an URL in your source code, and then make the internet control navigate to that URL...so...

url = "http://someserver.com/bbchat/bbchat.php?someuser=coma&somepost=fooey"
browser1.navigate url

then you could use the events that fire (such as on complete, or whatever), and you'll know your post is complete. If BBChat uses a different method, then you may have to write your own HTML Page from within VB... and then navigate to it. If you link me to BBChat (so I can examine how it works) then I'd be glad to assist you further.