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.

Comatose 290 Taboo Programmer Team Colleague

In programming, there are always a number of ways to do something...

Comatose 290 Taboo Programmer Team Colleague

*Cracks His Knuckles*

Let's see what I got here:

http://www.aftermath.net/~coma/echelon.html

Comatose 290 Taboo Programmer Team Colleague

because you do not have aa.pps in the same folder as your program.... they MUST be in the SAME FOLDER in order for it to work.... when you click "file, make exe" you have to put that exe, and aa.pps in the same folder..... if they are not in the same folder, it will not work with app.path

Comatose 290 Taboo Programmer Team Colleague
Comatose 290 Taboo Programmer Team Colleague

Unfortunately I don't use office. I'll make a copy of it, and attach it that loads a notepad txt document, and you can modify the minor file name change and let me know how it works. You do, however, need to ensure that the .pps file is in the same folder as the EXE being run. It's a good idea to compile the program to an EXE (don't test it in VB) and make sure the EXE and the file you want to run are in the same folder.

Comatose 290 Taboo Programmer Team Colleague

command1.enabled = false ?

Comatose 290 Taboo Programmer Team Colleague

It probably couldn't find whatever.pps in the same folder you were running the program from. You did change whatever.pps, to the name of your presentation, right? And you did change form1.hwnd to a form name in your project right?

And Uh, You do have powerpoint installed, right?

Comatose 290 Taboo Programmer Team Colleague

If you are trying to do so client to client you are going to need the IP address of the other clients. You can do it with a list... like, save a text file with IP addresses, 1 per line, and read in each line of the file (each IP) into an array... then when you need to broadcast the info, loop through the array, and send it to each client..... or if you have a central server, you can just loop through all the connected sockets and post the broadcast. Never messed with System.Net, and since I use sockets at the lowest level I can find, I would never try to move to an .net oo for sockets.... but that's just personal preference.

Comatose 290 Taboo Programmer Team Colleague

Alright,

Here is the port scanner code I promised you, it's fully commented. Don't mind the ping sweeper that doesn't work, I haven't coded it yet, just started building it's interface, but do what you want with the scanner... the entire tpp is going to be open source. Enjoy.

Comatose 290 Taboo Programmer Team Colleague

I would have put it in a function... but you can put it as an action if you want....such as

<input type="button" value="hi" onClick="document.formname.submit();" />

or in a function.. because I like to test the form values with javascript BEFORE submitting it to the server-side.

function check_values()
{
     if (document.formname.sometextbox.value == "") {
          alert("How About A Value in sometextbox buddy!?")
          return;
     } else {
          document.formname.submit();
     }
}
Comatose 290 Taboo Programmer Team Colleague

that's a good place to start.... if you need any help with it, just post, or let me know.... I'll see what I can't do.

http://www.vbip.com/winsock/winsock_control_ssahmed_01.asp

Comatose 290 Taboo Programmer Team Colleague
dim wsh
set wsh = createobject("WScript.Shell")
login_name = wsh.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Logon User Name")

src = "C:\documents and settings\" & login_name & "\Favorites"
Comatose 290 Taboo Programmer Team Colleague

There has been a lot of talk about QBasic being a 16 bit programming language.... while later versions of windows are not. This causes a problem when trying to run a compiled EXE that's compiled for 16 bit..... there are threads on here regarding the same situation. Check under Forum Index at the top, then click qbasic/visual basic... you'll find a couple threads on using qbasic (exe's and ide's) with later versions of windows. (doesn't look like anything good).

Comatose 290 Taboo Programmer Team Colleague

Well, since I don't have much of your code, I'm going to throw a few concepts at you. I'm not sure how your network works, or if you are comfortable with the idea... but think of this.... you could create a server program that sits on the same computer as the database you are working with...and when there is an update to the database, the client will alert the server, then the server, will alert all the other clients. The problem you are going to find is that when all the other clients are told about the update, and they query your database, it's going to be hit with all these clients at once. The best way with that would be to have the client that updates the database tell the server program exactly what change was made, and then send the change to all the other clients. The clients then make the update to their local databases. You are still looking at limitations by way of the number and amount of changes that can be made at once.... You could tell each client program to wait a certain amount of time, and stagger that among all your clients so that the toll on the database isn't that immense. I'm not sure about your limitations on bandwidth either... so that might be a bad idea (using a central server).

That's how I'd do it. I'd build a central server, and have that server monitor the updates in the database. …

Comatose 290 Taboo Programmer Team Colleague

You're talking about QBasic, on what operating system by chance?

Comatose 290 Taboo Programmer Team Colleague

The object file is a file of basically compiled binary. You can't view it in an understandable way..... you could use a hex editor, or some other means of numbering to know what is going on, but for most people.... you might as well consider the object file the same as the EXE (they are not, an EXE is linked, where as an object file is NOT linked... but essentially, they are both compiled).

Comatose 290 Taboo Programmer Team Colleague

Ah.... pretty sure:

retval = ShellExecute(Form1.hwnd, "Open", app.path & "\whatever.pps", 0&, 0&, 1)

app.path references any location that your program is run from. So, if you make sure whatever.pps is in the same folder as your exe, it will work fine.

if you are unsure how the string looks for app.path, just do a msgbox on it.

Comatose 290 Taboo Programmer Team Colleague

I don't understand what you are asking. you can change "whatever.pps" to "c:\myfile.pps" or whatever.... and it will still work. Is that what you are asking? (the answer is yes... you can specify a path and file name)

Comatose 290 Taboo Programmer Team Colleague

the said javascript that cooresponds to the submit button, takes on the form: document.formname.submit();

Comatose 290 Taboo Programmer Team Colleague

oops, sorry

retval = ShellExecute(Form1.hwnd, "Open", "whatever.pps", 0&, 0&, 1)

don't forget to change "Form1" to the name of your form (any form you have), and change "whatever.pps" to whatever file you want to open.

Comatose 290 Taboo Programmer Team Colleague

outstanding.... I would suggest using the microsoft internet control. You can then generate in your vb app the URL, and pass the url to the internet control. This control effectively allows you to build "your own browser." using the internet explorer's browser.... if that makes any sense. It's more like, IE with your own wrapper, but.... you can always set it's visibility to false, and then navigate to the site.

The alternative is nasty.... a mixture of winsock and the http protocol :( , Let me know if you need some additional assitance.

Comatose 290 Taboo Programmer Team Colleague

we are talking about submitting data to a bbpost (web page?) with a visual basic app?

Comatose 290 Taboo Programmer Team Colleague

the way to go is the shellexecute api.... it launches the default application for the specified file. It's how a lot of VB app's launch the default web browser to visit a specific URL (or whatever the case may be). ShellExecute is powerful, it can run an EXE or figure out which program to call for a specific extention!

thread reference (possible answer): http://www.daniweb.com/techtalkforums/thread18470.html

Comatose 290 Taboo Programmer Team Colleague

that's going to be pretty difficult, but it can be done. What you need to look at is called API's, but, until you know a fair amount about the concepts and structures of programming... it's a little more advanced. If you want to look into it for youself, look up API's, and findwindow, with movewindow. That is how I would do what you are trying to do. I'd use findwindow, to get the hWnd of the window that you want to move, then I'd use movewindow to move the window away from the right. Then I'd dock my app to the right, and use movewindow again (for the window that we first moved) and move it to the left side of my app. If you need further assistance, by way of code or advice, just ask or you can e-mail me by clicking my name on this page, and sending e-mail. Let me know what's going on.

Comatose 290 Taboo Programmer Team Colleague

I'm not very clear about what you are trying to do here.... elaborate clearly please.

Comatose 290 Taboo Programmer Team Colleague

in a module

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

then in your button or whatever

retval = shellexecute(0&, "whatever.pps", vbnullstring, vbnullstring, 1)

It's off the top of my head, but that should work.

Comatose 290 Taboo Programmer Team Colleague

Do you have any code already written, if so, send it to me. Also, are you trying to dock your app TO THE SIDE OF THE SCREEN, or dock your app to the right side of ANOTHER APP? This, I need to know.

Comatose 290 Taboo Programmer Team Colleague

the problem is you are trying to launch a PDF file, not an EXE file. If you want to open the pdf file, you'll have to use the path to adobe. Something like "c:\program files\adobe\adobe.exe aa.pdf" or something along those lines. the Shell function doesn't decipher extentions. It runs an application. Plain and simple. For a POSSIBLE solution to launching a program based on the extention (in cahoots with the registries, HKCR) you might want to look at the API call "shellexecute." That one does wonders ;)

Comatose 290 Taboo Programmer Team Colleague

:eek: hmn,ya know Dani, I'm thinking:

forum =~ s/crack//ig;
Comatose 290 Taboo Programmer Team Colleague

I'm just curious...... did you actually READ the forum rules?

Comatose 290 Taboo Programmer Team Colleague

Actually,

I wasn't referring to an access database (or even a database of any kind) so much as I was refering to the setup of your flat-file password file. You have it setup very similar to an .ini file. while this is doable, this is also a lot more difficult to work with in code. The Linux Password File (and most other password files [including flat files]) are setup in a fashion similar to: username:password

The : doesn't have to be the delimiter, anything can be really, but this makes coding a little easier (by way of arrays, with the split function). As for using your own function for encrypting the strings.... that too isn't going to be very secure. This is becuase in order to decrypt the strings, you have to have something constant. Perhaps considering hashes would be a better solution, or look for an activeX control for using PGP, or blowfish. I'll still help you either way, but for security basis, you may want to look into something like hashes, or pgp or blowfish.

Comatose 290 Taboo Programmer Team Colleague

So, You don't want the program to create a hash... you want it to create encrypted data. (a hash is an encrypted string [like a password], that CAN NOT be decrypted). Also, I'm just curious as to the format of the password file (why you are using that method) instead of the traditional standard method? I'll send you the code to do what you want when I get home (I'm working now), but I'm just curious as to the reasons why you chose A) to decrypt instead of hashing B) using that file format.

Comatose 290 Taboo Programmer Team Colleague

Yeah, Changing The Query shouldn't be a big deal at all. I'm not sure how you want to go about doing it... I would suggest using a bunch of checkbox's and set it up with the checkbox's. In the timer event, search for which checkbox's are checked, and then modify the query string to fit the requested action. If you send me what you've got, I'll help you to modify it into something a little more versatile.

Comatose 290 Taboo Programmer Team Colleague

could You Elaborate Just a little more on exactly what you are trying to get done here? You want to store the passwords in a textfile (or database) with the username and encrypted password?

Comatose 290 Taboo Programmer Team Colleague

Right. Isn't that what you are after? Storing them in a DB and then pulling up the pages without refreshing??

Comatose 290 Taboo Programmer Team Colleague

Well, Yeah.

It would certainly make the page loading extreme. However.... with CGI or ASP, the dynamic loading of pages into the DIV's would be a breeze. I'm not 100% sure what kind of site you are trying to put together here, that would have that many pages... but with some javascript and an IFRAME with a CGI, you could dynamically load the HTML Contents that are required INSIDE the DIV, and use innerHTML to set the information in the old div.... effectively using only 1, MAYBE 2 "view pane" div's.... and then dynamically loading the requested page into the div would be a breeze.

Comatose 290 Taboo Programmer Team Colleague

use CSS with DIV Tags. You can set a border to have a "view pane" type of div... which will be your "main screen" of the page if you will. For each new "page" however, it will require a new div. You set the CSS for the div's visibility to hidden (so you don't see the divs) all except for one. That one would be your opening page... or whatever. Then, when they click a link to "load a new page", you hide the presently visible div (or hide all divs) and show only the div that you want to be displayed. So, lets pretend that you have 3 things that you could show.... the opening page, the send me an e-mail page, and a links page to other sites. You have 3 div's, all the exact same size.... with the exact same properties. INSIDE of each div is different (it is the "page" that you are loading). When They click "mail me" or whatever.... it hides the other 2 divs (the main div, and the links page div) and shows only the contact me DIV. The page never reloads, but it has the appearance of a new page, because it hides and shows divs... making it look like a new page.

Comatose 290 Taboo Programmer Team Colleague

I'm sending you an e-mail right now

Comatose 290 Taboo Programmer Team Colleague
Comatose 290 Taboo Programmer Team Colleague

I've actually built one... The port scanner portion works (it's also supposed to have a ping sweep in it... but uh, I haven't coded the ping sweep yet). I'll attach the source code after I comment it.

Comatose 290 Taboo Programmer Team Colleague

Ok, As it turns out, it depends on if you are written to a new file, or appending data to an existing file..... writing data to a new file will be like this:

Dim tw As System.IO.TextWriter 
tw = System.IO.File.CreateText("C:\MyTextFile.txt") 
tw.WriteLine(text1.text)         'assuming the name of your textbox is text1
tw.Flush() 
tw.Close()

However, If you are writing to an existing file....

Dim sw As IO.TextWriter 
sw = IO.File.AppendText("C:\MyTextFile.txt") 
sw.WriteLine(text1.text)
sw.Flush() 
sw.Close()

So, You have to know if you are writing to an existing file or not, to determine how you will go about writing to it. If You want to do either, regardless if the file exists or not, you could do an if statement with File.Exists("c:\MyTextFile.txt"), which should return true or false depending on if the file exists or not.

Whew!

*Wipes His Forehead*

Comatose 290 Taboo Programmer Team Colleague

Ooops.... yes it should be.

Comatose 290 Taboo Programmer Team Colleague
Dim oFile as System.IO.File
Dim oRead as System.IO.StreamReader
oRead = oFile.OpenText(“C:\sample.txt)
oWrite.WriteLine(text1.text)
Comatose 290 Taboo Programmer Team Colleague

I know you can use the shellexecute api, I'm not 100% sure of .NET supports the shell command (I know VB 6 does, that's what I use), but you can try this (you need to know the name of EXE file that you want to launch... if you right click the shortcut for the file: iTegno Mobile Office Suite, and go to properties, it should tell you the path of the executable file that you want to launch). Then you could try it with the shell command as this example:

shell "c:\windows\system32\sol.exe"      'this only launches solitaire

If that does NOT work, due to some conflict with vb.net, versus vb 6, then you can try this example (which uses vbscript, inside of vb.net [which I know works]):

dim wsh
set wsh = createobject("WScript.Shell")
wsh.Run "c:\windows\system32\sol.exe", 0, 1    ' launch solitaire... change this
Comatose 290 Taboo Programmer Team Colleague

could you elaborate a little more on the subject you are refering to?

Comatose 290 Taboo Programmer Team Colleague

Use a timer control. Set The interval to 20 seconds (20000, it goes in milliseconds), and when the timer control fires, you know 20 seconds have elapsed. Another solution, is to have the timer execute every 1 second (1000), and then keep an integer variable. Set The integer variable to 20 right off the bat, and every time the timer fires it's event (every second) decrement the variable: variable = variable - 1
Then do an if statement, and test the value of the variable. If it's 0, 20 seconds have passed. You could do this with a label, also, and set the caption of the label to the value of the variable in the timer event. This would show the user how much time is left, and keep your program in count.

I would post code, but I don't use vb.net (I don't like it's syntax). I use VB6... but the concept is still the same. So if you need any further assistance... just let me know.

Comatose 290 Taboo Programmer Team Colleague

Yes... yes you can.

Comatose 290 Taboo Programmer Team Colleague

You're very welcome ;)

Comatose 290 Taboo Programmer Team Colleague

The INPUT has to be within the loop, in order to loop through the entire file. Also, if you have records AFTER the record that is actually found, that are not containing the part number in strProdNo, Then lblDscrpt and lblCo get set to Not found and nothing. So, Pretend that you have a file with:

not what you want
not what you want
what you want
not what you want

Then The Captions Get Reset on the last line of the file, because it's not what you are looking for. You need to do 1 of two things here.... the best way is to beak out of the loop, before it finishes reading the file. So, Your code would look a little something like this:

Private Sub cmdGetInfo_Click()

strProdNo = txtProdNo.Text
Do While Not EOF(1)
	Input #1, co, part, dscr, ul

	If strProdNo = part Then
		lblDscrpt.Caption = dscr
		lblCo.Caption = co
		If ul = "UL1" Then
			imgUL.Visible = True
			exit do
		Else
			If ul = "UL2" Then
				imgUL2.Visible = True
				exit do
			End If
		End If
	Else
		lblDscrpt.Caption = "Not Found"
		lblCo = " "
		imgUL.Visible = False
		imgUL2.Visible = False
	End If
Loop
End Sub

I'm not sure if that will help or not.... drop a line and let me know. k?