Click here to Skip to main content
14,740,854 members
Home » Discussions » C#
   

C#

 
AnswerRe: Unity connection with a smartwatch and getting heart rate data Pin
Gerry Schmitz1-Dec-20 6:34
mveGerry Schmitz1-Dec-20 6:34 
GeneralRe: Unity connection with a smartwatch and getting heart rate data Pin
OriginalGriff1-Dec-20 10:30
mveOriginalGriff1-Dec-20 10:30 
GeneralRe: Unity connection with a smartwatch and getting heart rate data Pin
Gerry Schmitz1-Dec-20 19:23
mveGerry Schmitz1-Dec-20 19:23 
QuestionDifferences Pin
michaelbarb30-Nov-20 6:53
Membermichaelbarb30-Nov-20 6:53 
AnswerRe: Differences Pin
OriginalGriff30-Nov-20 7:20
mveOriginalGriff30-Nov-20 7:20 
GeneralRe: Differences Pin
michaelbarb30-Nov-20 7:39
Membermichaelbarb30-Nov-20 7:39 
QuestionIs my program idea possible? Pin
Dioxazine27-Nov-20 21:09
MemberDioxazine27-Nov-20 21:09 
AnswerRe: Is my program idea possible? Pin
OriginalGriff27-Nov-20 21:20
mveOriginalGriff27-Nov-20 21:20 
Yes, it's possible: you do not need to use a OpenFileDialog to access the image, that just provides you with a path to the file.

If you want to load the file from a specific location, then you can just specify that:
byte[] data = File.ReadAllBytes(@"D:\Temp\MyImage.bmp");
MemoryStream ms = new MemoryStream(data);
Image im = Image.FromStream(ms);
Or you can load from the application EXE folder:
byte[] data = File.ReadAllBytes(@".\MyImage.bmp");
MemoryStream ms = new MemoryStream(data);
Image im = Image.FromStream(ms);
This has disadvantages in that you can't modify the image reliably as the folder is likely to be read only in production.
Or you can add the image as a resource and embed it in your application:
Image im = Properties.Resources.MyImage;
And now you can't change the image from run to run of your app at all because it is part of your application EXE file.
"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!

GeneralRe: Is my program idea possible? Pin
Dioxazine28-Nov-20 6:54
MemberDioxazine28-Nov-20 6:54 
GeneralRe: Is my program idea possible? Pin
OriginalGriff28-Nov-20 7:17
mveOriginalGriff28-Nov-20 7:17 
GeneralRe: Is my program idea possible? Pin
Dioxazine28-Nov-20 9:09
MemberDioxazine28-Nov-20 9:09 
GeneralRe: Is my program idea possible? Pin
OriginalGriff28-Nov-20 9:22
mveOriginalGriff28-Nov-20 9:22 
GeneralRe: Is my program idea possible? Pin
Liktor Janos11-Dec-20 8:42
MemberLiktor Janos11-Dec-20 8:42 
GeneralRe: Is my program idea possible? Pin
Gerry Schmitz28-Nov-20 8:51
mveGerry Schmitz28-Nov-20 8:51 
QuestionError in SQL Light Compact 4 Pin
Alex Dunlop23-Nov-20 4:47
MemberAlex Dunlop23-Nov-20 4:47 
AnswerRe: Error in SQL Light Compact 4 Pin
Victor Nijegorodov23-Nov-20 4:56
MemberVictor Nijegorodov23-Nov-20 4:56 
GeneralRe: Error in SQL Light Compact 4 Pin
Alex Dunlop23-Nov-20 5:04
MemberAlex Dunlop23-Nov-20 5:04 
GeneralRe: Error in SQL Light Compact 4 Pin
Richard Deeming23-Nov-20 5:18
mveRichard Deeming23-Nov-20 5:18 
GeneralRe: Error in SQL Light Compact 4 Pin
OriginalGriff23-Nov-20 5:29
mveOriginalGriff23-Nov-20 5:29 
GeneralRe: Error in SQL Light Compact 4 Pin
Alex Dunlop23-Nov-20 8:38
MemberAlex Dunlop23-Nov-20 8:38 
GeneralRe: Error in SQL Light Compact 4 Pin
OriginalGriff23-Nov-20 8:53
mveOriginalGriff23-Nov-20 8:53 
GeneralRe: Error in SQL Light Compact 4 Pin
Alex Dunlop23-Nov-20 9:10
MemberAlex Dunlop23-Nov-20 9:10 
GeneralRe: Error in SQL Light Compact 4 Pin
OriginalGriff23-Nov-20 9:19
mveOriginalGriff23-Nov-20 9:19 
GeneralRe: Error in SQL Light Compact 4 Pin
Alex Dunlop23-Nov-20 9:28
MemberAlex Dunlop23-Nov-20 9:28 
GeneralRe: Error in SQL Light Compact 4 Pin
Richard Deeming23-Nov-20 18:43
mveRichard Deeming23-Nov-20 18:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.