Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 3 online users. » 1 Member(s) | 1 Guest(s) Google, MorrissgoX
|
Latest Threads |
Looking for Adventure? Fi...
Forum: Random Discussion
Last Post: iHOMEz
11-16-2024, 09:18 PM
» Replies: 0
» Views: 513
|
Prettys Womans in your to...
Forum: Random Discussion
Last Post: iHOMEz
10-30-2024, 07:45 AM
» Replies: 0
» Views: 806
|
Prettys Womans in your ci...
Forum: Random Discussion
Last Post: iHOMEz
10-26-2024, 10:50 AM
» Replies: 0
» Views: 827
|
Beautiful Womans from you...
Forum: Random Discussion
Last Post: iHOMEz
10-19-2024, 02:48 PM
» Replies: 0
» Views: 925
|
Prettys Womans in your ci...
Forum: Random Discussion
Last Post: iHOMEz
10-06-2024, 05:00 PM
» Replies: 0
» Views: 1,083
|
Womans from your city - V...
Forum: Random Discussion
Last Post: iHOMEz
07-28-2024, 10:26 AM
» Replies: 0
» Views: 1,461
|
Supreme Сasual Dating - A...
Forum: Random Discussion
Last Post: iHOMEz
06-14-2024, 11:28 AM
» Replies: 0
» Views: 1,884
|
Beautiful Womans in your ...
Forum: VB.NET
Last Post: iHOMEz
06-09-2024, 09:23 PM
» Replies: 0
» Views: 1,690
|
Hangman in Rust
Forum: Other
Last Post: brandonio21
02-04-2018, 11:14 AM
» Replies: 2
» Views: 20,710
|
How to: Search files from...
Forum: VB.NET
Last Post: brandonio21
11-25-2017, 12:55 PM
» Replies: 1
» Views: 16,020
|
|
|
Trimming a label |
Posted by: brandonio21 - 06-28-2012, 11:42 PM - Forum: Code Snippets
- Replies (2)
|
|
I was contacted the other day asking to hand over a code snippet that trimmed a label if it was too long, making it display "...". So, I crafted a method that would do so!
Code: 'This method is intended to trim a label that is too long and replace it with
'dots where there would normally be stuff
'Made by Brandon Milton, http://brandonsoft.com
Public Sub TrimLabel(ByVal label As Label, ByVal MaxCharCount As Integer)
If (label.Text.Length > MaxCharCount) Then
Dim remaining As Integer = label.Text.Length - MaxCharCount
label.Text = label.Text.Remove(MaxCharCount - 4, 4 + remaining)
label.Text = label.Text & "..."
End If
End Sub
Usage:
Code: Dim Label As New Label
Label.Text = "Hello my name is Brandon"
TrimLabel(Label, 10) 'Trims to a max of 10
MsgBox(Label.Text)
With this usage, the output displayed is Hello ... which was trimmed from the original "Hello my name is Brandon"
Pastebin version: <!-- m --><a class="postlink" href="http://pastebin.com/PPgYrNqm">http://pastebin.com/PPgYrNqm</a><!-- m -->
|
|
|
How to search multiple files for one string |
Posted by: ryan - 06-18-2012, 01:53 PM - Forum: VB.NET (Visual Basic 2010/2008)
- Replies (1)
|
|
I am trying to make an app that will search multiple files for one string. I am able to make it search an individual file with the following code:
Dim numberinfile As String = IO.File.ReadAllText("C:\Documents and Settings\Owner\My Documents\Downloads\example.txt")
Dim target_string As String = TextBox1.Text
If numberinfile.IndexOf(target_string) <> -1 Then
MsgBox(TextBox1.Text & " was found ")
Else
MsgBox(TextBox1.Text & " was NOT found ")
End If
I just want to take out example.txt and insert an *.txt, which in python would translate into a wild card. I was told about using Directory.GetFiles to get a list of files within a directory and then loop it until all files are read in that directory. I have no idea how to do that and the person didn't really explain much other than give me that piece of information. I only know so much about VB since I took a course in high school on the basics and my college didn't bring VB up in any courses. If there is any additional resources I could use for VB knowledge feel free to post them here. Thanks
|
|
|
Syntax Highlighting.. |
Posted by: Fuzzy168 - 06-16-2012, 08:57 PM - Forum: Programming Help
- Replies (3)
|
|
I don't really know what is it called, but I think its called syntax highlighting. For example if you type "if" it will become blue while the other text stays black... How to do that.
|
|
|
Jonathan Blow, Creator of Braid, Discusses Game Design |
Posted by: brandonio21 - 06-15-2012, 12:19 AM - Forum: Gaming
- Replies (3)
|
|
After seeing the movie "Indie Game: The Movie" I have been closely following Jonathan Blow and his work. He recently had an interview in which he takes an interesting and noteworthy perspective on fun and game design in general. It's a great talk.
<!-- m --><a class="postlink" href="http://www.youtube.com/watch?v=I1Fg76c4Zfg">http://www.youtube.com/watch?v=I1Fg76c4Zfg</a><!-- m -->
|
|
|
Cool Little Game - tArena |
Posted by: brandonio21 - 06-14-2012, 12:29 PM - Forum: Java
- Replies (2)
|
|
Hey Guys! I just wanted to show off a cool little game that I made in Java. It can be found at:
<!-- m --><a class="postlink" href="http://brandonsoft.com/PersonalProjects/tArena/PlayableVersion/Applet.html">http://brandonsoft.com/PersonalProjects ... pplet.html</a><!-- m -->
Enjoy!
|
|
|
Software Versions Help |
Posted by: Vinwarez - 06-12-2012, 01:05 PM - Forum: Computing
- Replies (4)
|
|
Since I will probably seek for carrer in programming, in future, I cannot find ANYWHERE a nice explanation of published software version numbers.
There are four numbers: Major, Minor, Build, Revision.
The thing is, I don't know which one to change when I create an updated version of a software.
For example, I made my first Tic-Tac-Toe game which included only basics, but now I added 'MORE' button which extends the window and shows the information of the current game.
I don't know which number to change after that. I suppose you get it by now.
Although it might be irrelevant, but I would like to know.
By the way, examples would be greatly appreciated.
|
|
|
Create Your Character |
Posted by: Vinwarez - 06-12-2012, 12:46 PM - Forum: Share your programs!
- Replies (2)
|
|
Hello, fellow programmers.
This is a feature which I will use in the software I intend to create.
This application is in its Alpha stages which means it will change dramatically in future, but in a positive way.
List of things I intend to do:
- Make RGB Color Selecting Style
- Add Save, Load and Delete Buttons.
- Add changable Hairstyle, Eyes, Eyebrows, Nose, Clothes etc.
- Make a 3D Character Model.
3D Character model will be added when I learn how to implement and work with 3D engines in Visual Basic, I guess. You will be able to rotate it.
Any suggestions would be greatly appreciated.
Download Link:
http://tinyurl.com/cnv6khy
|
|
|
Comparing String Variables |
Posted by: Vinwarez - 06-12-2012, 12:03 PM - Forum: Java
- Replies (2)
|
|
Hello, everybody.
I don't remember when was the last time I logged in on this website.
Like that matters, right?
If you ever tried to write a Java application, I am sure you encountered this problem.
When I tried to compare two strings, it always gave me the wrong result, so I did a bit of a research and found out that I was doing it wrong.
Here is the code snippet that I used:
Code: if (string1 == string2){
System.out.println("The strings match!");
}else{
System.out.println("The strings do not match!");
}
And when I executed the application, the given result was totally wrong. Those two strings matched, but it said "The two strings do not match."
So, after the research, I've found out that what I did was checking if those two variables are EXACTLY the same. (This might confuse you.)
The code snippet for comparing the two strings is this:
Code: if (string1.equals(string2)){
System.out.println("The two strings contain the same value.");
}else{
System.out.println("The two strings do not contain the same value.");
}
This problem gave me really bad headache and I almost smashed my computer into the wall. I hope it helped someone.
Thank you for reading,
Vinwarez.
|
|
|
|