|
How can this be a new topic when you see the "how to make a plugin" thread just below ?
Back to real work : D-23.
|
|
|
|
|
I searched for dynamic load, created the thread, then read the stuff on plug-in. ooops.
_____________________________________________
I have a tendancy to where my mind on my sleeve I have a habit of losing my shirt...
|
|
|
|
|
Hello!
I made following steps:
1) Created a Winform with DataForm-Wizard.
2) Now I created a Button next of one textbox. In this button i
open a findfile-form which returns a string. This string i want
to write into my textbox with:
textbox1.text = returnvalue
If I start my project now I clicked my button and choose a File.
After that I see that in my textbox1 the filename comes up.
Then I jump to the 2nd textbox which is bound to the same dataset.
After I changed the 2nd textbox the value of the first textbox change
automatically to null.
I searched some newsgroups for this problems and found some useful but
nothing which can help me!
A tip was to add the command "bindingcontext[].EndCurrentEdit()" after
the command "textbox1.text = returnvalue" but then i get the error-msg
that some fields of my dataset are null. So it looks like the i can only
make a "EndCurrentEdit" at the end before updating.
What can i do to update my textbox and also get the changes to the dataset!
Thanks
Christian
|
|
|
|
|
can any body tell Process.id propertey is an int32 in vc++.net managed code? am i right ?
in vc++ process id is in DWORD data taype
if i want to get Process id in DWORD How to type caste it in DWORD?
r00d0034@yahoo.com
|
|
|
|
|
DWORD strictly speaking is UInt32. But you can you any data type with the same width. IOW UInt32 or Int32 or IntPtr on 32-bit systems.
Hope this helps
"I dont have a life, I have a program."
|
|
|
|
|
hello
i want to know can i make a plugin using c sharp
can someone help me out.
ASIM
Asim
|
|
|
|
|
Yes
1. Define a common interface.
2. Let all plugins implement the interface.
3. Load plugins via Assebly.Load.
4. Instantiate plugins with Activator class.
Stick to that, and it will work. NOTE: plugins cant be unloaded unless they in a different AppDomain, but that is another beast altogether that I havent been able to figure out (maybe its time to try again with renewed knowledge).
Cheers
"I dont have a life, I have a program."
|
|
|
|
|
The dynamic loading is a lot of extra work. If you want to try this, you might want to read this column:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp05162002.asp
|
|
|
|
|
|
eric, just a quick question...
when reading your article on using win32 api I remembered that vb use to have a file which had all the api declarations and constants defined so that vb programmers did not have to type them in.
is there going to be such a thing for c# - its too easy to translate and api call incorrectly....
thanks in advance
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Somewhere on GotDotNet there is a VB program submitted which will take that file and produce the equivalent C#/VB.NET code for the DllImport.
Unfortunately that api file is so old that the few functions I wanted to use it for weren't in there
James
Sig code stolen from David Wulff
|
|
|
|
|
|
What is the main advantage of using a typed dataset? I am trying to model a bunch of data being inserted from several aspx pages and wondering if I should just have a basic class or if I should use a typed dataset and allow the data adapter to do the update for me.
My leaning at this point is not to use the typed dataset; there won't be any manipulation of data on the client side, I am rather building a row to do an insert into a table. There would be overhead associated with the dataset that I'm not convinced would be beneficial. Hm....
Any criteria anyone can think of?
Thanks much,
*->>Always working on my game, teach me
*->>something new.
cout << "dav1d\n";
|
|
|
|
|
afronaut wrote:
wondering if I should just have a basic class or if I should use a typed dataset and allow the data adapter to do the update for me.
Yes yes yes SO much easier!
afronaut wrote:
My leaning at this point is not to use the typed dataset; there won't be any manipulation of data on the client side, I am rather building a row to do an insert into a table. There would be overhead associated with the dataset that I'm not convinced would be beneficial. Hm....
I use datasets generally for SELECT queries only. I ussually create my own SQL commands for INSERT UPDATE DELETE. The big plus point of a dataset is the ability to have very easy databinding, although using the DBReader is faster.
SO to conclude. Dataset ease of use, auto mapping. Reader speed, manual mapping and "casting".
Its up to you really.
Cheers
"I dont have a life, I have a program."
|
|
|
|
|
I've played around with both approaches, and I just wrote an app that had to do a bunch of different queries. It turned out that it was simpler for me to write a method that used a SQLCommand and a data adapter with textual SQL to fetch the data and process it instead of a strongly-typed dataset and a data adapter created in the data designer. The first one took a little while, but then I could easily generalize to the other queries.
The thing you lose is the strongly-typed feature, and the graphical query designer. The first is a bit of an annoyance, but I tend to use enterprise manager for queries anyway.
YMMV
|
|
|
|
|
I try uploading a stream to a
textfile on a webserver. This is the code:
WebClient webClient = new WebClient();
Stream stream = webClient.OpenWrite
("http://localhost/accept/newfile.txt","PUT");
StreamWriter streamWriter = new StreamWriter(stream);
streamWriter.WriteLine("Hello world");
streamWriter.Close();
the example I am trying says the directory "accept" has to be writeable. I have tried various
permission settings but the webserver keeps saying it's unauthorized when
I run the example. Any ideas on what the proper settings should be ?
|
|
|
|
|
remember the webserver runs as a particular user - you need to give that user write permission to the directory you are trying to put the file in.
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Yes, I asume the is IUSR_[MACHINENAME] and I gave this user write access to the "accept" directory.... It still gives me a 401 error
|
|
|
|
|
yes it is the problem of authority,did you try this URL: http://username:password@webhostname ???
If it still in trouble,you will have to use HttpRequest instead.
lost my way
|
|
|
|
|
aoa
The problem is how to display a picture, i.e we want to open a word document and want to get some picture if any and then to show it, now this is where the problem is we have opened word and got the picture from it but now problem is how to show it.
this is how we got the paragraph from word doc ,
Word.Range rngtext = aDoc.Application.ActiveDocument.Paragraphs.Item(2).Range;
MessageBox.Show(rngtext.Text);
now how to get show the picture?
Asim
|
|
|
|
|
You've only displayed code showing how to get a paragraph. Show us the code you used to get the picture.
ASP.NET can never fail as working with it is like fitting bras to supermodels - it's one pleasure after the next - David Wulff
|
|
|
|
|
I don't know why you can't figure out an easy way to get what you need. It's straight forward.
You don't know the MS Word object model ? I don't either, but who cares ?
Here is what I have done. I have opened MS Word, started the macro recorder, and inserted a picture. Then I edited the macro, and guess what? it showed me exactly the object used to manage pictures in Word. That's ActiveDocument.Shapes . You can either insert one of more picture, get an enumerator and get the pictures, etc.
Now that you know the right keyword to use, "Shapes", you could even start a google search and get a code snippet ready for use.
I hope that one answers not only your question, but also all others questions you may ask about the use of object models. Indeed, in our developer lives, what counts more is the ability to solve a problem regardless of the plumbering.;P
Back to real work : D-24.
|
|
|
|
|
Nice Rod.
Damn why didn't i think of that
May the Source be with you
Sonork ID 100.9997 sijinjoseph
|
|
|
|
|
Hello all CPians
I am developing on a machine with Word XP installed on, but the app I'm writing need to use the Word 9.0 library (interop). is there anyway to convince the VS.NET to dod that? I installed the MSWORD.OLB that has the Word 9.0 on my machine, but trying to add areference to it results inthe refernce being to the Word 10.0 library...
HELP!
Noam
Noam Ben Haim
Web Developer
Intel
noam.ben.chaim@intel.com
|
|
|
|
|
First remove the references from the VS.NET project. Save. You can make sure the references are actually removed by opening the .csproj file in a text editor.
Remove the interop libraries in both the Debug\ dir, and Obj\ dir.
Then open a command line, and type tlbimp <path>\msword.olb (isn't it msword9.olb by the way? I am not sure). This will produces several interop libraries.
Just add any of them to your project with the AddReference project menu option.
Back to real work : D-24.
|
|
|
|