Jump to content
xisto Community

ViRuaL

Members
  • Content Count

    18
  • Joined

  • Last visited

Posts posted by ViRuaL


  1. I think tattoos are fine. They give you to express yourself very originally. Although you have to remember it will be there for the rest of your life, and there's no going back. Even the tattoo removal surgeries leave scars behind. But the insane "camoflauged in tattoos" is kind of disgusting to look at. A few small ones here and there are fine, but if there's more ink than skin it's a little disturbing...


  2. Yeah, clearing your cache will usually help. Your browser probably stored some information about Xisto's domain, and when it wanted to go to a subdomain that doesn't exist, it probably goes to the Xisto front page. So, the subdomain was created and it really existed, but your browser still had all that cache about that link going to Xisto's front page. Most browsers do that to save time when navigating around the web.


  3. This article will teach you how to get random strings for output to a label caption, or anywhere you want it to go.

     

    1. First we need to declare our string names:

    Private RndString(2)
    This declaration says there will be an array of strings called RndString, and there will be 2 strings in that array.

     

    2. Then, we need to create a function that will generate a random number.

    Private Function RandomNumber(rUpper As Integer, Optional rLower As Integer) As Integer' Generate random number between upper and lower bound values    Randomize    RandomNumber = Int((rUpper - rLower + 1) * Rnd + rLower)End Function
    This initializes the Randomize engine, then picks a random number between the upper and lower bound values that you specify.

     

    3. Now we need to define our strings. You'll most likely want them to be defined on form load, but if need be you may put them on a button click or something.

    Private Sub Form_Load()RndString(1) = "Yes"RndString(2) = "No"End Sub
    This defines our strings for later use.

     

    4. Now let's say you want to change a label's caption when a user clicks a button, to one of the random strings we have previously defined. The code would look something like this:

    Command1_Click()Dim RndNum As IntegerRndNum = RandomNumber(2, 1)Label1.Caption = RndString(RndNum)End Sub
    This is where the magic happens. RndNum is used to define the index of the string array, and we set it's value equal to a random number, either 2 or 1. Then Label1's Caption becomes the string index of whatever number was produced from the randomize engine.

     

    All done! If you need help with this code or anything else, e-mail me at ViRuaL@gmail.com


  4. Hello, I just got my new free hosted account. On the details of this hosting plan, it says it comes with SSH support. However, from the IP I was given for my account, when I log on with SSH I get the following:

     

    Shell access is not enabled on your account!

    If you need shell access please contact support.

     

    The whole reason I came here is because I need SSH support. If this actually doesn't come with SSH, I'd like to request it be activated on my account because I really need it for the whole purpose of this account (besides the fact of needing a website) is SSH support. I will continue to remain active here untill I get a response...

     

    ViRuaL@gmail.com


  5. Personally, I love this program I made for myself. What the following code will allow you to do is change the text of your start button (Duh). You can make it whatever you want, your name, a hobby, or even do some extra programming and get it to randomly cycle through captions every 30 seconds or so :D.

     

    Here is all the code you'll need:

    Private Const WM_SETTEXT = &HCPrivate Const WM_GETTEXT = &HDPrivate Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPrivate Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As LongPrivate Declare Function SendMessageSTRING Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As LongPublic Sub SetStartCaption(str As String)    Dim StartBar As Long    Dim StartBarText As Long    Dim sCaption As String    StartBar = FindWindow("Shell_TrayWnd", vbNullString)    StartBarText = FindWindowEx(StartBar, 0&, "button", vbNullString)    sCaption = Left(str, 5)    SendMessageSTRING StartBarText, WM_SETTEXT, 256, sCaption    Exit Sub    End Sub

    All this code does is find the start button in the explorer process, then there's a little code to send a string to it to change it's text. To use this, create a TextBox, where the user can enter what he wants it to be renamed to, and a command button, which the user will press to change the text.

    Private Sub Command1_Click()SetStartCaption Text1.TextEnd Sub
    And that's all you'll need to change your start button to whatever you want, with the restriction of about 5-6 letter words, due to size of the button. Sorry guys :D .

     

    If you need any help, or want specific information about what each line does, I can fully explain to you all you need to know. Just send an e-mail to ViRuaL@gmail.com

    Thanks, and I hope you enjoy playing around with this. :(


  6. What many of us do not know is that using a button on a form with the function "Unload Form1" or even clicking the X in the upper right corner is like pulling the plug out of your computer while it is still on. It may not exit the program cleanly and efficiently, may leave background processes running, or just give you unwanted errors by exiting improperly.

     

    All you need to do is unload all components, forms, controls, etc. upon unloading. Say you have 2 forms in your project, 1 component, and 2 controls. If these ojects are placed onto a form, unload them properly! For instance-

     

    Private Sub Form_Unload()Unload Form1Unload Form2Unload Component1Unload Control1Unload Control2End Sub

    This will make sure that all objects are properly unloaded instead of "dumping" them when you exit the program.

     

    Hope this helped you.


  7. This tutorial will go over how to effectively use the Replace function in Visual Basic.

     

    1. So you have a string. Whether it be a label caption, an entry in a text box by the user of your program, or an item in a combo box. Let's say this is a bad string, something you do not want to appear. For instance, a user types "X is gay" in a text box, and you want to change that to something else. You can simply have it be deleted, or replaced with another value.

     

    2. To make this work when a user types something in a textbox, you will need to use this sub:

    Private Sub Text1_Change()End Sub
    Then we'll use the replace function. This looks like:

    Replace(Expression, WhatToReplace, ReplaceWithWhat)

    3. Now we want to find the text "X is gay" in the textbox. Remember our Text1_Change() Sub? We'll now insert the following code inside that sub.

    Private Sub Text1_Change()Dim txttxt = Text1.TextIf InStr(1, Text1.Text, "X is gay") > 0 ThenText1.Text = Replace(txt, "X is gay", "User is gay")End IfEnd Sub

    4. Done! What this code does is look for the value "X is gay" in Text1.Text, and if that is greater than 0 (meaning true) it replaces text in Text1.Text with "User is gay"

     

    That's all there is to it. If you have any questions, feel free to e-mail me at ViRuaL@gmail.com. If you thought this was completely useless, feel free to flame it into oblivion.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.