• What do you need help with? Version 1
    5,001 replies, posted
[QUOTE=ZeekyHBomb;24346716]GUI in Visual Basic to track down the killers IP[/QUOTE] [url=http://guivbip.codeplex.com/]Too late[/url] :ohdear:
Okay, I've got a main form and then a smaller form that is activated (shown) inside the main form Via a button. How can I make this smaller form unable to move outside of the main form, like unable to be selected and dragged out of the form. :confused:
[QUOTE=VeryNiceGuy;24355765]Okay, I've got a main form and then a smaller form that is activated (shown) inside the main form Via a button. How can I make this smaller form unable to move outside of the main form, like unable to be selected and dragged out of the form. :confused:[/QUOTE] A very basic and sort of hacky way to do it is to check the position and size of the window to see if it's larger/outside the large frame, then set the position/size back to something that fits. I don't really have all that much knowledge with forms past properties and events.
How can i embed a midi file inside the .jar file? I have managed to do it with the images with: Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("resources/tileset.png")); and adding the files in a resources folder in the package folder but how can i do this with the music?
[QUOTE=robmaister12;24359035]A very basic and sort of hacky way to do it is to check the position and size of the window to see if it's larger/outside the large frame, then set the position/size back to something that fits. I don't really have all that much knowledge with forms past properties and events.[/QUOTE] If you mean what I think you mean, then I wouldn't say that's hacky. It's quite a nice way to do it really ;P
Ok, thanks. I suck at math so I'll do my best :v: [editline]12:37[/editline] I've got it working fairly nicely yet a little "hacky".. :v: [code] Private Sub WB_Move(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Move Me.Size = New System.Drawing.Size(300, 300) If Me.Left < Form1.Left Then Me.Left = Me.Left + 50 End If If Me.Right > Form1.Right Then Me.Left = Me.Left - 50 End If End Sub [/code] So it can't easily be moved off the main form! :smile:
Although this isn't a code related question, It does pertain to programming. So, does anyone have any knowledge of an English translated "Hot Soup Processor?" The site that had the translated version is gone (( [url]http://users.csolve.net/~keiko/HSP/[/url] )). Oh, and this is what Hot Soup Processor is: [url]http://en.wikipedia.org/wiki/Hot_Soup_Processor[/url]
Ok, I got it working! [code] Private Sub changeBack() Me.Size = New System.Drawing.Size(300, 300) If Me.Left < Form1.Left Then Me.Left = Me.Left + 50 End If If Me.Right > Form1.Right Then Me.Left = Me.Left - 50 End If If Me.Top < Form1.Top Then Me.Top = Me.Top + 50 End If If Me.Bottom > Form1.Bottom Then Me.Top = Me.Top - 50 End If End Sub [/code] [code] Private Sub WB_Move(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Move changeBack() End Sub [/code] :v:
Why not just have it like this? [CODE]Private Sub WB_Move(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Move Me.Size = New System.Drawing.Size(300, 300) If Me.Left < Form1.Left Then Me.Left = Me.Left + 50 End If If Me.Right > Form1.Right Then Me.Left = Me.Left - 50 End If If Me.Top < Form1.Top Then Me.Top = Me.Top + 50 End If If Me.Bottom > Form1.Bottom Then Me.Top = Me.Top - 50 End If End Sub[/CODE] [editline]07:32PM[/editline] Also for those of you that use XNA for the 360 If you create a game initially for the PC can you then easily just export it as a 360 game? As in would it be possible to create the game for the PC then once its done and if its good enough export/convert it to the 360 to submit it to the creators club?
[QUOTE=Richy19;24366108] Also for those of you that use XNA for the 360 If you create a game initially for the PC can you then easily just export it as a 360 game? As in would it be possible to create the game for the PC then once its done and if its good enough export/convert it to the 360 to submit it to the creators club?[/QUOTE] [IMG]http://www.abload.de/img/ss-2010-08-27_00.28.53q61p.png[/IMG]
[QUOTE=Pirate Ninja;24371688][IMG]http://www.abload.de/img/ss-2010-08-27_00.28.53q61p.png[/IMG][/QUOTE] Touché
[QUOTE=Agent766;24326397]What's a good library if I want to write directly to a sound buffer?[/QUOTE] [QUOTE=ZeekyHBomb;24338208]Using what language?[/QUOTE] lol rate me late. C++.
-snip- Nevermind, figured it out :v:
[QUOTE=Richy19;24366108]Why not just have it like this? [CODE]Private Sub WB_Move(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Move Me.Size = New System.Drawing.Size(300, 300) If Me.Left < Form1.Left Then Me.Left = Me.Left + 50 End If If Me.Right > Form1.Right Then Me.Left = Me.Left - 50 End If If Me.Top < Form1.Top Then Me.Top = Me.Top + 50 End If If Me.Bottom > Form1.Bottom Then Me.Top = Me.Top - 50 End If End Sub[/CODE] [editline]07:32PM[/editline] Also for those of you that use XNA for the 360 If you create a game initially for the PC can you then easily just export it as a 360 game? As in would it be possible to create the game for the PC then once its done and if its good enough export/convert it to the 360 to submit it to the creators club?[/QUOTE] I'm fairly sure you just need to set up game pad controls.
[QUOTE=Agent766;24377761]lol rate me late. C++.[/QUOTE] A bunch of libraries will turn up using Google. Look for one which can stream audio via a callback - or if you just have short sounds buffered sounds should be enough.
My friend is making a chat application and he needs a way for the user to send their IP address to the master server and the other users to retrieve it. The problem is that he doesn't have a master server :P So I was wondering if you knew any free services that would enable that? Using C# if that makes any difference. Also, I don't think there's any service that can be used for that specific purpose but that wouldn't be so hard to code in ASP or something right?
[QUOTE=Darwin226;24385789]My friend is making a chat application and he needs a way for the user to send their IP address to the master server and the other users to retrieve it. The problem is that he doesn't have a master server :P So I was wondering if you knew any free services that would enable that? Using C# if that makes any difference. Also, I don't think there's any service that can be used for that specific purpose but that wouldn't be so hard to code in ASP or something right?[/QUOTE] You can just look it up using the endpoints on the socket.
Yeeeeaaa.... about that. I've never really done any networking. Basically, he needs a way for all the users to connect to a server (just get the IP addresses of the users that are already logged it so he can establish a P2P connection). No actually traffic would be going through the server it self. Not sure but I think trackers in P2P networks do just that. So, is there a free way to do that?
Considering there are established chat protocols and clients, it's unlikely that you really need a master server. Assuming this was coded for experience or just the fun of it, just use your or your friends computer as a proof of concept that the master-server protocol would work. I faced the same thing about two years ago btw :P
Yes, of course it's only for fun and learning but if he used his dynamic IP as the master servers IP, others couldn't connect without him specifically giving us the IP. And considering him and I are the only two in the group that know anything about coding it would be a problem. I really don't want to go in depth explaining the reason, can you just give me a way to do it? I'm open to all suggestions but really, if you know any free service that does what I ask for, please tell me.
Like I said, just use your temporary IP addresses for a proof-of-concept. There's nothing really to it that it's better than the one you are using to communicate right now, is there?
There's always things like [url="http://www.no-ip.com/"]No-IP[/url] or [url="http://www.dyndns.com/"]DynDNS[/url] if he's using his dynamic IP.
DynDNS might just be the best option. I'll look into that. [QUOTE=ZeekyHBomb;24386234]Like I said, just use your temporary IP addresses for a proof-of-concept. There's nothing really to it that it's better than the one you are using to communicate right now, is there?[/QUOTE] Well, I used BSPlayer for music up until I made my own Music player that has everything and only the things I need. Reducing the used memory to a quarter of what BSPlayer uses and the CPU usage from 4-5% to 0-1% Not saying this will become our preferred means of communication but there's nothing wrong with having an optimistic attitude.
[U][B]C# :[/B][/U] Hm, is it possible to call the base class constructor AFTER the inherited class constructor? f.e. [CODE]class BaseClass { BaseClass( Vector2 direction) { } } class ChildClass : BaseClass { ChildClass(Vector2 startPoint, Vector2 endPoint) { Vector2 dir = endPoint - startPoint; base(dir); } }[/CODE] Because in my case, I have a quad class, and a laserbeam class, obviously the laser beam only needs start and end point. I could call the constructer like this: [code] class ChildClass(startP, endP) : base (endP - startP) [/code] but that would get messy with a lot of variables passed in.
[QUOTE=s0ul0r;24390541][U][B]C# :[/B][/U] Hm, is it possible to call the base class constructor AFTER the inherited class constructor?[/QUOTE] No.
Thanks.
[QUOTE=s0ul0r;24390541][U][B]C# :[/B][/U] Hm, is it possible to call the base class constructor AFTER the inherited class constructor? f.e. [/QUOTE] That wouldn't make sense. The base object wouldn't be constructed which would cause a lot of issues in your own constructor.
Well I suppose it's not that bad how it ended up now, not that complex: [CODE] class Laserbeam : Quad { public Laserbeam(Vector3 startPoint, Vector3 endPoint, Texture2D texture, float width) :base(startPoint + (endPoint-startPoint)*0.5f,Vector3.Backward,endPoint-startPoint,texture,width,(endPoint-startPoint).Length()) { } }[/CODE] [editline]07:52PM[/editline] [QUOTE=gparent;24390883]That wouldn't make sense. The base object wouldn't be constructed which would cause a lot of issues in your own constructor.[/QUOTE] That's not exactly what I meant, I meant the code inside the child constructer should be executed first. So that you pass in variables to the child constructor, in my example a start and end point. Then these vars get transformed into origin, direction etc. and THEN these new variables are passed into the base class to construct it.
[QUOTE=s0ul0r;24390890] That's not exactly what I meant, I meant the code inside the child constructer should be executed first. So that you pass in variables to the child constructor, in my example a start and end point. Then these vars get transformed into origin, direction etc. and THEN these new variables are passed into the base class to construct it.[/QUOTE] Right, like I said, that could break things. What if your code was to call objects in the base class that wouldn't be constructed yet? It's not a situation you'd want to be in.
The problem is that there's no guarantee that the derived class won't use a half-constructed super-class, and using uninitialized variables in C# is an error. There are languages that allow this kind of thing though, but C# is not one of them.
Sorry, you need to Log In to post a reply to this thread.