StrataFrame Forum
Back
Login
Login
Home
»
Updates and Information
»
StrataFrame Users Contributed Samples
»
Let the samples begin
Let the samples begin
Post Reply
Like
2
Let the samples begin
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Trent Taylor
Trent Taylor
posted 17 Years Ago
ANSWER
Topic Details
Share Topic
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
This forum has been created to allow developers, like yourself, to add or post samples that may be beneficial to other StrataFrame users. We appreciate all of your contributions to the forum and have noticed that different samples have been posted within forum threads in the past making it more difficult for future users to find. This forum allows those samples to be consolidated and reviewed more easily by other StrataFrame users. Thanks for all of your posts!
Trent
Reply
Like
2
Ben Hayat
Ben Hayat
posted 17 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 374,
Visits: 1.2K
Great idea Trent
Somehow, we should go back to old posts and grab lots great codes that you and Ben have put out and create a library of those codes.
..ßen
Reply
Like
1
Ben Hayat
Ben Hayat
posted 17 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 374,
Visits: 1.2K
The following is a solution offered by Ben Chase (SF team) that allows you to use icons at runtime from a resource library rather than loading from disk:
the Image and Icon are completely different... mainly because Icon does not inherit from Image (the file formats are completely different since an Icon can have several different sizes within the file). So, I would recommend that you add the icons to your project (not as resources, just add them to the project with the "Add Exisiting Item" option) and change their compile option to Embedded Resource (in the properties for the file). Then, you can use the Icon constructor that accepts a stream to retrieve the embedded resources. Kinda like this:
notifyIcon1.Icon = new Icon(Assembly.GetExecutingAssembly().GetManifestResourceStream("RootNamespace.Folders.FileName"));
C# and VB do some different stuff for the name of the resource when it's compiled. C# uses the root namespace + the folder names separated by "." followed by the filename. Whereas VB just the root namespace + the filename. If you ever want to see what resources are available, you can use the Assembly.GetExecutingAssembly().GetManifestResourceNames(); method which will return the names of all of the resources. Oh, and the names are case-sensitive.
..ßen
Reply
Like
1
Ben Hayat
Ben Hayat
posted 17 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 374,
Visits: 1.2K
I'm copying the about message into it's own topic!
..ßen
Reply
Like
2
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
2
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search