|
Maybe you should have a look at the code that the winforms designer generates - it explains how you'd have to do it manually.
(expand the Form.cs file and open the Form.designer.cs file, then expand the "Windows Form Designer generated code" region)
|
|
|
|
|
Wow I can't believe I didn't think of that. Thank you very much you helped me greatly!!!
|
|
|
|
|
Can't always think of everything.. you're welcome
|
|
|
|
|
When u drag and drop a button , set its x, y location to 0 , set height width to 0 .. what would happen ??
Thats your issue right now. Just set these parameters and it will show up.
|
|
|
|
|
nik121 wrote: When that happens I am trying to make a different button take its place.
Why not just add the "new" button at design time and set its visibility to hidden? When the time comes to "create" it, just show the button. That will save you having to set all its properties at run time.
/ravi
|
|
|
|
|
nik121 wrote: Hello I'm new to C# so you might have to bear with me a little bit but here is my problem. I am trying to make a windows form so that when you press a button, all the buttons disappear from the form. When that happens I am trying to make a different button take its place. You might find this a strange thing to do... but I have my reasons . This is as far as I have gotten.
Another way to go is add all the buttons your going to use the first time around. Then decide which are to be visible and which are not.
If you're putting to a form, all the buttons will have they're properties shown in the properties tab. There you can get the individual poperties, including visiblity. I've got my properties in alphabetical order, just to find them, I hate searching.
Then just program behavoir of the buttons
Have a good time
L.
|
|
|
|
|
I was wondering if anyone had a tutorial or documentation they know of on how to work with ISO files in C#? I am interested in how to extract the files from an ISO file with C#, then I would like to learn how to burn an ISO to a cd/dvd...
Was just wondering where to start..
-- Edit: Just noticed I spelled extractor wrong lol
modified on Tuesday, July 7, 2009 9:53 PM
|
|
|
|
|
For burning cd's, I'd check IMAPI
As for the files in an ISO, google tells me that it's a file format that typically contains an UDF file system, but it was too hard to find information about that. The older ISO9960 standard[^] did feel like being found, so here's a link to that.
It's a pain to read IMO, but better than nothing, and it gives a place to start googling from..
|
|
|
|
|
k I'll start researching IMAPI and reading IMO. I'll also check out the link..
I was just curious.. I do some smaller applications around my agency and we don't really have anything to extract ISO files and burn them to disc. Curious how much it would be to create one
|
|
|
|
|
Many compression programs will extract ISO's, like 7zip and WinRAR, and all self-respecting CD burners can burn ISO's, so if you just need the functionality...
|
|
|
|
|
Well.. I have used MagicISO to extract ISO files and I like it, and I have used a free ISO burner (both seperate softwares)... but I am just more interested in making my own. Not that it will do anything different.. I just want the knowledge of how to do it.
I am working on my Bachelors in Software Development and have taken all the C# classes they have offered. I have to say that I am greatly disappointed in their teaching, due to everything they taught I already knew (plus more) from reading Wrox and Deitel books. They NEVER even touched things like threading (luckily I learned from the books lol).
I have not done things like thread pools and such though.
I am just trying to soak up what I can about C# because I love to write applications with it. I'm currently taking VB.net.... blah... I'm not really a fan.. but I guess thats a personal choice.
|
|
|
|
|
Well that's still better than here, they only had a Java course! Well that sucked. I only went to the first class and then had a 9.6 (out of 10) for the exam. They did do threading, but threading in Java is a complete joke, and they didn't do synchronization which is kind of a big deal...
When I asked them why not C# they said it was because there was not enough material for it yet - but that was clearly a lie, so I assume it was lack of funding or lack of knowledge with the teacher (which is actually rather likely, if you can take 2 hours to explain "if" then something is wrong)
So.. that was quite far off topic lol
Good luck
|
|
|
|
|
Well at least you was not Teaching the Teacher on C# after you paid 400 bucks on the course and books. I was really pissed. I spoke to the Dean about it, she said that I should have asked more about the class before taking it. "ASKED MORE!?!?" GOD for bid me assume! the teacher might know somehting about what they are teaching!!
|
|
|
|
|
Yeah thats messed up considering they make you take the beginning classes before the "advanced" ones.
|
|
|
|
|
LoL. Well it looks like your coding turned out.. your answering questions on here
|
|
|
|
|
What is happening is info from one child form is being received or listen to by the wrong child form.
The situ is one parent form and any number of child forms. Specifically this is a truck control system, all the the truck/child forms are the same. But the monitoring and controls for each are to be independent of the other's actions. Example one truck could be in neutral with a rpm speed of 800, while another truck is in 3rd gear with rpm of 1000. So the situation has to be contained within the logical confines of the individual childform/truck.
I've tried using access modifiers to there extent. Making things 'private' as much as possible, getting rid of as much 'static' as possible.
What is first sent is the info packet. Defined as: !!!780;125;1400;0;5000&&&
The truck sends back a string of data for processing, and as confirmation of what's wanted by the operator. The string looks like this:
I5000R0780G02O099C060V23.3W2440F099L4S01400P00000X126Y057B27.08H65253E01T01D0000_99!
Within the program I'm using a ID_Parser to strip/read out the identifier at the beginning of the string to make sure it gets sent to the right form. Actually creating a instance of the truck/chilform that the info belongs to. I had to do this because sometimes the sending form would receive info string from another truck. This routine does put the port_in into the proper truck and its accompanying array:
public static string[] Trux_Info = new string[20];
The letters designate different pieces of information 'I ' designates id of the truck in this case truck5000, the 'R' is rpm, 780, followed by gear and so on.
The transmission is by RS-232, on the parent form, constantly open. Each truck sends/ reads through this, and the buffers, in and output, is flushed after each use. I've tried individual comports per childform, but had unaccessible issues.
As I have ran out of ideas and test methods I asking if anyone sees what I'm missing.
Further definitions, test methods, and results are provided as an attachment.
Is there way to attach attachments, I have them already zipped.?
Thanks
|
|
|
|
|
None of this makes much sense. I can't work out how your long info string has anything to do with the title.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I've read that about 5 times and I'm still not sure!
So you have several external devices connected to the same comport (?) represented in your software as 'child forms', and all the control is done through one 'parent form' that holds the comport connection?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
In effect yes, each truck is to be timesliced, a chance to send and recieve data by itself.
The maincontroller, parent form, contains the comport feature. The parent form also creates an instance of each truck when its time for that particular truck.
I hope that clarifies. I have a zip file of a more defined situ. Unfortunatley I haven't found a place to apply an attachment.
Thanks for reply
L.
|
|
|
|
|
Hi,
Lecutus1 wrote: I had to do this because sometimes the sending form would receive info string from another truck.
That is the sentence I noticed in your post because unexpected data read from the serial port is indicative of a fault. The question is why is bad data being received? Where to route the response is relevant only when the data is good.
From your description each request that is sent is tagged with a truck ID. I assume that all trucks attached to the serial port will receive the request but only one will recognise the ID and respond using that same ID. Is that correct and can you verify that all the trucks operate correctly?
Clearly only one truck should be allowed to respond at a time as overlapping responses at the serial port would cause all sorts of trouble. Problems of this nature can be avoided by ensuring that a response is received for each request before a further request is issued. If this send-receive protocol is strictly obeyed then routing the response to the correct form is straightforward as the expected response ID is always known. If a situation ever arises where response ID != request ID then something has gone very wrong and the status of the truck is unknown.
Do you wait for the response to each request and check that a full response has been read before parsing it?
That is just a few things for you to think about. Let us know how you get on.
Alan.
|
|
|
|
|
Thanks Alan
As to the first question, I'm not recieving bad data, I've got a filter for that, I'm recieving data from another truck. Your absolutely right as far as write and wait for a response before moving to the next truck.
I'm still trying to get used to the timing of this RS232 and its behaviour.
Once again this was a case of overcooking the goose, in other words I did too much, too quickly when a a little less could have been used.
Thanks once again
|
|
|
|
|
I am doing a windows based project in which i come across a situation where i need to update the values in the database with the values edited in the datagridview control. I need the code for doing this.
|
|
|
|
|
praveenkumar_vittaboina wrote: I need the code for doing this.
Well, this is no code shop where you get the ready code.
What have done so far?
Break down your problem into small units, try to look in Google for the examples and still if you have difficult than pin point your problem so that some one can help you.
This will eventually make you a better developer too.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
|
Hello,
I have a problem with the accuracy of double.
If i have a lot of formula that look somthing like this :
double a = Somthing1();
double b = Something2();
double c = something3();
double Ans = a+b-c
And in one of the calc the answer for :
a = 2e-35
b=1
c=1
then the formula need to be :
Ans =2e-35+1-1=2e-35+0=2e-35
but becaue a will be very small number and c and b will be big number (1)
then Ans will be 0 because it will do this:
(2e-35)+1-1 = ~0+1-1=1-1=0
so if
ans = a+b-c != b-c+a
What can i do to solve this problem ?
|
|
|
|