
coldfusion244
Avatar/Signature-
Posts
269 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by coldfusion244
-
Yes, the code that mhsueh001 so nicely wrote in VB for you should do the trick.
-
How does it connect to the computer, does it have any instructions with it, ie API or examples?
-
No, I haven't worked with obtaining that but *someone* using these forums must know.
-
If there was a way that you could obtain the RAW UDP data then yes. Byte breakdown
-
I think the easiest way that you could do it in VB is to use IEnumerator and use listbox.Items.GetEnumerator() and set your's equal to it. Then say While(myEnumerator.MoveNext) Object oItem = myEnumerator.GetCurrent() End While something like that, i'm not sure of VB code.
-
It's giving you the error because "UP" is a string, whereas in the Items.Item() procedure it wants an integer and cannot implicitly convert that string to an integer. I would go about it like this : private void button1_Click(object sender, System.EventArgs e) { foreach(Object oItem in lb1.Items) { switch(oItem.ToString()) { case "UP": lb2.Items.Add("UP FOUND"); break; case "DOWN": lb2.Items.Add("DOWN FOUND"); break; case "NORMAL": lb2.Items.Add("NORMAL FOUND"); break; } } }
-
How can I populate an ASP form with values such as a username and password specified by an external program? For instance the user specifies a username and password, then say, every 5 minutes the program logs the person in and grabs all the new information (news, points, online friends,etc). I want to do this but i'm unsure how to populate the fields in the ASP page and then submit the form and get the reply. Any help is appreciated :D -Sean
-
Why not use Try/Catch/Throw/Finally...Link
-
What donnacha is trying to say (I believe) is that what if the person logged onto the computer and the person currently using it is different. Wouldn't they have two different data values in the database? For example if Molly was in accounting and Jan was in research, Jan couldn't access her research data from Molly's computer because Molly is logged in. So Jan would have to log Molly out and log back in as herself. Restart you're program and would waste much time in the process. If I am correct in my assumption it would make more practical sense to have space for a username instead of obtaining the person who is currently logged on (besides the huge security hole there).
-
Add a clickable link to a listview as an item...
coldfusion244 replied to Lanc1988's topic in Windows Forms
You wouldn't really need to imbed a new object into the listview. You could use the listview as it is and like I said check for which item was clicked and then have a function to start your web browser and send the tag(url) as the arguments. Although if you wanted to create a new object(possibly inherit from LinkLabel?) so that you wouldn't need to copy/paste/reprogram the function then I guess you could do that... Just seems like alot of extra work for a simple action/reaction. I am interested to know what Lanc did though, instead of using the listview. -
Getting Information From A Control Added At Runtime
coldfusion244 replied to coldfusion244's topic in General
That doesn't work... I get a compiler error. --EDIT-- Ok, figured out how to do it. This is probably the worst way possible to do it, so if you know a better way PLEASE tell me! Since there is only 1 textbox on each new tabpage I create I used the following: string b = string.Empty; foreach(Control a in tbselected.Controls) { if(a.GetType().ToString() == "System.Windows.Forms.TextBox") { b = a.Text; } } Glad I don't have many controls, or that would create some serious performance issues! -
Getting Information From A Control Added At Runtime
coldfusion244 replied to coldfusion244's topic in General
I know the name of the control, it would be "txtPass" + creport.iReportNumber; The problem I am having is how access it's data. Do I access it just like it was always there? -
Add a clickable link to a listview as an item...
coldfusion244 replied to Lanc1988's topic in Windows Forms
Why not just check which item was clicked and hold the url in the Tag info of each item. -
I'll get right on that :p ;)
-
Did you remember to build it first? Control + Shift + B before you press F5.
-
Hello again! I am in a quandry. I have a tabcontrol, on which I create a few controls. One of those controls is a textbox, for use to input a string of data. The problem I am having is that of getting the data from it. The code i'm using is: //create new tabpage, name it and label it TabPage tbtemp = new TabPage("Report: " + strtemp[2]); tbtemp.Name = strtemp[5]; clsReports MyReports = new clsReports(); //create a new report MyReports.iReportNumber = int.Parse(strtemp[5]); MyReports.strServerIP = strtemp[1]; MyReports.strPlayerName = strtemp[2]; MyReports.strReason = strtemp[3]; MyReports.strExtra = strtemp[4]; AllReports.Add(MyReports); tbReports.TabPages.Add(tbtemp); //start adding runtime controls Label lblServer = new Label(); Label lblPlayer = new Label(); Label lblReason = new Label(); Label lblTime = new Label(); TextBox txtPass = new TextBox(); //start setting the labels values lblServer.Name = "lblServer" + strtemp[5]; lblServer.Text = "Server: " + strtemp[1]; lblServer.Location = new Point(10,16); lblServer.AutoSize = true; lblPlayer.Name = "lblPlayer" + strtemp[5]; lblPlayer.Text = "Player: " + strtemp[2]; lblPlayer.Location = new Point(10,48); lblPlayer.AutoSize = true; lblReason.Name = "lblReason" + strtemp[5]; lblReason.Text = "Reason: " + strtemp[3]; lblReason.Location = new Point(10,80); lblReason.AutoSize = true; lblTime.Name = "lblTime" + strtemp[5]; lblTime.Text = " Submitted: " + strtemp[4]; lblTime.Location = new Point(7, 112); lblTime.AutoSize = true; txtPass.Name = "txtPass" + strtemp[5]; txtPass.Text = string.Empty; txtPass.Location = new Point(10,144); //add controls to the tabpage tbtemp.Controls.Add(lblServer); tbtemp.Controls.Add(lblPlayer); tbtemp.Controls.Add(lblReason); tbtemp.Controls.Add(lblTime); tbtemp.Controls.Add(txtPass); //finally show the controls lblServer.Show(); lblReason.Show(); lblPlayer.Show(); lblTime.Show(); txtPass.Show(); It's probably an easy solution, I googled for it but didn't find any answers for .NET. :( Thanks guys! -Sean
-
Haha, trueness! Just think, in 2007 there will be ANOTHER one... most likely. A new OS is coming (longhorn) new Office, just think you get to buy 3 $100+ pieces of software from them every 3 years! woohooo!
-
I did not realize that in the Asynch thread that I couldn't use my form's methods. So I guess now anytime I want to create controls I will need to add a delegate and use the Invoke command, and always pass it an object.
-
lol, have time for another question that undoubtably you have an answer for? After the server sends the client a trouble packet, I want to add the information to my tab control. Unfortunately When I try to add a new tab I get the following error "System.ArgumentException: Controls created on one thread cannot be parented to a control on a different thread." I know the sending and recieving is on a different thread, but I don't understand why I can't use data from the other thread. As always here is a link to the source. Here
-
Hi, I am new to .NET, and I want to incorporate sound into my application. In VS6.0 I used the API SndPlaySound to play wave audio files. Is there a feature built into .NET to allow sounds? The second part of my question is can you hear sounds using SndPlaySound API or the .NET built in sound functions even if you're in the middle of playing a DirectX based game. Should I just use DirectSound? Thank you guys :)
-
Textbox code to make certain things bold and different color
coldfusion244 replied to Lanc1988's topic in Windows Forms
I haven't used this control in .NET but I would venture a guess and say something like this: //set the bold for the username New Font("Arial",12,FontStyle.Bold); Text1.text +="\r\n" + strUserName; //set to normal for teh rest of the text New Font("Arial",12,FontStyle.Regular); Text1.text +=": " + strMessage; -
Once again HJB, you are unsurpassed in brilliance. The program works perfectly now! Since I will be using the client and a few friends of mine as well, I'd like to thank you by at least letting me put your name and url in the credits. You deserve much credit and have my appreciation! :D