Click here to Skip to main content
15,667,280 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Get all window handles Pin
Dave Kreskowiak17-May-07 4:54
mveDave Kreskowiak17-May-07 4:54 
GeneralRe: Get all window handles Pin
Burillo17-May-07 6:17
Burillo17-May-07 6:17 
GeneralRe: Get all window handles Pin
Dave Kreskowiak17-May-07 6:24
mveDave Kreskowiak17-May-07 6:24 
QuestionDesktop refresh on Timer_Tick Pin
The ANZAC16-May-07 22:32
The ANZAC16-May-07 22:32 
QuestionRe: Desktop refresh on Timer_Tick Pin
Sonia Gupta16-May-07 22:35
Sonia Gupta16-May-07 22:35 
AnswerRe: Desktop refresh on Timer_Tick Pin
Christian Graus17-May-07 2:37
protectorChristian Graus17-May-07 2:37 
AnswerRe: Desktop refresh on Timer_Tick Pin
Dave Kreskowiak17-May-07 4:48
mveDave Kreskowiak17-May-07 4:48 
GeneralRe: Desktop refresh on Timer_Tick Pin
The ANZAC17-May-07 11:27
The ANZAC17-May-07 11:27 
I could post the code but at the moment its long and messy so i'll give you a run down. It compares two datetimes to check for a day, hour or minute difference using datediff. It then generates a random number and checks it against a list (of integer) to see if its been used. If it has been used it loops and generates random numbers till one pops up that hasn't been used. Then it uses the number to select a name from a comboboxobject collection.

I can't see anyway it's causing this refresh thing, but every 20 seconds (what the timer is set to) it does it, all the icons flash.

I'll post some of it:
If DateDiff(DateInterval.Day, d1, d2) = My.Settings.ChangeValue Then<br />
                If My.Settings.ChangeMode = 0 Then<br />
                    Index = RandomClass.Next(-1, Me.ImagesComboBox.Items.Count + 1)<br />
                    If UsedList.Count = Me.ImagesComboBox.Items.Count Then<br />
                        UsedList.Clear()<br />
                    End If<br />
                    Do Until UsedList.Contains(Me.ImagesComboBox.Items.Item(Index)) = False<br />
                        Index = RandomClass.Next(-1, Me.ImagesComboBox.Items.Count + 1)<br />
                    Loop<br />
                    My.Settings.Index = Index<br />
                    path = Folder & "\" & Me.ImagesComboBox.Items(Index)<br />
                    If Not path.Remove(0, path.IndexOf(".")) = ".bmp" Then<br />
                        Dim image As Image = image.FromFile(path)<br />
                        image.Save(path.Remove(path.IndexOf("."), path.Length - path.IndexOf(".")), Imaging.ImageFormat.Bmp)<br />
                        My.Settings.WasSavedAs = True<br />
                        path = path.Replace(path.Remove(0, path.IndexOf(".")), ".bmp")<br />
                    End If<br />
                Else<br />
                    If My.Settings.WasSavedAs = True Then<br />
                        Index = My.Settings.Index + 2<br />
                    Else<br />
                        Index = My.Settings.Index + 1<br />
                    End If<br />
                    path = Folder & "\" & Me.ImagesComboBox.Items(Index)<br />
                    If Not path.Remove(0, path.IndexOf(".")) = ".bmp" Then<br />
                        Dim image As Image = image.FromFile(path)<br />
                        image.Save(path.Remove(path.IndexOf("."), path.Length - path.IndexOf(".")), Imaging.ImageFormat.Bmp)<br />
                        My.Settings.WasSavedAs = True<br />
                        path = path.Replace(path.Remove(0, path.IndexOf(".")), ".bmp")<br />
                    End If<br />
                End If<br />
            End If


Posted by The ANZAC

QuestionReading a file in the internet Pin
re infecta16-May-07 22:24
re infecta16-May-07 22:24 
AnswerRe: Reading a file in the internet Pin
ne0h17-May-07 2:12
ne0h17-May-07 2:12 
Question'prcInserting Expects parameter @Extension which was not Supplied" Pin
Vimalsoft(Pty) Ltd16-May-07 21:49
professionalVimalsoft(Pty) Ltd16-May-07 21:49 
AnswerRe: 'prcInserting Expects parameter @Extension which was not Supplied&quot; Pin
Dave Kreskowiak17-May-07 4:39
mveDave Kreskowiak17-May-07 4:39 
Questionvb6 to vb.net Pin
Sonia Gupta16-May-07 21:16
Sonia Gupta16-May-07 21:16 
AnswerRe: vb6 to vb.net Pin
Christian Graus16-May-07 22:34
protectorChristian Graus16-May-07 22:34 
GeneralRe: vb6 to vb.net Pin
Sonia Gupta16-May-07 23:53
Sonia Gupta16-May-07 23:53 
AnswerRe: vb6 to vb.net Pin
ChandraRam16-May-07 23:47
ChandraRam16-May-07 23:47 
GeneralRe: vb6 to vb.net Pin
Sonia Gupta16-May-07 23:50
Sonia Gupta16-May-07 23:50 
GeneralRe: vb6 to vb.net Pin
Christian Graus17-May-07 0:04
protectorChristian Graus17-May-07 0:04 
QuestionVB.NET Connect to Server Pin
Socheat.Net16-May-07 21:02
Socheat.Net16-May-07 21:02 
AnswerRe: VB.NET Connect to Server Pin
Sonia Gupta16-May-07 21:18
Sonia Gupta16-May-07 21:18 
GeneralRe: VB.NET Connect to Server Pin
Socheat.Net16-May-07 21:30
Socheat.Net16-May-07 21:30 
AnswerRe: VB.NET Connect to Server Pin
Sonia Gupta16-May-07 21:35
Sonia Gupta16-May-07 21:35 
QuestionRe: VB.NET Connect to Server [modified] Pin
Socheat.Net16-May-07 21:51
Socheat.Net16-May-07 21:51 
GeneralRe: VB.NET Connect to Server Pin
Sonia Gupta16-May-07 22:25
Sonia Gupta16-May-07 22:25 
GeneralRe: VB.NET Connect to Server Pin
Socheat.Net16-May-07 22:42
Socheat.Net16-May-07 22:42 

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.