Jump to content

Can someone please help me?

- - - - -

  • Please log in to reply
15 replies to this topic

#1
Scarness

Scarness

    Newbie

  • Members
  • PipPip
  • 10 posts
Hi i'm new here so i say hai too ^^
Recently i started making a program that will simple intract with the user for my gaming server.
It's in batch and i want it to have a nice looking GUI instead of just black window and text inside.
Can somebody convert the batch file into VB project and explain me how i can add more links in the converted version.
I tried working with VB but it's too much hard for me. :(

Attached Files



#2
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
Not to be rude, but you're probably not going to find someone to do the work for you. This is a programming help forum, and we'd be glad to help you with the questions you may have about VB. Can you tell me what problems you're having with VB? Maybe somebody can help you so you'll be able to do what you're wanting to do.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#3
Scarness

Scarness

    Newbie

  • Members
  • PipPip
  • 10 posts
It's just looks very complicated for me. :(
Well if none can convert it , can someone please post a tutorial on how to make a program with images that on click it opens a web page.
And beside that if possible opens a pop up which says the desired text.
Also some tabs so you could switch from "Useful links" to "Forum links".
Thanks for your time.

#4
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
As for the tabs, that's the easiest. Just use the TabControl from the controls toolbox. Use the TabPages property in the Properties window to customize the number of tabs and the labels on the individual tabs. You can use the visual editor to page through the tabs and add controls to each tab.

To make an image that your user can click on, drag a PictureBox control onto your form. Use the Image property in the Properties window to browse to an image saved on your computer that you want to use for this picture box. (Use the Import button in the Select Resource dialog box to get to the Browse function.) The picture format will need to be either .gif, .jpg, .bmp, .wmf, or .png.

Next, double click on the Picture Box control in the visual designer to automatically generate a Click event handler. Now, to make it open a web page when the user clicks on the picture, you can use this code:


Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click

    Process.Start("http://www.google.com")

End Sub


On your last question, if you want to make a popup message with your custom text, use this code:


MessageBox.Show("Your message goes here.")


Hope that gets you started. Since you're just beginning to learn VB, I would suggest to you that you don't immediately start with the project you currently have in mind. It sounds to me like you need to first learn the language and familiarize yourself with the IDE. You should first start with some basic tutorials to help you learn the concepts of VB, then, when you feel more confident, begin work again on this project you mentioned in your original post. A quick Google search for "vb.net tutorials" should give you thousands of results.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#5
Scarness

Scarness

    Newbie

  • Members
  • PipPip
  • 10 posts
Hm , can you help me in a other thing?
I want a button to start a game client but if the user uses the program on his first time he needs to read the rules , that pop out when he clicks "Start game" and on the window he needs to tick i agree and then he needs to press "Continue" inorder the game client to start.
If the user already read the rules once and it's his 2nd time using the program the rules wont pop up.
Thanks for your time.

#6
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
In order to do something like that, you're going to have to know how to store information on the client's hard drive, whether it be a file or the Windows Registry.

I could teach you how to do those things, but I think it would be better first for you to gain a basic knowledge of how to make forms and controls before you try to tackle file IO.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#7
liamzebedee

liamzebedee

    Programmer

  • Members
  • PipPipPipPip
  • 129 posts
I suggest you start working with a high level programming language. Batch is good for running other programs and creating fun little scripts but after a while you realise it is not meant for designing applications. I personally recommend C# or Java however it is up to you. My reasons for using C# in your problem is that its IDE can easily create buttons and handle events (Button Click). PM me for more info.

#8
Scarness

Scarness

    Newbie

  • Members
  • PipPip
  • 10 posts
Well , i dont want learn alot , i just need to make a simple launcher for my game server.
If anybody body can guide me trough it i'll be happy
Thanks for your time. :c-^_^:

#9
liamzebedee

liamzebedee

    Programmer

  • Members
  • PipPipPipPip
  • 129 posts
A simple launcher? Can you describe to me more about your project? Maybe there is an easier solution. It seems to me you just want an application with two buttons, one for the index page of the forums, the other for the index page of the forums. Then some added functionality after that.

In Java to open a URL in the default browser-
Launcher.java

import java.net.URI;

import java.awt.Desktop;

public class Launcher

public static void main(String [] args)

{


java.awt.Desktop desktop = java.awt.Desktop.getDesktop();

java.net.URI uri = new java.net.URI("http://google.com/");

desktop.browse( uri );

}

}


#10
Scarness

Scarness

    Newbie

  • Members
  • PipPip
  • 10 posts
Well , i want to make a simple application which has a few tabs , that's not a big deal , the hard part is that i want to make a button open another form OR a msgbox but with content that you can scroll , if the players ticks "I agree" the client of the game opens and if he launches the application again and pressing the same button , this time the form or msgbox wont open because he arleady agreed the rules ( Ticked (I agree)
I dont really care on which lanugage it is but i wanted to try it by myself but i fail.
If anybody could make me a tutorial on how to make a form or a msg box with a scrolling bar and content inside pop up when pressed on the button , and also , can anyone tell me how to save "cookies
" or something like that in vb?
Thanks!

#11
Scarness

Scarness

    Newbie

  • Members
  • PipPip
  • 10 posts
Sorry for double post but , i managed to do what i wanted but i have few other questions if i may ask.
I want to have a scrollbar in a richtext box , is it possible?
Also , i want to make a news thingy , if the server admin posts something on the website it'll go straight to the application , is it possible?
Thanks for your help! :c-laugh:

#12
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
To make a scrollable text field, just use the TextBox control, set it's MultiLine property to true, and set the ScrollBars property to the type of scrollbars you want, like this:

textBox1.Multiline = True

textBox1.ScrollBars = ScrollBars.Vertical

To store whether the user has previously viewed the terms of service or not, you can use a registry key. Here's a tutorial on how to store registry keys in VB:
Working with Windows Registry using VB.NET - CodeProject

Edit: Sorry, didn't see your second post.
Yes, you can use a RichTextBox control instead of a normal TextBox. The Multiline and ScrollBars properties will be the same as before.

If you wanted to have a news feed directly in the application, I would implement a simple RSS reader, and you could display some simple HTML retrieved from your feed in a RichTextBox.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users