|
||||||
| CSharp Tutorials Tutorials for C# |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
||||
|
Re: C# Tutorial: Annoy your buddies!
Lol, very funny! I remember back when I made some programs that would ask a question like:
"Are you an idiot?" <Yes/No buttons> Whenever you hovered over No it swapped places with the Yes button. +rep!
__________________
Questions and Answers | Online News and Social Bookmarking | Code and Text Collaboration General Chat Forum |
|
||||
|
Re: C# Tutorial: Annoy your buddies!
Lol didn't even think of doing that. But that's a whole different tutorial.
By the way, (this is for everyone), these tutorials I write- I'm actually writing them as I learn them. I literally sit down and think, "what do I want to make today?" I decide, then as I go along, I make my tutorial out of it. So seriously- I'm figuring all these things out as I write it, with no foreknowledge of how any of this works. SO.... If you see something that maybe I could shorten, something to make the code better, anything- say so.
__________________
Programmer (n): An organism that can turn caffeine into code. Programming would be so much easier without all the users. |
|
||||
|
Re: C# Tutorial: Annoy your buddies!
Nice tutorial, +rep.
@ Jordan: You mean like this(not in C# though)? Code:
Sub CreateForm()
Dim frm As New Form
frm.Size = New Size(250, 90)
frm.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedToolWindow
frm.MaximizeBox = False
frm.Text = "Question?"
frm.Show()
Dim lblQuestion As New Label
lblQuestion.Parent = frm
lblQuestion.Size = New Size(300, 30)
lblQuestion.Location = New Point(15, 5)
lblQuestion.Font = New Font("Arial", 15, FontStyle.Bold, GraphicsUnit.Point)
lblQuestion.Text = "Are you an Idiot?"
Dim btnYes As New Button
btnYes.Parent = frm
btnYes.Size = New Size(75, 20)
btnYes.Location = New Point(40, 40)
btnYes.Text = "Yes"
AddHandler btnYes.Click, AddressOf btn_Click
Dim btnNo As New Button
btnNo.Parent = frm
btnNo.Size = New Size(75, 20)
btnNo.Location = New Point(130, 40)
btnNo.Text = "No"
AddHandler btnNo.MouseEnter, AddressOf btnNo_Enter_Leave
AddHandler btnNo.MouseLeave, AddressOf btnNo_Enter_Leave
AddHandler btnNo.Click, AddressOf btn_Click
End Sub
Sub btnNo_Enter_Leave(ByVal sender As Object, ByVal e As System.EventArgs)
Dim strNew As String
If sender.Text = "No" Then
strNew = "Yes"
Else
strNew = "No"
End If
For Each Item In sender.parent.Controls
If Item.GetType.ToString = "System.Windows.Forms.Button" Then
If Item.Text = strNew Then
Item.Text = sender.Text
End If
End If
Next
sender.Text = strNew
End Sub
Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
MessageBox.Show("You're an Idiot", "Idiot", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)
sender.parent.close()
End Sub
|
|
||||
|
Re: C# Tutorial: Annoy your buddies!
Sort of but my program actually moved the buttons so the user could see them moving (but changing the text probably works just as well). Also, you have to take care that they can't exit the programing using traditional methods (X button, right-click and close, etc).
![]()
__________________
Questions and Answers | Online News and Social Bookmarking | Code and Text Collaboration General Chat Forum |
|
||||
|
Re: C# Tutorial: Annoy your buddies!
This service program is great! I would like to see it being capable of being stopped, but that does not change my review. This tutorial is as funny as well-coded.
![]() What do you say for a homework assignment? Would you add a stop capability to it?
__________________
proudly presenting my personal website and game website: F1Simulation. a thrilling Managed DirectX racing game... also my Ask Me look at my tutorials about cropping images and Mono: bundling Mono with programs and lambda expressions |
|
||||
|
Re: C# Tutorial: Annoy your buddies!
Quote:
Also- reason I say don't publish, as we all know, when you run a prog published from VS, you get that nice loading popup, etc. BUT, if you go into the bin/debug dir, that little exe doesn't even ask for permission to run... it just runs quietly. If you get psexec, here's an example on how to use it: Code:
psexec -u username \\hostname /i <directory svchost.exe is in> Code:
psexec -u markspp\<myusername> \\hostname MsiExec.exe /i \\<root server dir>\Public\IT\Deploy\install_flash_player_active_x.msi /q REBOOT=ReallySuppress
__________________
Programmer (n): An organism that can turn caffeine into code. Programming would be so much easier without all the users. |
![]() |
| Tags |
| annoy, c sharp, service |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tutorial - ListBox, ComboBox & Command button. | travy92 | VB Tutorials | 15 | 01-22-2010 10:13 AM |
| BlaineSch's SEO Tutorial | BlaineSch | Tutorials | 20 | 08-02-2009 04:26 PM |
| CodeCall Tutorial Contest #4 | Jordan | Announcements | 29 | 02-25-2008 12:25 PM |
| John's Java Tutorial Index | John | Java Tutorials | 0 | 01-11-2007 04:05 PM |
All times are GMT -5. The time now is 10:59 AM.
Amrosama.cc
Arekbulski.cc
Debtboy.cc
Guest.cc
Jaan.cc
James.cc
Mathx.cc
Tsz.cc
Vswe.cc