Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
O

Otis_69

@Otis_69
About
Posts
10
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • hide console window
    O Otis_69

    yes. One, is file size, and i dont want the program to be loading all the stuff i dont need. File size saves time (downloading and running) and saving time means more users (most likley me and a bunch of friends) will want it to be fast, small, etc. Would it be possible to grab the process and set it to hid somehow through that? //Otis

    C# tutorial

  • Array object Empty
    O Otis_69

    no problem... All these other people may be guru's, and thats why they dont understand that you want a simple answer... Where as i just learned that stuff a few weeks ago in college, and im new to C#, i can help you on a more "noob" level (no offense, if any)... Thats the problem with smart people and trying to help others, they think that we know a shitload of stuff, when they gotta think like the person they are helping... :P I've seen it happen too many times, id ask something, and a whole bunch of guru's will come along and say "do this, do that" and it gets so complicated, they seem to think im whining, when i just cant understand, and then they tell me i cant program C# anymore because i have to know everything... then a someone with just a bit more skill comes along, and tells me what to do... and im satisfied. I say that noone should ever ask a guru what might seem to be a simple question to them. Well, thats just my little grudge, ill prolly get flamed for it, and called a whiner, when im just stating my opinion, with some facts :P I just ignore them :P //Otis

    C# data-structures question

  • hide console window
    O Otis_69

    I know, but i made a console program, its an irc server, and now i want to make it use a tray icon, so you can tell tyhe status of the server, but i already coded 75% of it in console, and i cba to switch to a windows application... Isnt there a compiler directive to hide the console? //Otis

    C# tutorial

  • Force termination of a thread
    O Otis_69

    Well, i finally figured it out... In the IrcBot class, i made the variable holding the connection public. Then, before i started the thread, i grabbed that connection, and stored it in a variable. Then when i want to abort the thread, i use the variable and disconnect, and then abort :D It is kinda crude, but it works :D //Otis

    C# question sysadmin help

  • Making a tray icon
    O Otis_69

    Thankyou for uhh... notify'ing me of that :P //Otis

    C# question

  • Array object Empty
    O Otis_69

    To determine if the object exists you do this: if(yourobject != null) { //object doesnt exist, do something about it } else { //object does exist } I hope you have the right word (exists) because an object that doesnt exist is just a name. If it does exist, then it has a refrence to a location in memory that holds the object. To test if the array is empty, do as the guy before me said, use yourarray.length() because by empty, i assume you mean the name exists, which holds a refrence to the object (so the object exists) but there is no data in the elements... //Otis

    C# data-structures question

  • Force termination of a thread
    O Otis_69

    What i did now, is i made an instance of a timer within my thread, and set the interval to 1 millisecond... System.timers.timer t = new System.timers.timer(1); Then i made the event handler thing t.Elapsed += new System.Timers.ElapsedEventHandler(t_Elapsed); and the elapsed method looks like this: private void t_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { if(System.Threading.Thread.CurrentThread.ThreadState.Equals(System.Threading.ThreadState.AbortRequested)) { connection.Disconnect("Gotta go!"); } } Why wont that terminate the connection & die when i call abort from the main thread? //Otis

    C# question sysadmin help

  • Making a tray icon
    O Otis_69

    Lets say i have a program, and i want ot be able to minimize it to the tray, so when the user right clicks on it, it brings up a menu. How would i do this? //Otis

    C# question

  • hide console window
    O Otis_69

    Hey, me again, just wondering iff anyone knows how to get rid of the console window... Im making my forms dynamically, using a console application, but if the console window shows, it isnt as attractive... //Otis

    C# tutorial

  • Force termination of a thread
    O Otis_69

    OMG, this is my second time writing this, cause last time i wasnt logged in, and i clicked submit, and it said i needed to login, so i hit back to copy/paste my post into notepad, and it was gone... arrgh. Anyways: I have a class, lets call it "IrcBot". Now, i instanciate it like this: IrcBot mybot = new IrcBot("server","channel","nick"); now, in my main class, i make a thread (or 10) all going to the same, or different irc servers... like this: Thread t = new Thread(new ThreadStart(mybot.connect)); t.Start(); seeing as there is no way to terminate the connection from the bot to the irc server, i cant terminate the thread, cause the thread is still doing something... In english, when i do t.Abort(); it doesnt stop and the bot is still in the irc server in that channel... How can i force the thread to stop regardless of whether its doing something or not? Thanks for the help :P //Otis

    C# question sysadmin help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups