|
|
Cool Smith wrote: first am using vb.net not c#, i tried convertin to vb.net
You asked for pseudocode, and that's what it is.
Cool Smith wrote: Can you provide vb.net version?
No, since it's not my job. You could post your code however, and people could have a look. That is, if you explain where you're stuck.
I are Troll
|
|
|
|
|
How do you store/retrieve a PDF file in SQL Server using vb.net code?
|
|
|
|
|
Have a read of this article there is a lnk in the article that has a code example to do what your after
loading binary data (files) in a database [^]
As barmey as a sack of badgers
Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.
|
|
|
|
|
I am working on a library that uses multiple threads to do all kinds of work. The work being done results in events being generated. Preferably I would like all communications to the outside world to be on a single thread, so most threading issues can be dealt with inside the library.
When using forms there are the standard components with the Invoke methods that let the thread that runs the form call the requested Delegate , so whatever needs to be done (raise an event in my case) gets executed on that form thread.
Is there a way to do this generically, without forms or components ? Say I have 1 main thread that spawns 10 or 20 worker threads. And whenever the workers have an event to raise, they let the main thread do this? Is there an easy way (that I just haven't found), or should I be creating some custom threadpool management code to achieve this?
Any thoughts?
If you want something done fast, then do it right (Grissom, CSI)
Thanks for your reply, you just acknowledged my existence
|
|
|
|
|
the BackgroundWorker class has this built-in: its ProgressChanged and RunWorkerCompleted handlers run on the thread that created the BGW.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Thx for your time. I get your point, but... that would make my library capable of only raising the standard ProgressChanged and RunWorkerCompleted events, and not the custom events used in my library.
Is there any description on how the BackgroundWorker class does its magic? that would allow me to re-create it and add my own events
If you want something done fast, then do it right (Grissom, CSI)
Thanks for your reply, you just acknowledged my existence
|
|
|
|
|
BGW's internals are pretty complex; it uses System.ComponentModel.AsyncOperation , System.Threading.SynchronizationContext and System.Threading.ThreadPool and it basically boils down to a Delegate.Invoke
You can see all that with a tool such as Reflector[^].
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Meanwhile I ran some tests and my conclusion is that I cannot use the BackgroundWorker.
Thing is with the BackgroundWorker , that the described behaviour is only valid in a windows forms application. If you run it in a forms application, the ProgressChanged handler indeed runs on the creator thread (the UI thread), but if you use it in a console application, the ProgressChanged handler runs on the DoWork background thread.
If you want something done fast, then do it right (Grissom, CSI)
Thanks for your reply, you just acknowledged my existence
|
|
|
|
|
In the program I'm developing for my company I need to add email capabilities. However I want to get a list of email addresses from our Exchange Server 2007 SP3 which is running on SBS 2008. I was originally going to try and pull it from Outlook, however there are 3 different versions across all our computers (Outlook 2003, 2007, and 2010), I want to avoid using Interop just to get email addresses, and upgrading everyone to 2010 isn't an option. The program is being developed in .NET 3.5. The email addresses I want to find are in the Global Address List, however I haven't been able to figure out how to do this so any guidance or direction would be greatly appreciated. Thanks in advance.
|
|
|
|
|
DisIsHoody wrote: The program is being developed in .NET 3.5. The email addresses I want to find are in the Global Address List
Start here[^]
I are Troll
|
|
|
|
|
Never thought about trying to get the contact through the web access, need to save that page. Thanks. However I did find that I could get it using Redemption and not have to worry about HTTP.
|
|
|
|
|
Nice, bookmarked it! Thanks for sharing
I are Troll
|
|
|
|
|
DisIsHoody wrote: However I did find that I could get it using Redemption
God is Great \o/ :p
|
|
|
|
|
Hello Everybody,
There are a lot of Source for Keyboard Hook. But i want to develop some new enhashment with keyboard Hook. Noew I am trying to capture Unicode characters.
I read a best article for only keyboard hook is
Global Windows Hooks[^]
But i want to convert it to Unicode.
So your help and suggestion is required.
Thanks
If you can think then I Can.
|
|
|
|
|
I am kinda new with Visual Basic, and I am trying to make a system where I browse a video file, display it on a form, and process the video frame by frame to detect movements.
Ive read all over the place and most say use Windows SDK, ICImage something and etc..But I still cant understand any of them. Anyone mind sharing knowledge on how to do this? If anyone wouldnt mind giving me a step by step tutorial?
|
|
|
|
|
Search the articles here on codeproject.
There are quite a few relating to motion detection. That should get you started.
If your new to it all, then video handling and motion detection is maybe a bit much to take on to begin with. just a thought.........
|
|
|
|
|
You can try this, but VB.NET is no the first choice to do any kind of image processing. Why? Because VB.NET doesn't support pointers. Getting at image data fast enough to do this requires the use of pointers. You won't find any image processing or motion detection articles in VB.NET because of this.
This is better done in C# or C/C++.
Also, if your a beginner, this is not a good project to take on because of the complexity involved.
|
|
|
|
|
Thank you for the pointers. Actually this is a class assignment, one which I really hope can do well, or at least have some functions in it. I do have some basics in C++ but its all blurry at times. At least anyone can show me how to use the library to access video files on a form?
|
|
|
|
|
THIS is a class assignment? Very strange or a VB class.
I also have no idea what library you're talking about. The name you posted doesn't come up, but others of variants of the name you posted do.
|
|
|
|
|
Zyprost wrote: Actually this is a class assignment,
What year are you in? And what languages did you cover yet?
I are Troll
|
|
|
|
|
Yes it is a class assignment. We were to find an interesting topic,and make a proposal example,so i choose on movement detection, but I didnt knew that we actually have to make a system afterward lol.
We covered c++ last year, but only the basic functions, this year is java and some php. Some classmate said VB is like java so I wanted to try it. And on the library I said, think it was for c++, or was it java.idk, Many links I found said in order to display a video file on a form, I have to use them.
|
|
|
|
|
Zyprost wrote: We were to find an interesting topic,and make a proposal example,so i choose on movement detection,
Definitely an interesting topic, you were right on that! It's also a complex topic, and I'm wondering why the teacher didn't mention that when he was reviewing the proposals.
Zyprost wrote: We covered c++ last year, but only the basic functions, this year is java and some php.
I'd love to see the curriculum of the school. Is there a website that lists the courses?
Zyprost wrote: And on the library I said, think it was for c++
This implies that you're allowed to use libraries written by others? If that's the case, start with this[^] CodeProject-article.
I are Troll
|
|
|
|
|
Eddy Vluggen wrote:
Definitely an interesting topic, you were right on that! It's also a complex topic, and I'm wondering why the teacher didn't mention that when he was reviewing the proposals.
Ha ha maybe he didn't know that I was weak with programming. My scores were just average in class. So I need a big boost to get back what I lost.
And thanks for the link. Ive read them before and find it was interesting. I guess I will not use VB and use C++ instead. I will make sure to give credit to anyone involved.
Eddy Vluggen wrote: I'd love to see the curriculum of the school. Is there a website that lists the courses?
I don't even know if we have one at all. All I can focus on are my subjects, and finishing my assignments.
I will seek more help in the right section from now on I guess, but hopefully I wont need them. Thanks for helping. Rock on!!
|
|
|
|
|
Even in c#, pointers are unsafe and unmanaged and must be declared as such. You need to jump through hoops to point to managed objects. You can use complex and often misused compilation tricks in either c# or vb.net to create a QuasiManagedPointer, but it not recommended, period. C++.net is the only way to go should you ever happen to really need to waste time in that direction.
Complexity is in the eye of the developer, especially with newbies who may look at this from a totally different perspective and use top pixel counts and thresolds to determine an image change (otherwise known as motion detection).
.net managed code uses the CLR in any language.
Stop spreading this nonsense.
Dwayne J. Baldwin
|
|
|
|