(If only I had scars in my life)
Granted. You become GOD and have to deal with everyone's problems.
I wish I lived in a nutshell floating in the ocean.
(If only I had scars in my life)
Granted. You become GOD and have to deal with everyone's problems.
I wish I lived in a nutshell floating in the ocean.
I would have taken being sat on by a fat dude, not chic, being spat on, by a fat dude, not chic, but being stuck in the cigarette machine with no chance to go home with a stripper, that is plain rude!!!:'(
Granted. You turn into a beef jerky and get sold to a "reallllllllly" fat chic.
I wish I knew the things I know now, when I was first born.
(If I were sour cream and onion flavored, I would have eaten myself before realizing what flavor I was. The sock thing, uhmm.., ok...)
Granted. You wake up in the laboratory for testing vaccinations against the ebola disease and my "dirty sock" relatives are doing the testing.
I wish I was a dollar in a strip club.
(:'(, I never knew what flavor I was!!! :'(:'()
Granted. When you touch it, you turn into one yourself.
I wish I was a dirty sock. (try eating me now!)
King Kong taking a bath.
When you have nothing, you have everything you need.
History
(Nooooooo!!!, not me!!:D)
Granted. It is tied to a jet fighter plane on one end, you on the other, and the jet is taking off.
I wish to be a potato chip for one day.
This will not add anything to a database, but it might make it easier to work with for your previously posted code.
Select Case TextBox1.Text
'// 0921115150 “Dark Chocolate Truffles”, 2221001501 “ mint mintaways”, 6652300415 “Chocolate Covered Cherries”,
'// 0255541028 “Malted Milk Balls”, 0921115141 “Chocolate Covered Raisins “
Case "0921115150 ", " 2221001501 ", " 6652300415 ", " 0255541028 ", " 0921115141 "
MsgBox("Correct #")
Case Else
MsgBox("Must be either: 0921115150 /2221001501 /6652300415 /0255541028 /0921115141 ", MsgBoxStyle.Exclamation) ' Error message displayed
End Select
If you are in control of anyone's soul, you do not have a soul to control, you have yourself.
Unique
Granted. After a few "intelligent" conversations, the dog realizes that she could run for president and gets killed by a "intelligent" sniper cat that was running for the election as well.
I wish for everything I have no use for.
Pass the ex.Message as a Parameter.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As String = ""
Try
x = CStr(CInt(x) + 1)
Catch ex As Exception
getErrorMessage(ex.Message)
End Try
End Sub
Private Sub getErrorMessage(ByVal theReasonForTheError As String)
MsgBox("Your error message is: " & vbNewLine & theReasonForTheError, MsgBoxStyle.Critical)
End Sub
End Class
Application.Exit
will close the entire application.
Me.Close will close the current Form.
Depending if set for "When last form closes" or "When startup form closes" in your project's Properties/Application tab, it will respond differently for Me.Close
.
(:D)
Granted. Being late from a long day of granting wishes, the granter mistakenly grants you one eye to have a mouth, which screams at everything you see. Therefore, you got "eye scream".
I wish that a burnt out light bulb could change it's self.
To concentrate on how to concentrate is not to concentrate at all, or is it.
Pure
See if this helps for the SaveFileDialog.
Dim myCoolSaveFileDialog As New SaveFileDialog
If myCoolSaveFileDialog.ShowDialog = DialogResult.OK Then
Dim FileStream As New System.IO.FileStream(myCoolSaveFileDialog.FileName, IO.FileMode.Create)
'// rest of the code here for saving to file.
End If
(I can think so much clearer now and it's sooo sparkly:D.)
Granted. You die of a heart attack right after.
I wish for clouds in the sky, "sparkly" clouds.
I cannot determine if this sentence is appropriate or not.:D
Sun
The word incongruous, is incongruous.
Fact
Granted. After the lawsuit for granting world peace and having only one human left on earth to share it, you get an independent income of $1 US per year, and no where to spend it. Btw, who would sue you? :-/
I wish that my brain was not smaller than a peanut and especially not filled with dust.
(It could happen. "I wish, I wish, I wish...")
Leadership without quality and fed by price, lives a short life.
Endurance
A world without the existence of God, is a world without a God.
Quality
To investigate if soulless humans have souls, is a complete waste of time.
Complete
Granted. You get one without a screen, battery, and charger. Also, it's invisible.
I wish for world peace.:D
This was not tested, but should work.
Dim strTemp As String = ""
Dim sql As String = "SELECT * FROM DETAILPERIKSA ORDER BY IDPERIKSA DESC"
cmd = New OleDbCommand(sql, Conn)
dtReader = cmd.ExecuteReader
If dtReader.Read Then
strTemp = dtReader.Item("IDPERIKSA").ToString
strTemp = strTemp.Substring(strTemp.LastIndexOf("/") + 1) '// get all char.s after the last "/".
Else
TxtDETAILTRANS.Text = "MR/IR/001"
Exit Sub
End If
'MsgBox(strTemp)
TxtDETAILTRANS.Text = "MR/IR/" & CInt(CInt(strTemp) + 1).ToString("000") '// increment # +1, and Format it to 3 char. if less than 1000.
See if this helps.
Dim sCounter As String = "MR/IR/001" '// for testing.
Dim sTemp As String = Nothing '// temp string.
sTemp = sCounter.Substring(sCounter.LastIndexOf("/") + 1) '// get all char.s after the last "/".
sTemp = CInt(CInt(sTemp) + 1).ToString("000") '// increment # +1, and Format it to 3 char. if less than 1000.
MsgBox(sCounter.Substring(0, sCounter.LastIndexOf("/") + 1) & sTemp) '// display result.
Ideal solutions are the best solutions.
Integrity
A bachelor like none other. The prince...
You keep saying that you need Form2's ListBox to save and load the items in it, but have you tried adding Form2.
infront of the ListBox1 of my first post to this thread? For Each coolItem In Form2.ListBox1.Items '// loop thru all items in ListBox.
for saving, and for loading Form2.ListBox1.Items.AddRange(IO.File.ReadAllLines(myListBoxItemsFile)) '// load each line as an item in the ListBox.
?
Have you tried adding the code I supplied to Form2?
A language of a thousand words, is a language of confusion.
Balance
,when you and me live far away.
See if this helps.
DataGridView1.Rows.Add(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text)
You do not have to be from outer space to create an impact on earth.
Life
See if this helps.
1 ComboBox, 1 WebBrowser
Public Class Form1
Private arlComboBoxURLs As New ArrayList '// store url addresses.
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
With WebBrowser1
ComboBox1.Text = .DocumentTitle '// set .Text.
If Not ComboBox1.Items.Contains(.DocumentTitle) Then '// do not add duplicates.
arlComboBoxURLs.Add(.Url.AbsoluteUri) '// add url to ArrayList.
ComboBox1.Items.Add(.DocumentTitle) '// add title to ComboBox.
End If
End With
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
'// since the ArrayList and ComboBox will have the same index for their titles and urls, use the .SelectedIndex to locate item in ArrayList.
WebBrowser1.Navigate(arlComboBoxURLs(ComboBox1.SelectedIndex).ToString) '// navigate from ArrayList.
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
With WebBrowser1
.ScriptErrorsSuppressed = True '// block script messages.
.Navigate("http://daniweb.com")
End With
End Sub
End Class
An eclipse is quicker with a turbo.
Charge
When he was 30?
A future without knowledge, is a future not looking forward to.
Guarded
When he was 29.
that end the way I like.
If I were to get a bikini wax, I would not know where to start.
Return "Glad that I could provide some insightful information to your thread.:)"
Move your code from Form1_Paint
event to GroupBox1_Paint
event.
Next time you "Edit:" a post, notify the replier(s) to your thread by sending them a p.m.(private message). Otherwise, post a new post. This will alert the replier(s) that you or someone else had something else to add to your thread.
Regarding your "Edit:" issue, See if this helps.
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Static iCounter As Integer = 0
If Not iCounter = 10 Then '// 10 for 10 PictureBoxes.
If pcarray(iCounter) IsNot Nothing Then PictureBox1.Image = pcarray(iCounter).Image
iCounter += 1
Else
iCounter = 0 '// reset if needed to restart Timer again.
Timer1.Stop()
End If
End Sub
To create a history in a ComboBox, when navigating to a web site, add the url address to the ComboBox.
To save and load those items, check out this thread and replace the ListBox1 with your ComboBox.
http://www.daniweb.com/software-development/vbnet/threads/359030/1531427#post1531427
For the HomePage, I would use a TextBox with a CheckBox. If the CheckBox is .Checked, then load the url address from your TextBox as your HomePage, otherwise, navigate to a blank page or the default HomePage preset by your app..
For Favorites, if your app. has a Favorites menu, add the Favorites to the selected menu option and save/load those.
If it does not have a menu, I would use a ListView to save the Favorites to, since you can add the web page's title as the item.Text and use the web page's url as the item.Tag to load the web page from.
>>should i use a timer or what?
I would use a Timer.
As for creating a Splash Screen, I would just create it from a basic Form and not from the built in one from vb.net.
You will have a lot more control over it.
Something simple, using 2 Forms.
Form1 is your Main Form and Form2 will be used as the SplashScreen Form.
Form1 code
Public Class Form1
Private WithEvents tmr10MinuteTimer As New Timer With {.Interval = 1000, .Enabled = False} '// your Timer.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'// add this first.
Form2.FormBorderStyle = Windows.Forms.FormBorderStyle.None '// no border.
Form2.ShowInTaskbar = False '// do not show Icon of your Splash Screen in TaskBar.
Form2.ShowDialog() '// load the Splash Screen.
'// the code following that Form2.ShowDialog will not run until Form2 is closed.
'//------ other code here if needed.
'// start Timer after everything is loaded.
tmr10MinuteTimer.Start()
End Sub
Private Sub tmr10MinuteTimer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmr10MinuteTimer.Tick
Static iSeconds As Integer = 0
If Not iSeconds = 600000 Then '// 10 minutes.
iSeconds += 1 '// add to seconds.
Else
tmr10MinuteTimer.Enabled = False '// stop timer.
MsgBox("10 minutes alert")
End If
End Sub
End Class
Form2 code
Public Class Form2
Private WithEvents tmrSplashScreen As New Timer With {.Interval = 200, .Enabled = True} '// your Timer.
Private Sub tmrSplashScreen_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmrSplashScreen.Tick
Static iDelay As Integer …
Very confusing to understand.
Try my provided code in a new project with just one ListBox.
You can add a Button and a TextBox to that Form, and have in Button1.Click...
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.Items.Add(TextBox1.Text) '// add items to ListBox from TextBox.
End Sub
This will add individual items to your ListBox.
Close the Form by the little "x" in the top right corner of the Form and reload project. The ListBox items will be restored.
Not sure about any other languages, although I doubt that those languages do not have a similar solution to running all previous code before the Application.DoEvents
code line and update your app., then run the remaining code.
TextBox1.Text = "abcdefghi"
Application.DoEvents() '// do what needs to be done and move on.
Thread.Sleep(1000)
TextBox1.Text = "123456789"
See if this helps.
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Try
'// check if Array PictureBox IsNot Nothing, THEN add image from it to your PictureBox1.
If pcarray(c) IsNot Nothing Then PictureBox1.Image = pcarray(c).Image
If Not c = pcarray.Length - 1 Then '// if not c ='s the last PictureBox in your PictureBox Array...
c += 1 'add 1 to c
Else
'// either set c back to 0 or disable Timer.
c = 0
'Timer1.Enabled = False
End If
'/////////////////////////////////////
' Me.Text = c.ToString '// FOR TESTING TO VIEW YOUR "c" INDEX.
'////////////////////////////////////////
Catch es As Exception
Timer1.Enabled = False '// set Timer off first, then display MgbBox, else you will get tons of MsgBoxes.
MsgBox(es.Message)
End Try
End Sub
Also, this line of code Public pcarray(100) As PictureBox 'creates 100 pictureboxes
declares 101 PictureBoxes, not 100, since Arrays start count at 0, not 1.
Did you change Form1 to your Form's.Name and the same for the TextBox?
.If you still have issues, try it in a new project.
..Could be something in your code that is blocking the value being sent from your MonthCalendar to your Main Form's TextBox.