15,892,059 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 videepmishraa (Top 18 by date)
videepmishraa
13-Feb-13 3:36am
View
Dave,
I have a program which is used for rendering in 3d. What I found was that services can run programs in their specified logins...BUT HOW to make the service start at boot?
videepmishraa
12-Feb-13 8:16am
View
Dave,
I actually want to start computers by sending magic packets...then after boot, I want to run an application which will do a specific task. Hope now you understand why I am doing this.
videepmishraa
12-Feb-13 5:27am
View
Thank You Matthew,
First Case:
Is it possible for the service to run programs without bypassing the logon screen?
Second Case:
I tried the following which returned an error:
[Code]
DWORD dwLogonType=LOGON32_LOGON_INTERACTIVE;
DWORD dwLogonProvider=LOGON32_PROVIDER_DEFAULT;
PHANDLE phToken = NULL;
LogonUser(L"xyz",L"xyz",L"xyz",dwLogonType,dwLogonProvider,phToken);
[/Code]
The error it threw was UNHANDLED Exception at 0x76B2C1BC (advapi32.dll)
0xC0000005: Access Violation writing location 0x00000000
videepmishraa
14-Oct-12 22:07pm
View
Thank You for providing the link, but the examples provided are not of much help!!!
The red book shows images but no corresponding code and the tess.c shows code but no intersections like the one I have in the images!!!
So I need someone to personally look into the code if possible.
Thanks
videepmishraa
19-Sep-12 8:14am
View
Thank You
videepmishraa
17-Sep-12 21:39pm
View
Sorry everyone, I would like to give some more detail. The need for a webbrowser is to get a snapshot of a page. If I use webbrowser.drawToBitmap(params here), after about 75 snapshots, it crashes. Here's my code:
sub GetSize()
Dim scrollWidth As Integer
Dim scrollHeight As Integer
scrollHeight = Me.WebBrowser1.Document.Body.ScrollRectangle.Height
scrollWidth = Me.WebBrowser1.Document.Body.ScrollRectangle.Width
webbrowser1.height = scrollHeight : webbrowser1.width = scrollWidth
dim bm as new bitmap(scrollWidth,scrollHeight)
webbrowser1.drawToBitmap(parameters here dont have the code so forgot, will update in a while)
bm.save(path)
bm.dispose()
End Sub
BUT THE ERROR is when I am accessing the scroll width while multi-threading.
The issue is that vb.net is not able to handle so many images. any to clear the memory?
videepmishraa
17-Sep-12 21:38pm
View
Sorry everyone, I would like to give some more detail. The need for a webbrowser is to get a snapshot of a page. If I use webbrowser.drawToBitmap(params here), after about 75 snapshots, it crashes. Here's my code:
sub GetSize()
Dim scrollWidth As Integer
Dim scrollHeight As Integer
scrollHeight = Me.WebBrowser1.Document.Body.ScrollRectangle.Height
scrollWidth = Me.WebBrowser1.Document.Body.ScrollRectangle.Width
webbrowser1.height = scrollHeight : webbrowser1.width = scrollWidth
dim bm as new bitmap(scrollWidth,scrollHeight)
webbrowser1.drawToBitmap(parameters here dont have the code so forgot, will update in a while)
bm.save(path)
bm.dispose()
End Sub
BUT THE ERROR is when I am accessing the scroll width while multi-threading.
The issue is that vb.net is not able to handle so many images. any to clear the memory?
videepmishraa
10-Sep-12 23:52pm
View
So just to ADD -> I WAS DISPOSING THE IMAGE!!!
I removed the Dispose and it now shows the image than a CROSS :D
DAMN...when will I ever understand when to Dispose and when not TO...
Ha ha ha
videepmishraa
10-Sep-12 13:17pm
View
Now this is VERY WIERD... I am at home working on a 32 bit machine. The code works perfectly well...
Here is the Code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
PictureBox1.Image = My.Resources.Blue_hills1
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim img As Image = PictureBox1.Image
Dim byteArray() As Byte
Dim imgStream As New System.IO.MemoryStream
img.Save(imgStream, Imaging.ImageFormat.Jpeg)
imgStream.Close()
byteArray = imgStream.ToArray
imgStream.Dispose()
Dim f As String = "E:\textOutput.txt"
Dim writer As New IO.StreamWriter(f)
writer.WriteLine("Hello")
writer.WriteLine(Convert.ToBase64String(byteArray))
writer.WriteLine("Hello")
writer.Flush()
writer.Close()
writer.Dispose()
PictureBox1.Image = Nothing
f = Nothing
'Dim fs As New IO.FileStream(f, IO.FileMode.Truncate)
'fs.Write(byteArray, 0, byteArray.Length - 1)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
PictureBox1.Image = Nothing
Dim reader As New IO.StreamReader("E:\textOutput.txt")
Dim str As String = reader.ReadLine()
Dim newByteArray() As Byte = Convert.FromBase64String(str)
Dim imgConverter As New ImageConverter
Dim newImg As Image = imgConverter.ConvertFrom(newByteArray)
PictureBox1.Image = newImg
End Sub
End Class
videepmishraa
10-Sep-12 9:57am
View
it still gives that Cross Image!!!
videepmishraa
10-Sep-12 9:52am
View
So what I interpret is:
Dim writer As New System.IO.StreamWriter("D:\Object.txt", True)
dim temp() as byte
temp = convertImageToByte(myImage)
writer.writeLine("Value1")
writer.writeLine("Value2")
writer.writeLine("Value3")
dim str = Convert.ToBase64String(temp)
writer.writeLine(str)
When I read it back
I read using a reader:
Dim reader As New System.IO.StreamReader("D:\Object.txt", False)
dim newString = r.readLine()
dim newByteArray() as byte
newByteArray = Convert.FromBase64String(newString)
Right??
I am about to try this now...
videepmishraa
10-Sep-12 9:44am
View
Sorry Man, my mistake...But can you reply to my query? It will be really helpful and I will just update my question in the mean while.
Thanks
videepmishraa
10-Sep-12 9:31am
View
So when I use the binaryWriter, how to i read byte data which is in between text?
eg:
name: name1
locationX : 50
locationY : 10
BYTE ARRAY HERE
sizeX: 500
sizeY: 640
zValue: 5
videepmishraa
10-Sep-12 9:09am
View
so m a newbie...can you please suggest me how I can save the image data?
I have made an app which captures the screen and want to save the image into a file.
I have other options like adding comments and drawing/higlighting.
So I want to save all the objects and the images in one file just Like Paint/Photoshop etc...
Can you please recommend me somthing
Thanks
videepmishraa
10-Sep-12 9:05am
View
Deleted
so m a newbie...can you please suggest me how I can save the image data?
I have made an app which captures the screen and want to save the image into a file.
I have other options like adding comments and drawing/higlighting.
So I want to save all the objects and the images in one file just Like Paint/Photoshop etc...
Can you please recommend me somthing
Thanks
videepmishraa
14-Aug-12 5:51am
View
Thank You,
I have another question:
How to make a surface which can re-draw it from time to time?
Thanks
-v
videepmishraa
10-Aug-12 6:16am
View
The video is a nice demonstration. But that has been done with GDI+ and I am trying to do it with OpenGL.
The reason I am using OpenGL is because when I draw rectangles, I want to change their properties too!!!
videepmishraa
7-Aug-12 7:20am
View
Thank You Aarti.
I am attaching a code that I just wrote. I have a picture box in the form named and two radio buttons. I ahve'nt changed their names.
What this does is:
with radio button 1 checked, you can draw any number of rectangles on the picturebox.
with radio button 2 checked, you can move the last drawn rectangle.
This process might be too memory consuming according to me as when I am moving the image, I am drawing the rectangles first and then moving the last rectangle on the mouse move event.
I just realised that I can skip the re-drawing of the rectangles when radio button 1 is checked.
What I want to know is if its much memory consuming? as this is only on page1(form1) and I have multiple forms.
And what if I have to edit the first rectangle? Do I need to make a listbox and do a 1 to 1 Marking of the rectangles to the items on the listbox?
Then draw all the rectangles?
-Videep
--CODE--
[code]
<pre lang="vb">Public Class Form1
Dim painting = False
Dim start As New Point(0, 0)
Dim _end As New Point(0, 0)
Dim r As New Rectangle(0, 0, 100, 100)
Dim rectArray As New List(Of Rectangle)
Dim first = True
Dim rec As Rectangle
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
painting = True
start = e.Location
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If (painting) Then
Dim g As Graphics = PictureBox1.CreateGraphics
If (RadioButton1.Checked) Then
g.Clear(PictureBox1.BackColor)
For i = 0 To rectArray.Count - 1
rec = rectArray.Item(i)
g.FillRectangle(Brushes.RosyBrown, rec)
Next
r.X = start.X
r.Y = start.Y
r.Width = e.Location.X - start.X
r.Height = e.Location.Y - start.Y
g.FillRectangle(Brushes.RosyBrown, r)
Else
g.Clear(PictureBox1.BackColor)
For i = 0 To rectArray.Count - 2
rec = rectArray.Item(i)
g.FillRectangle(Brushes.RosyBrown, rec)
Next
r.X = e.X
r.Y = e.Y
g.FillRectangle(Brushes.RosyBrown, r)
End If
End If
End Sub
Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
painting = False
If (RadioButton1.Checked) Then
rectArray.Add(r)
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.DoubleBuffered = True
End Sub
End Class</pre>
[/code]
Show More