Search:

Type: Posts; User: VIP3R

Page 1 of 13 1 2 3 4

Search: Search took 0.64 seconds.

  1. Re: have a number, rearrange to the biggest possible

    All you need to know is the mid$() function, and u need to compare all the digits in the number and remember the highest one. When u find the highest one, delete it from the number, and put it first...
  2. Replies
    20
    Views
    950

    Re: Creating a recorder in VB6

    Well if you have the API Guide, then look at all the WAVE API functions. I'd post the code but it's damn long and I'm too lazy to read the necessary parts. If you want to search the net, try...
  3. Re: Getting file list from a directory and its subdirectory trial code.

    FSO is basically 3 lines of codes and it will replace 100 lines of API! Problem is, it seems slower, but I could be wrong. Some people are against FSO but I don't know why. Anyhow, press F2...
  4. Replies
    7
    Views
    491

    Re: Methods For Locking a File

    LOL always with the WHY. Maybe he wants to make a trojan and send it to his friend and lock the win.com file so that windows won't start! Actually, here's a little bit of truth to file locking. IT...
  5. Re: How to retrieve random questions from a database.

    here's a tip. If you don't want kids to get the same question twice on their exam, then make sure you register all the questions previously picked in a string and do a search everytime you generate...
  6. Replies
    17
    Views
    1,181

    Re: in startup

    man, checking all that means endless lines of codes. I can think of 20 places off the top of my head that you could use to start a program on boot. It's really rediculous that microsoft allows...
  7. Replies
    17
    Views
    1,181

    Re: in startup

    Maybe he wants this for a 3rd party app, in which case SaveSettings is useless.

    What you want to do is add a reference to Microsoft Scripting Runtime by clicking Project --> References, then...
  8. Thread: Square Route!!

    by VIP3R
    Replies
    8
    Views
    829

    Re: Square Route!!

    BTW..when I started programming, I start out in C++. So I used the pwr function to do multiplication. So when i switched to VB, I found an equivalent function. I didn't even know you could do 2^4...
  9. Thread: Square Route!!

    by VIP3R
    Replies
    8
    Views
    829

    Re: Square Route!!

    LOL...yeah, why is my 4 year old thread brought up? Oh well, on to my answer:

    YES IT DOES WORK FOR EVERY NUMBER :P
  10. Replies
    14
    Views
    828

    Re: waiting [RESOLVED]

    I like penagate's idea. I already thought of many of my programs that would have benefitted from his code. I had to change the programming of so many programs because of specific timing problems...
  11. Replies
    14
    Views
    828

    Re: waiting

    LOL try giving him code that declares the API first :P
  12. Replies
    14
    Views
    828

    Re: waiting

    '~~~~~~~~~~~~~~
    'PUT THIS IN A MODULE
    '~~~~~~~~~~~~~~
    Private Declare Function GetTickCount Lib "kernel32" () As Long

    Public Sub Wait(Time As Long)
    Dim StartTime As Long

    StartTime =...
  13. Replies
    5
    Views
    608

    Re: If statement not validating

    LOL you beat me to it.


    Thx for the input. Yeah the brackets, it all makes sense now. RESOLVED!
  14. Replies
    5
    Views
    608

    Re: If statement not validating

    No not necessairly. There's many different characteristics that allow for T/F validation. 0 is false, but everything else is true.

    Look at the following code:


    If 0 Then MsgBox "validates"...
  15. Replies
    5
    Views
    608

    Re: If statement not validating

    I gave up on this and decided to use the following:

    If lStart > 0 And lEnd > 0 Then 'Code goes here.

    Damn inconsistancies in VB are starting to piss me off.
  16. Replies
    5
    Views
    608

    [RESOLVED] If statement not validating

    The following code use to work before but no longer works anymore because of the last IF STATEMENT in the code. For some reason, it wants me to write it as:
    If lStart Then If lEnd Then 'CODE GOES...
  17. Replies
    8
    Views
    1,165

    Re: [RESOLVED] Strings not equating

    If Right$(MyString, 1) = chr(13) Then MyString = Left$(MyString, Len(MyString) - 1)


    That's one method, I don't know if it's the best method though.
  18. Replies
    19
    Views
    5,537

    Re: Detect when program is terminated

    OH, and to the post starter:

    You can make another app which continues to check if an EXE is running on an API timer. There's tons of code on this forum for checking if an EXE is running.
  19. Replies
    19
    Views
    5,537

    Re: Detect when program is terminated

    can you please attach a code example because I tested out what you said because I was interested. But it didn't seem to work. I initially thought that a message box wouldn't show because the app is...
  20. Replies
    8
    Views
    1,165

    Re: Strings not equating

    If things aren't working properly still, then use a loop to msgbox the asc code of every character in both string. This will help you see if they are identical or not. BTW, there are Option...
  21. Replies
    8
    Views
    1,165

    Re: Strings not equating

    try something like:


    If trim$(lcase$(s.TextFrame.TextRange.Text)) = trim$(lcase$(theSourceID)) Then 'Code goes here
  22. Thread: Text to HTML

    by VIP3R
    Replies
    20
    Views
    866

    Re: Text to HTML

    I don't think you understand what I mean. Referencing a DLL and Adding a Control are not the same thing. I asked you to reference "Microsoft Internet Controls", but you add the control instead.
    ...
  23. Replies
    14
    Views
    1,014

    Poll: Re: POLL: How Many Spaces Are in YOUR Tabs?

    LOL...microsoft....analysis. Those two words don't go in the same sentence.

    A tab to microsoft is basically half an inch (take a look at word, outlook, etc). The number 4 just fits that criteria...
  24. Thread: Text to HTML

    by VIP3R
    Replies
    20
    Views
    866

    Re: Text to HTML

    did you reference the DLL or did you add it as a component?

    I managed to produce the same error by adding the component. What you want to do is REFERENCE the DLL. Don't add the component. To...
  25. Re: Best fool-proof way to input time

    Enter what type of time? Is it user defined (does the user enter it)? Do you just want a method to enter a time that exists, such that it rejects something like 25:61:61 ?

    In other words, I...
  26. Thread: Text to HTML

    by VIP3R
    Replies
    20
    Views
    866

    Re: Text to HTML

    :S which line?

    It ran perfectly fine when I tested it :S. I have IE 6 sp2 which may play a major role in this error because IE 6 sp2 has had so many stupid upgrades done to it that it no longer...
  27. Replies
    13
    Views
    2,535

    Re: Can Msgbox act as DoEvents?

    MsgBox's don't halt processing. Your app is proceeding line by line in the same sub/function, but vb does have minor capabilities of multithreading. Therefore, if other subs/functions are running,...
  28. Thread: Text to HTML

    by VIP3R
    Replies
    20
    Views
    866

    Re: Text to HTML

    Here's a useful post :P.

    What you need to do is click the Project menu in the VB IDE, then click on references. You're going to have a huge list of things with checkboxes on the left. Scroll to...
  29. Thread: Text to HTML

    by VIP3R
    Replies
    20
    Views
    866

    Re: Text to HTML

    viewable in HTML? do you mean put it into a browser? if so, add a webbrowser control or launch an instance of IE, and use the code below.

    IE.Document.Body.InnerHTML = "your text goes here"
  30. Re: only allow ONE instance of my program

    Here's a tip: if this program is security intensive, then App.PrevInstance will not do a good job. All the person has to do to override App.PrevInstance is change the file's name to something else...
  31. Replies
    4
    Views
    569

    Re: Character set difference?

    Oh yeah, I use the URLDownloadToFile api but the app is IE dependant. But I decided to change the method I'm using to output text into IE.
    Instead of:
    echo "line1\r\n";
    I did:
    echo...
  32. Re: Internet Explorer ReadyState returns unexpected error

    Oh yeah, I've done things with the WithEvents code, but for this app, I don't need any events to be raised. So leaving it out might save me some valuable memory space :P. Or it might not, but WHO...
  33. Replies
    4
    Views
    569

    Re: Character set difference?

    Oh, the php file is as simple as
    echo "line 1\r\n";
    echo "line 2\r\n";
    echo "line 3\r\n";

    I figured out that if I use IE.Document.Body.InnerHTML, then the \r\n is converted into a space for...
  34. Replies
    4
    Views
    569

    Character set difference? [RESOLVED]

    Hey,

    I'm outputting a few lines from a PHP script. I use "\r\n" at the end of every line in order to start a new line. Now I want to parse the output line by line in a VB program, but for some...
  35. Re: Internet Explorer ReadyState returns unexpected error

    You're my hero, here's the fixed code. I also realized that I was using ">" rather than "<" in the if statement, which will return true 3 times very fast, and that's why it's going to the RETRY...
  36. Internet Explorer ReadyState returns unexpected error

    Option Explicit

    Private Declare Function GetTickCount Lib "kernel32" () As Long

    Public Function GetHTML(URL As String, ByRef HTML As String, Wait As Long) As Boolean
    Dim IE As...
  37. Replies
    47
    Views
    100,759

    Re: C++ VS Visual Basic?

    Put it this way. The speed of execution difference between VB and C++ is enormous. C++ leaves VB in the dust. A simple mathematical loop will execute in a fraction of the time that it does in VB. ...
  38. Replies
    6
    Views
    913

    Re: doevent...terminateEXE loop

    Well there's 2 things to concider:
    1. the type of loop you use Do While, or Do Until
    2. where you place the conditioning statement (ex: "Do until", or "Loop until")

    I forget the specifics, so...
  39. Thread: Active X Control

    by VIP3R
    Replies
    6
    Views
    429

    Re: Active X Control

    In a way, you have to have functions that act as a "bridge" between the program and the inner workings of the activex control.
  40. Thread: Active X Control

    by VIP3R
    Replies
    6
    Views
    429

    Re: Active X Control

    ooooops i made a mistake. Make a function, not a property. Properties can only take one parameter but functions take as many as you want.


    'Place the following in your ActiveX control
    Public...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width