|
Maybe this is a reasonable starting point:
[^ DirectShow Virtual Video Capture Source Filter in C#]
It doesn't read from a camera, but will give you some idea on what is required. It's quite old, so might not be up-to-date, but if nothing else it might give you some words to google for newer examples.
I would not recommend this for a beginner.
|
|
|
|
|
It's been done. Search for virtual camera / webcam "drivers".
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
HI,
I am curios to know all the new features introduced in .net core & in c# regarding various version. i was searching this site to get few good article on this topic but no luck. so anyone can share few links of good codeproject articles which talk about C# & .Net core new features version wise and their advantages with example code to show usage.
Thanks
|
|
|
|
|
|
Hi, i find Jonathan Allen's articles on InfoQ about new C# features very helpful: [^], [^]. Some of Steve Gordon's posts also: [^], and [^]
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
modified 21-Oct-21 6:29am.
|
|
|
|
|
Hi,
I want to ask how to send a messages to a customer WhatsApp from windows forms applications.
Please hep me ASAP
Thank You
|
|
|
|
|
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
A very quick search using your subject as the search term gave 11 million results, including document,s videos, and source code: send a messages to a customer WhatsApp from windows forms applications - Google Search[^]
In future, please try to do at least basic research yourself, and not waste your time or ours.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Hi,
I did many search but all of them is third-party apis, I need a free one if it is available
Thank You
|
|
|
|
|
There isn't a free client API for WhatsApp.
You need a business account with a line of credit.
|
|
|
|
|
I need verification code on WhatsApp
|
|
|
|
|
Hello friends, I want to do SQL Dependency capability in a database file without SQL management The default file address is also in (c:\database.mdf)
I run the service broker in the file, unfortunately I apply a record in the database, it will not be updated in another system, please help
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Typing as little as possible doesn't help much as we can't help you if we don't properly understand your problem! And at the moment, all I can see are buzzwords and mistakes.
The principle mistake is trying to store a database file in the root of any drive, much worse when it's the boot drive: as from Windows 7 the root of the boot drive was protected from non-admin activity, and this was extended in later revisions to cover non-boot drives as well.
Never store "normal files" in the root - always use a subdirectory!
This may help: Where Should I Store My Data?[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Given a large number of shapes that can be defined by vertices and edges how would you design the class structure for that?
|
|
|
|
|
 Hi, i happen to be working on a shape library for WinForms C# right now; i'll eventually publish it here, but, can't predict when. Let me offer some general ideas:
1) choice of Framework is important: a lot depends on what you want to do with your shapes. my usage is for custom ring design; for example, i need to calculate equally spaced points along a path like an oval, and that point's tangent (requires calculus); i deal primarily with polygons, circles and ellipses; my goal is to have mock-ups i can take to my manufacturers. so, i'm not concerned with 3d rendering on screen, texturing, etc. and i'm not concerned with interacting with selecting/moving/duplicating shapes on-screen as you expect in a drawing program,
2) for other purposes, like the ones i just said i'm not concerned with, WPF offers a superior graphics engine and facilities; and, for 3d; use Unity. if you do need to select/move/duplicate/dock etc., shapes on-screen: don't use WinForms, use WPF.
3) the interface i am using now: the use of System.Windows requires your WinForm project to have a reference to WindowsBase.dll
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows;
using SdPoint = System.Drawing.Point;
using SwPoint = System.Windows.Point;
using SdSize = System.Drawing.Size;
using SwSize = System.Windows.Size;
using GraphicsPath = System.Drawing.Drawing2D.GraphicsPath;
using GReg = System.Drawing.Region;
using GMat2d = System.Drawing.Drawing2D.Matrix;
using GMatMed = System.Windows.Media.Matrix;
namespace GeomLib_August_2021_III
{
public enum ShapeType
{
Line,
Arc,
Rectangle,
Parallelogram,
Circle,
Ellipse,
RegPolygon,
IrregPolygon,
Grid,
Star
}
public interface IShape
{
string ShpName { get; }
string ShpComment { get; }
DateTime ShpTimeStamp { get; }
ShapeType ShpType { get; }
Rect SwRect { get; }
SwPoint CenterF { get; }
SwPoint[] PathPoints { get; }
double GetArea();
double GetPerimeter();
SwPoint GetCenter();
GraphicsPath GetGPath();
Region GetRegion();
IShape GetUnion(IShape s1, IShape s2);
IShape GetIntersection(IShape s1, IShape s2);
IShape Translate(IShape s1, Matrix m1);
IShape Rotate(IShape s1, Matrix m1);
IShape Scale(IShape s1, Matrix m1);
SwPoint[] Flatten();
void Render();
void Save();
void Load()
}
} Each shape name listed in the ShapeType Enum is implemented as a class that inherits from IShape, and implements its fields, and methods.
4) typical OO shape modeling uses "nested" inheritance; you might have:
class Poly : IShape
class Triangle : Poly
class Rectangle : Poly
class Parallelogram : Rectangle
class RegularPolygon : Poly
class EqTriangle : RegularPolygon // or EqTriangle : Triangle
class Square ; RegularPolygon // or Square : Rectangle
class Circle : IShape
class Ellipse : Circle
5) there any number of ways you can organize the top level hierarchy to meet your goals.
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
modified 18-Oct-21 3:18am.
|
|
|
|
|
Good morning Bill. Thanks for posting this code - it's great to see people sharing code like this. I have a couple of comments that I'd like to address.
The code sample here has a lot of shorthand in it so things like GetGPath have to be interpreted. Is there a reason why this isn't called GetGraphicsPath or just GetPath ? On that note, why have you chosen to implement Get methods over property getters? I'm just curious as to your reasoning here.
The Shp properties all feel like they should be in a separate class. Again, it feels to me like these are metadata items, rather than being intrinsic parts of the base interface. I would probably move these out into a separate metadata class and drop the Shp parts of the name.
The Union and Intersection methods also appear to be wrong, unless you are looking to determine whether this shape intersects with more than one shape - the first parameter of these methods is probably going to be the current instance so why pass it in? I would expect to see a method that looks more like this
IShape Union(IShape shape);
|
|
|
|
|
Hi Pete, i'm delighted to have feedback like this ! I'll study it carefully, and respond in more detail later.
current version calculating equally spaced points points on an ellipse: [^]
Context: currently this is very much in initial development, and, "final polishing" may address your concerns about my use of short aliases instead of longer, more mnemonic, names. For unknown reasons, my memory, at age 78, handles such short aliases without cognitive effort (just don't ask me where i left my house keys) ... and, it saves typing time
Quote: The Shp properties all feel like they should be in a separate class. Again, it feels to me like these are metadata items, rather than being intrinsic parts of the base interface. I would probably move these out into a separate metadata class and drop the Shp parts of the name. Excellent points ! As the design progresses, i may "break out" the IShape interface into component interfaces like IIdentity for ShpName, ShpComment, ShpTimeStamp (those i would call "metadata"). Right now, things like SwPoint, CenterF seem essential.
"Shp" as prefix: I often "go Hungarian" simply because when i view an object's contents at run-time when a breakpoint is hit, they appear grouped together in the alpha-ordered inspector dropdown, Same idea with public Properties i want exposed in a design-time PropertyGrid.
'Get methods instead of Property getters: somewhere along the line years ago (influenced by Richter ?), i decided to never do extensive calculations, or call external methods, in Properties (except for OnPropertyChanged). That "feels right," and, i believe that contributes to maintainability in the long run ... perhaps i should reevaluate that "habit/decision" ? Quote: The Union and Intersection methods also appear to be wrong, unless you are looking to determine whether this shape intersects with more than one shape - the first parameter of these methods is probably going to be the current instance so why pass it in? As of now, i have not implemented any "current ..." state/object facility. That is something I really like ever since my little career led me into specializing in PostScript.
My intent is to take two shape instances as input, and return a new shape which is the intersection/union of the two inputs: that syntax doesn't reflect that ?
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
I find that "super" controls that you can morph at run time (color, scale, content) are more manageable than trying to build things from lots of primitives.
You need a "focus"; e.g. military units already have many predefined shapes and derivatives. In architecture, there are door, window, etc. "patterns".
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Hey there,
My first time posting on this forum.
I've written and reformed this database a lot over the years. It was called metastrings, but that's a dumb name, and I've boiled it down to four operations, so 4db made more sense:
GitHub - michaelsballoni/4db: Simple database for high productivity and ease of use
To see how it works, check out the carsdb sample:
4db/carsdb · GitHub
I'd like to get some feedback on the general premise and the implementation. And I'm interested in contributions to make it more useful.
Thanks, -Michael
|
|
|
|
|
|
i respectfully disagree with you on the appropriateness of this post in this forum: see my comments to Michael on this thread.
cheers, Bill
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
Well Bill, I respectfully disagree with your disagreement. This forum is for questions on C#, not reviews of people's projects. And there is a perfectly adequate Database forum further down, which is still fairly active at times.
|
|
|
|
|
@chrismaunder
i do see your POV !
for me, the salient questions are:
1) if (your words) "This forum is for questions on C#" ... how does that make it any different from the C# QA forum ? why have two fora ?
2) if there's all kinds of questions that appear here that could just as well be appropriate on the C# QA forum, and that's okay, then why not tolerate other types of posts that do have some C# related content, like Michael's ?
ideally ... for me ... this would be a forum for serious discussions of C# language issues: new features; work-arounds, optimal techniques, and yes, code reviews. Questions/problems ? Yes: but, hopefully those that invite in-depth discussions and debate. Kevin Marois might have to use QA to get his code written for him
But, as i said to Honey,,,Witch on the Insider News forum recently: "i can't afford 'ideals' at my age; i have to get by living off 'values'."
And, speaking of "values:" allow me to propose that when we respond to a post like Michael's that may, indeed, be an "edge case" for content on this forum, based on perceptions that he's smart, that he's written some CP articles, that with encouragement/recognition (who doesn't want that ?) he may bring more of his knowledge and experience to CP ... that's valuable.
i call that value "collegialty."
cheers, past-his-use-by date-Bill
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
1. The two are different, and you have to go back a few years to when QA was introduced to understand why it was introduced.
2. I did not see anything related to C# in the original question.
Michael Balloni wrote: My first time posting on this forum. So why say that when he has been, as you pointed out, a contributor of many years standing? And that was why I suggested he was in the wrong place.
|
|
|
|
|
Richard MacCutchan wrote: go back a few years to when QA was introduced to understand why it was introduced. If you have time, i'd appreciate knowing your perceptions/memories of "why."Richard MacCutchan wrote: 2. I did not see anything related to C# in the original question. i interpreted this more narrowly: as meaning he had not posted in this forum before. But, i agree that his database article should have been mentioned, and that might have made the post less "ambiguous."
cheers, Bill
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
BillWoodruff wrote: perceptions/memories of "why. IIRC the idea was to attract 'quick' questions. That is to say ones that could be answered fairly easily without long discussion threads as tend to exist in the forums.
|
|
|
|
|