15,910,981 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by DrGrim (Top 5 by date)
DrGrim
6-Jun-14 7:25am
View
Dim xStart, yStart, xEnd, yEnd As Integer
Public Drawbitmap As Bitmap
Dim Drawgraphics As Graphic
Private Sub drawMyline()
PictureBox4.Image = Drawbitmap
Drawgraphics.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
Drawgraphics.DrawLine(p, xStart, yStart, xEnd, yEnd)
p.StartCap = LineCap.Round
p.EndCap = LineCap.Round
End Sub
put the bellow code under Form1_Load event
PictureBox4.Image = Image.FromFile("somefile.jpg")
PictureBox4.SizeMode = PictureBoxSizeMode.Zoom
Me.WindowState = FormWindowState.Maximized
Drawbitmap = New Bitmap(PictureBox4.Image)
Drawgraphics = Graphics.FromImage(Drawbitmap)
PictureBox4.Image = Drawbitmap
Drawing = False
Private Sub PictureBox4_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox4.MouseDown
Drawing = True
End Sub
Private Sub PictureBox4_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox4.MouseUp
Drawing = False
End Sub
Private Sub PictureBox4_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox4.MouseMove
If Drawing Then
xStart = e.X
yStart = e.Y
drawMyline()
End If
xEnd = e.X
yEnd = e.Y
End Sub
create a new project and put this code in it to see what i mean
DrGrim
5-Jun-14 18:19pm
View
thank you for your reply , i tried using a panel for this but i have the same issue , i can't find a way to fit the image in the panel or picturebox and draw on it properly , the only thing that makes the image fit in the control is if i use zoom but like i said , when i draw on the image the drawing does not start from where the cursor is , it's a bit off.
DrGrim
4-Jun-14 11:10am
View
god bless your soul :D ! Thank you very much !
DrGrim
2-Jun-14 12:55pm
View
here is what i want .
i have this div in a html file (with a carousel plugin inside it)
<div id="owl-example" class="owl-carousel"></div>
inside that div i need to create a n number of other div elements like in the bellow snippet
<div style="height:750px"></div> <-- the number of these div's will be dynamic (ex of math used to generate these divs is : Dim panels As Integer = Math.Round(dirFiles.Length / 102)
dirFiles.length = the number of files in the chosen folder divide by 102 which is 4 so it will create me 4 <div style="height:750px"></div>
-Now comes the fun part
inside the first of the 4 dynamically generated "<div style="height:750px"></div>" i need to insert the first 102 file names then move to the second of the 4 dynamically generated "<div style="height:750px"></div>" and add the next 102 file names and so on until there are no more images. I'm sorry for this long description . I hope you understand what i want now . Thank you
DrGrim
2-Jun-14 12:12pm
View
well i can't find a way to loop through all images and from those 407 images put 102 (image names) in one string then put the next 102 in a different string and so on until there are no more images