|
yuxuanji wrote: CheckForIllegalCrossThreadCalls = false
and spend the next three weeks debugging when your app keeps hanging and crashing all of a sudden.
Very bad advice!
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:21 AM
|
|
|
|
|
I have a struct Range that wraps a couple of Int32s with appropriate methods and properties.
I also have a class RangeControl : Control that uses a couple of these.
I've extended both of these to generic versions so they can work with different types and everything is working fine except as soon as I change to RangeControl<T> : Control it disappears from the toolbox and I'm unable to manipulate the control in the designer.
I can do it all from code - but I was wondering if there's a way to get the designer/toolbox to play nice with the generic version?
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)
|
|
|
|
|
Hi,
I don't think you can, the way I understand it the compiler generates the code on the fly, but it needs to know the T type before it can do so. How could the Designer get around that?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Thursday, February 19, 2009 5:46 PM
modified on Sunday, June 12, 2011 8:22 AM
|
|
|
|
|
That's what I figured but I though it was worth asking.
I can work around it by having a Type field that is set to a default value in the parameterless constructor and pass that around internally but it's a messy solution.
Stuff the designer - real men do it in code anyway!
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)
|
|
|
|
|
DaveyM69 wrote: but it's a messy solution
yes, that is where you can outsmart Visual Designer
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:22 AM
|
|
|
|
|
hello I have a problem whit this programe i need the arry to send text of textbox to dtagrid of the diferent form
this is site were is th programme http://rapidshare.com/files/200128782/Programa_do_Stand_automoveis_2.zip.html
tanks for your help.
|
|
|
|
|
If you would like to receive an anwser on your question, please post some code with explicit bugs/flaws. If you can do that, we can help you, because nobody will download a file (to dangerous + to time consuming).
Second, make up a good topic-name, people have to see what they can expect.
|
|
|
|
|
Yep you are having real trouble with this, 3 weeks, 3 questions and you still have not moved, I suggest you give up and try some other form of entertainment, C# is obviously beyond your capabilities.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
OK - this is the last time. I had a quick look and I think I see what you want.
To attempt translation... you have several TextBoxes on a MdiChild Form. On a ButtonClick on that Form you want to send the contents of all the TextBoxes to a different MdiChild Form so you can populate a DataGridView. Is that correct?
If so, the first step is to get the data from the textboxes into a useable format in the Button's Click event handler. I would recommend a class instance with properties to hold each piece of data, but a string array or List<string> would do.
Next, you need to create a custom event like I showed you before. Raise that event like I showed you, also in the Button's Click event handler.
Next, in the MdiParent, after you have instanciated but before it's shown, subscribe to your custom event (the handling method should be created automatically for you).
You will also need a field to hold the reference to the form with the DataGridView.
In the form with the DataGridView, create a method or property that takes data in whatever format you decided in the first step and updates the DataGridView.
In the MdiParent's custom event handler method, call the other form's method/property (assuming it's not null) passing the received data.
Colin Mackay has a great article[^] - look at the section called Sibling to Sibling.
Now you have the principle, go ahead and try it, and post back with any specific problem.
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)
|
|
|
|
|
Please please help with this simple Q from a C newbie....I spent hours trying to find the answer online...
I want to run this on a linux box. Open a file containing a list of file names and then run a linux commands on each of the list for example:
The file contains a list of files names eg:
test
test1
test2
test3
How do I code in C so that it opens the file and then foreach of the elements do a system command eg: ls
in perl it would be something like:
#!/usr/local/bin/perl
while(<>){
chomp;
$cmd="ls $_";
system($cmd);
print "$cmd\n";
}
Thanks in advance!
|
|
|
|
|
Hi,
this is the C# forum, C# is one of the .NET languages.
For plain old C you should post on the C++/MFC forum.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Thursday, February 19, 2009 5:47 PM
modified on Sunday, June 12, 2011 8:23 AM
|
|
|
|
|
Hi Evryone
I build WebService on Windows server 2003
when i try to connect from my C# program, it wright:
"Unable to download following files from http://11.11.11..."
is someone know whay ?
|
|
|
|
|
Impossible to say considering you don't show any of the code that is calling the web service, nor anything about the method you're calling, what it does, what it's supposed to do, ...
|
|
|
|
|
I only try to add web reference to my WS - and this is the message
|
|
|
|
|
In that case, you Google the error message ("web service add reference Unable to download following files from http")and you get this[^].
|
|
|
|
|
Does the .NET framework contain any classes that assist with caching data locally, and then automatically synchronizing that data with a website as soon as the machine is connected to the internet?
Adobe Air has direct support for this. I wonder if .NET has anything addressing this.
|
|
|
|
|
Nope. You either have to use a third party solution, or roll your own.
|
|
|
|
|
In a pc contain default hardware components. If i have add addtional components. while if the checking process will be taken on every booting time & detect any device add, if u have added to check and mismatched, the system will be come a shutdown. they matched means continue to loading OS.
And as what type of devices should be add to list out in the form of label.
To checking process using an serial number of products.
if u have use any type of database or various technique(registry, text file).
for example: already a pc contain 2 HDD normal. add another one will not boot the system.
|
|
|
|
|
Uhhh... what???
I didn't understand anything you said.
Are you asking if you can prevent Windows from booting if the hardware in the machine changes??
|
|
|
|
|
hai Dave Kreskowiak,
But i have Sorry for u haven't understand this question.very sorry for my poor English communication & and sending Questions.
my point is - simply say for - if anybody can change for my system parts, the system will not Boot. The default parts may be placed to return means no problem to boot&contiued,if any parts add or change my system set never boot.
my option is - each hardware parts contain a unique number.so i have used this NO to protect my system, unnecessary to anybody add an additonal parts or change it detect to use the serial no.
For Example: motherboard changed same brand, add 1 more Hard drive & cd drives or changing......
|
|
|
|
|
Basically, you're trying to copy protect your software. In my humble opinion, a fruitless effort.
If you're trying to use hardware serial numbers, you're wasting your time. Most manufacturer don't put serial numbers in their hardware, save for hard drives. But even using hardware is too unreliable and if your software breaks because someone had to replace a motherboard, you just lost a customer because you introduced more downtime to the system than was necessary.
If security is that big of a concern, look into USB security dongles.
|
|
|
|
|
hai Dave Kreskowiak, thank u for guidence.Because i haven't well Knowledge any one Field.Just i have learn intial stage.so guide me.
your solution is correct.But some times usb dongle has failure (or)usb port failure - what we do.
** i have want this type of basic & simple protection rules containing program.After i have changed your idea based program.
** Another one point is- i have using this type of progarm to protect for copy entire primary partition (c . Because the installed progaram files should be clone to copy and run on the another system.It contain a exact same motherboard or partial matched motherboard drivers another system.so it is run easily, so how to protect.
|
|
|
|
|
Member 4235601 wrote: your solution is correct.But some times usb dongle has failure (or)usb port failure - what we do.
Sure, you can get the motherboard or harddrive serial number(s) and use that. But, what if the mobo or drive fails?? The problem is the same.
You simply cannot protect your app against copy protection to the point where it is foolproof. It's been an industry pipe-dream for decades and continues to be such.
Member 4235601 wrote: Another one point is- i have using this type of progarm to protect for copy entire primary partition (c. Because the installed progaram files should be clone to copy and run on the another system.It contain a exact same motherboard or partial matched motherboard drivers another system.so it is run easily, so how to protect.
There is no way to protect against this. Yes, someone can close the partition/drive your app is on and put a copy of it on another machine. There's nothing you can do to stop it.
Now, given your total inexperience, comming up with your own protection scheme is going to be nearly impossible. So, you'll end up using a third party product to (cough) "protect" your app. You can pretty much bet that every one of them has already been cracked, or if it hasn't been on the market that long, WILL be cracked in a very short time.
|
|
|
|
|
The same concept question is:
Now a days in windows based Operating System installation files & other software files contaning partition(primary) of -c: can be copied entirely, and run different system. (they are all using drive image techniques). it's only the same brand & model based system only used.oterwise different there driver files are ocurring the error.
because inner components specification varies on brand & model.
so how if u have protect this copy.
This type of copy, i have decide to using serialNumber to system protection.
send ideas & Solutions my mail id: d.jagadish@hotmail.com
|
|
|
|
|
Good luck with that! This can be broken all too easily.
|
|
|
|