Click here to Skip to main content
15,889,416 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: datagrid view Pin
Gandalf_TheWhite31-Dec-13 1:40
professionalGandalf_TheWhite31-Dec-13 1:40 
GeneralRe: datagrid view Pin
tsunamigang31-Dec-13 1:52
tsunamigang31-Dec-13 1:52 
QuestionCrystal report not generated. Pin
pankaj1985tripathi29-Dec-13 23:17
pankaj1985tripathi29-Dec-13 23:17 
AnswerRe: Crystal report not generated. Pin
thatraja29-Dec-13 23:43
professionalthatraja29-Dec-13 23:43 
QuestionFunction in Linq Pin
alirezamansoori28-Dec-13 20:36
alirezamansoori28-Dec-13 20:36 
AnswerRe: Function in Linq Pin
Richard MacCutchan28-Dec-13 23:15
mveRichard MacCutchan28-Dec-13 23:15 
QuestionVB Photo Screensaver Pin
Nate Schoonover27-Dec-13 17:33
Nate Schoonover27-Dec-13 17:33 
AnswerRe: VB Photo Screensaver Pin
Eddy Vluggen29-Dec-13 3:13
professionalEddy Vluggen29-Dec-13 3:13 
Member 10488758 wrote:
I know that I am going about this image moving thing all wrong.
Nope, sounds like a good idea to use controls for this purpose. They're not optimized to be animated though. There's a different set that is, but more on that at the end of this post.

Alternatively, you could check out the forms' properties; it has an OnPaint[^] handler that you can override. You could nicely draw a bitmap offscreen (in a separate thread) and paint it when ready.
VB
Protected Overrides Sub OnPaint(e As PaintEventArgs)
	MyBase.OnPaint(e)
	Using b = _generation.GenerateBitmap()
		e.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor
		e.Graphics.PixelOffsetMode = PixelOffsetMode.Half
		e.Graphics.DrawImage(b, 0, 0, Width, Height)
	End Using
End Sub

Member 10488758 wrote:
I should probably be using some kind of ActiveX or OpenGL
You'd like to dive into the world of WPF[^]. It also uses Forms and Controls, but these are a bit more modern, and rendered using DirectX. Additionally there'll be easier animations, gradients and more of the like Smile | :)

Found two articles on CodeProject related to WPF Screensavers, but both are aiming at C#. There's no specific example for VB.NET (hint, hint)

Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: VB Photo Screensaver Pin
Nate Schoonover29-Dec-13 5:37
Nate Schoonover29-Dec-13 5:37 
GeneralRe: VB Photo Screensaver Pin
Eddy Vluggen29-Dec-13 17:15
professionalEddy Vluggen29-Dec-13 17:15 
GeneralRe: VB Photo Screensaver Pin
Nate Schoonover31-Dec-13 9:00
Nate Schoonover31-Dec-13 9:00 
GeneralRe: VB Photo Screensaver Pin
Eddy Vluggen2-Jan-14 9:18
professionalEddy Vluggen2-Jan-14 9:18 
GeneralRe: VB Photo Screensaver Pin
Nate Schoonover2-Jan-14 11:37
Nate Schoonover2-Jan-14 11:37 
GeneralRe: VB Photo Screensaver Pin
Eddy Vluggen4-Jan-14 3:41
professionalEddy Vluggen4-Jan-14 3:41 
GeneralRe: VB Photo Screensaver Pin
Nate Schoonover4-Jan-14 18:17
Nate Schoonover4-Jan-14 18:17 
GeneralRe: VB Photo Screensaver Pin
Eddy Vluggen5-Jan-14 1:25
professionalEddy Vluggen5-Jan-14 1:25 
QuestionDataGridView populates only first row Pin
Sonhospa27-Dec-13 9:16
Sonhospa27-Dec-13 9:16 
AnswerRe: DataGridView populates only first row Pin
Eddy Vluggen29-Dec-13 2:51
professionalEddy Vluggen29-Dec-13 2:51 
AnswerRe: DataGridView populates only first row Pin
Sonhospa29-Dec-13 7:08
Sonhospa29-Dec-13 7:08 
GeneralRe: DataGridView populates only first row Pin
Eddy Vluggen29-Dec-13 17:12
professionalEddy Vluggen29-Dec-13 17:12 
QuestionLINQ Pin
tsunamigang23-Dec-13 18:04
tsunamigang23-Dec-13 18:04 
AnswerRe: LINQ Pin
thatraja23-Dec-13 20:09
professionalthatraja23-Dec-13 20:09 
GeneralRe: LINQ Pin
tsunamigang23-Dec-13 22:08
tsunamigang23-Dec-13 22:08 
QuestionProgressbar value not accurate? Pin
Sonhospa21-Dec-13 0:50
Sonhospa21-Dec-13 0:50 
AnswerRe: Progressbar value not accurate? Pin
Dave Kreskowiak21-Dec-13 4:50
mveDave Kreskowiak21-Dec-13 4:50 

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.