Comatose 290 Taboo Programmer Team Colleague

So, This isn't a Question about VB?

Comatose 290 Taboo Programmer Team Colleague

If it's not too big of a hassle, could you attach the project in a zip file to your next post?

Comatose 290 Taboo Programmer Team Colleague

you have to do it in code on form_load, by setting the .text property to date.

Text1.text = date

For example.

Comatose 290 Taboo Programmer Team Colleague

If inverse, means backwards, which I'm pretty sure it does (unless you mean a literal xor of the ascii values, which, clearly you don't) then both examples that we have provide suffice.

Comatose 290 Taboo Programmer Team Colleague

Check This thread on sorting dates with other "junk" attached: http://www.daniweb.com/techtalkforums/thread41491.html, there are some examples in there on sorting, or some functions that might help you out.

Comatose 290 Taboo Programmer Team Colleague

That doesn't do it, because as long as there are ungrouped option buttons, regardless if they are a control array or not, you can only select 1 at a time. The way to make it so that you can have more than 1 option button selected at a time, is to set them up in different groups. You need a Frame control, basically. You put the option buttons of 1 group in a frame, and the option buttons to another group in a different frame, etc, etc. If you want to do it all programmatically, you can put each option button in it's own frame, and make the frame really small or something, and then on_click of each button, have it set all the other buttons to whatever you want them to be....

Comatose 290 Taboo Programmer Team Colleague

While that method works, he/she had mentioned the use of mid..... which is why I steered away from the strreverse function.... well done, however.

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

This is a list of the processes that my app does not stop from the process list. These are pretty much the bare essentials of windows:

svchost.exe
explorer.exe
crss.exe
spoolsv.exe
services.exe
winlogon.exe
lsass.exe
smss.exe
system
system idle process
Comatose 290 Taboo Programmer Team Colleague

That's weird. I'm sorry I can't help you.... everyone else who runs it has no problem, so I'm not sure if there is something specific with your PC or what.... if you want the source code, or if you want a list of the programs that it does NOT remove, I can do that for ya...

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

Hmn, I don't get that problem, and neither do any of the people I've refered to the link. if you are certain you have the vb runtimes installed, I can send you the EXE standalone.

Comatose 290 Taboo Programmer Team Colleague

What version of windows are you using?

Comatose 290 Taboo Programmer Team Colleague

:cool:

Comatose 290 Taboo Programmer Team Colleague

:-|

Comatose 290 Taboo Programmer Team Colleague

Did you read the sticky thread?

Comatose 290 Taboo Programmer Team Colleague

you could use onLoad in the body tag, like:

<BODY onLoad="formname.submit();">

And if you want to make the function you call wait a given amount of time, you could use "setTimeout" to have it wait a given number of milliseconds (I think it's MS).

Comatose 290 Taboo Programmer Team Colleague

Check This Thread: http://www.daniweb.com/techtalkforums/thread40595.html for a neat program. It shuts down all running processes, except for those that are required for windows to run stable. It also does NOT shut down services (such as AVG, Norton, or anything else that is a service).

Comatose 290 Taboo Programmer Team Colleague

We love all information we can get, but do me a big favor. Threads, and Lazarus, should have nothing to do with each other.... so let's not resurrect dead threads.

Comatose 290 Taboo Programmer Team Colleague

just use the Date function, which should return a date, and the time function, which I believe returns a time. You might want to look into the "format" string, so that you can decide the way it's returned (mm/dd/yyyy, hh:mm:ss).

Comatose 290 Taboo Programmer Team Colleague

Unless I don't understand what you are doing, this project should be what you asre after. The project has a label (for identification of what the textbox is), a multi-line textbox (for the information to be typed into), a frame (purely cosmetic), and a button. The project is fully commented, line by line, and section by section, but contains no error checking (for instance, what if the textbox is blank???). Step by step, it gets the drive that the path to the user profile is stored on (the drive the desktop is stored on). Then it gets the path for the profiles home (the parent to the desktop folder), and then it makes a variable with that information, that points to the destkop. Then it writes the information to a logfile on the desktop, and exits the program (using a graceful method of exit, instead of the END command, which is nasty when you get into bigger and funner things [like API's and keyhooks]). Good luck, and hope it helps.

Comatose 290 Taboo Programmer Team Colleague

An IRC Bot is a fun one to build...... or a web server. You could build an MP3 player, or a program to keep track of business information, such as clients, employees, accounts, etc. Another fun one, would be to build a web spider.....

Comatose 290 Taboo Programmer Team Colleague

We can help with problems, and you could even post pseudo-code, or even a description of what the part is that you are working on, and it's problem.

Comatose 290 Taboo Programmer Team Colleague

VB Express is .NET, moving thread there.

Comatose 290 Taboo Programmer Team Colleague

Right, The Clarification is necessary because in VB6, there are drastically different methods for using the functions in each. You can't declare an activex-dll and use it like you would kernel32.dll. You have to add a reference to an activex-dll in vb's IDE, where you must declare (like an API call) "standard" dll's.

Comatose 290 Taboo Programmer Team Colleague

Be advised, this type of .DLL is not a Real .DLL, but an activeX (COM) DLL. The difference has to do with dependancies, and entry points, which is well beyond the scope of this thread, and may need to be in a different forum altogether. For the sake of simplicity, however, know that there is a difference between a VB .DLL, and a "real .dll"

Comatose 290 Taboo Programmer Team Colleague

Thank you for following up with a solution. It helps in many, many ways, and it's not often that people do it.

Comatose 290 Taboo Programmer Team Colleague

I'm pretty sure regedit is supposed to be an EXE not a .COM file.... try regedit.exe, or regedt32.exe, but you should be somewhat concerned, not only for the name, but for the behavior of the regedit window. Make sure you have an anti-virus installed.

Comatose 290 Taboo Programmer Team Colleague

Speaking of which, can you still get the beta for vista?

Comatose 290 Taboo Programmer Team Colleague

Well, you could always look for .dll's that do system-wide keyhooks, and then trap the keysequence.... if findwindow returns 0, it did not find the window in question. You could always check for the classname of the window, and try it that way, but I think you are probably right about it not sending information to running apps. It might still respond to services, however, so you could try having your app run as a service in the registry, or look into building your app as a service. I would probably trap the keys with a systemwide keyhook, and discard the keypresses without sending them to the windows chain. Let me know what you come up with.

Comatose 290 Taboo Programmer Team Colleague

:-|

Comatose 290 Taboo Programmer Team Colleague

Well, The title has EVERYTHING to do with your question, now doesn't it?

Comatose 290 Taboo Programmer Team Colleague

:-|

Comatose 290 Taboo Programmer Team Colleague

Sure, let me know what you come up with.

Comatose 290 Taboo Programmer Team Colleague

Outstanding, marking the thread solved.

Comatose 290 Taboo Programmer Team Colleague

I would suggest sticking with listbox's. However, the ocx doesn't have to be in windows system, but MUST be registered in the registry (which would most likely also require permissions). The DOS command regsvr32.exe is the command that will register the componant (regardless of it's path) but again, the registry might be restricted. Also, a lot of newer windows installations (like 2k and XP I believe) will have the control already registered and in the system. There are a large number of variables involved in this, so you might take the simplest approach to this solution, and just use listboxes. I'm crazy, so I'd Have 2 versions of the EXE, 1 with flexgrid, and 1 with listboxes. Then I'd write a program to check if flexgrid is already on the system, and then check if it's registered. If it's not registered and on the system, then I'd try to install it on the system, and register it.... if that failed, I'd use the listbox version, but if it's on the system (or if the install for it worked), then I'd use the flexgrid version. It's a lot of work for something that should be fairly simple though.....

Comatose 290 Taboo Programmer Team Colleague

magic div's?

Comatose 290 Taboo Programmer Team Colleague

Oops, I don't have excel installed.... :(

I thought it was part of the vb project files, I'll check it out

Comatose 290 Taboo Programmer Team Colleague

Strange..... the good news is, you've removed the numbers.... so my problems are fixed.

Comatose 290 Taboo Programmer Team Colleague

Right. Exactly. Indenting isn't a big deal. In fact, it wasn't until recently that code-snippets became indented. I was used to copying code from the snippets, and indenting what was needed..... it's nice now not to have to, but that was never the issue. The issue I had all along was that the numbers got copied to the clipboard, even when the numbers were not highlighted.... The numbers made a mess of things in any of the IDE's used (VB, in my case). Even someone doing some hard-core code in notepad would be stuck having to strip out the numbers (assuming this happens to anyone else). The numbers actually got copied to the clipboard (it wasn't an issue as to what program I was pasting it into.... the numbers were there)... that was my issue.

Comatose 290 Taboo Programmer Team Colleague

Yes it did. See my first post's first attachment.

Lines 8-11 ;)

Comatose 290 Taboo Programmer Team Colleague

Umn, the numbers are gone..... the indenting works properly.

Now about them colors....

Comatose 290 Taboo Programmer Team Colleague

That is weird. I was under the impression that the numbers had no effect on the copy and paste operation... furthermore, the numbers do NOT get highlighted.... which is a real crazy situation, if someone (anyone) knows why this happens, PLEASE, let me know.

Comatose 290 Taboo Programmer Team Colleague

If you know the row, you can use objectreference.EntireRow.Delete (objectreference is a reference to a range, I think). Or something like: xlApp.ActiveSheet.Range("2:10").Rows.Delete, might work for you. First you'll need to loop through and make sure the row in question is in fact blank, and then just run a delete on it. This reference might be of some help: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaxl11/html/xlmthDelete1_HV03076813.asp

Comatose 290 Taboo Programmer Team Colleague

Code Tags, Please!!!!

Comatose 290 Taboo Programmer Team Colleague

I don't like having the numbers, (or the change in color) to the code snippets. While the idea is there for tutorial purposes (see line 5), it makes things a lot more difficult to copy and paste the code. While at first glance (in firefox) it seems that you are only copying the selected code (since the numbers don't get highlighted [see first picture attachment]), in practice, (firefox at least) also copies the numbers with the code (see second attachment).

I know that for me, I use code-snippets as a pretty regular part of my programming (hey, wasn't there a snippet for this...?), and it would greatly simplify my projects by just copy and pasting the snippet needed into my project.... If The numbers must absolutely be there, is there an alternative method to copy and pasting the code that won't include the numbers?

Comatose 290 Taboo Programmer Team Colleague

And the excel document.

Comatose 290 Taboo Programmer Team Colleague

Welcome, it will be nice to have you on the wagon.

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

I'm not sure why you need the sleep, findwindow returns a number (the handle to a window) and if it can not find the window, it returns 0. So, do until ret > 0 should work just fine. You may also consider using "doevents" which makes the program process other things temporarily before moving on your code. To answer you actual question, however, there is another API call, called "getdesktopwindow" which will return the hwnd (the numbers that windows refers to the window as) of the desktop to a long variable..

Something that you might want to look at, is the blockinput API call. This will help you I think, but there is a problem, that I'm still looking into, and that is how to disable ctrl-alt-delete with it.... it seems to block everything except for ctrl-alt-del..... so try this:

Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub Form_Load()
DoEvents
retval = BlockInput(True)
Sleep 10000
retval = BlockInput(False)
End Sub

This code blocks all input (except for ctrl-alt-delete, working on that) for 10 seconds..... you can obviously block for as long as you want, be it in a loop or whatever.... but be careful ;)