|
I have 7 images entering a form in VB.net via the use of label.image and would like to know how it could be possible to make the images that i have placed come in one after the other rather than all at once.
My code for image placement look like this for arnumbers() = 0-6 and label from 1 to 7
Label1.Text = arnumbers(0)
If Label1.Text <= 10 Then
Label1.Image = MyImage3
ElseIf Label1.Text > 10 And Label1.Text <= 20 Then
Label1.Image = MyImage4
ElseIf Label1.Text > 20 And Label1.Text <= 30 Then
Label1.Image = MyImage5
ElseIf Label1.Text > 30 And Label1.Text <= 40 Then
Label1.Image = MyImage6
Else
Label1.Image = MyImage7
End If
I hope someone can help.
Jarlath Eoin Gallagher
|
|
|
|
|
I assume this is a loop of somekind.
What i think you need to do is either refresh the label at the end of the loop.
label1.refresh
and set some sort of timer delay in between changing the image.
From the info given that is the best i can do.
"If i was king cigarettes would be free."
|
|
|
|
|
I have a toolbar on form, i set some images to image list, then i set it to toolbar. In Design Time, i see images on Toolbar buttons. But they are not visible at run time. What s Wrong.
NOTE : first I used Application.EnableVisualStyle then i commented it. it doesnt work in both situation.
|
|
|
|
|
i attach a datetime picker control the form. Then i display a message on its "TextChanged"event. Here is the code.
Private Sub DateTimePicker1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DateTimePicker1.TextChanged
Msgbox("Code Runs")
End Sub
Means this code will display a message when i change any day from the datetime control. But when i changed the month, then it display message 30 times, and when i change year, it display my message 365 times.
I need that when i change the month and year from this controls, then it cannot display message. It only display message when i change the day. How can i do this.
plz help
EsHbAn BaHaDuR
|
|
|
|
|
Hi,
I am trying to send an email using VBScript. I have managed to write code to send the email, and include an attachment. I have currently got the following vbs code:
______________________________________________
Dim objOutlook
Dim objOutlookMsg
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(0)
With objOutlookMsg
.To = "Recipient Name"
.Cc = " "
.Subject = "Updates Notification"
.Body = vbCrLf & "The documents listed in the attached text file have recently been updated" & vbCrLf & vbCrLf
' .HTMLBody = "HTML version of message"
.Attachments.Add ("C:\Update Notification\Text.txt")
.Send
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
_____________________________________________
Now, I am trying to put the contents of the text file into the body of the email (instead of attaching the text file into the email)
If viable, anyone know how to do it?
Any help will be much appreciated....thanks!!
|
|
|
|
|
Easy. Use a FileSystemObject to OpenTextFile. This will return a TextStream object. Use the ReadAll method to read the contexts of the file into a variable, then close the file. Tthen you just append the contents of the variable to the Body of the message.
ReadAll Method[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
Thanks alot for the help....much appreciated!!
Read the link you put in the reply.
Now have the following code, which does the trick:
_________________________________________________
Function ReadTextFileTest
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f, Msg
Set fso = CreateObject("Scripting.FileSystemObject")
' Set f = fso.OpenTextFile("C:\Update Notification Code\Text.txt", ForWriting, True)
' f.Write "Hello world!"
Set f = fso.OpenTextFile("C:\Update Notification Code\Text.txt", ForReading)
ReadTextFileTest = f.Read(9999)
End Function
Dim objOutlook
Dim objOutlookMsg
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(0)
With objOutlookMsg
.To = "Email Address"
.Cc = ""
.Subject = "Update Notification"
.Body = vbCrLf & "The documents listed below have recently been updated:" & vbCrLf & vbCrLf & ReadTextFileTest & vbCrLf
.Importance = 2 '0 = low, 1 = normal, 2 = High importance
.Send
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
_________________________________________________
Any ideas on how to make it more efficient?
Thanks alot once again.
|
|
|
|
|
Un-Connected wrote:
Any ideas on how to make it more efficient?
What do you mean by "more efficient"?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi all,
i need to view a html(say abc.html) in my form and compare it to another html . both these should be placed side-by-side. i need to add synchronized scrolling to these.
any inputs?
thanks
|
|
|
|
|
Using VS.net 2005, the PictureBox in WinForm could not show pictures.
Why?
|
|
|
|
|
rushing wrote:
Using VS.net 2005, the PictureBox in WinForm could not show pictures.
Why?
Can you be more descriptive please. If I asked they question "Using Toyota Yaris, the engine won't start. Why?" how much of a useful response do you think I will get.
What code are you using to try and display the pictures?
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
1 Create a project
2 Using a winform
3 drag a picturebox to the winform
4 select the picturebox
5 select the property of image
6 select a jpg or bmp file for the picturebox
7 nothing happened , picture could not be seen
8 that's all
|
|
|
|
|
I try to run SQL statement in by OleDbCommand , the database is Oracle 9i.
However, some error occurs(ORA-00911).
Here is the sourcecode:
Dim ConnString As String
ConnString = "Provider=msdaora;Data Source =" + Server + ";User ID=" + User + ";Password=" + Password + ";"
Dim oCn As New OleDbConnection
Try
oCn.ConnectionString = ConnString
oCn.Open()
If oCn.State = Data.ConnectionState.Open Then
Dim oCmd As New OleDbCommand
oCmd.Connection = oCn
'CreateProgramManager(oCmd)
strSQL = "CREATE USER ""PRGM_MNGR"" " + _
"PROFILE ""DEFAULT"" " + _
"IDENTIFIED BY ""xxxx"" " + _
"DEFAULT TABLESPACE ""PROGRAM"" " + _
"TEMPORARY TABLESPACE ""TEMP"" " + _
"ACCOUNT UNLOCK; "
strSQL = LTrim(strSQL)
'MsgBox(strSQL)
oCmd.CommandText = strSQL
oCmd.ExecuteNonQuery()
|
|
|
|
|
|
|
Now I want to create a toolbar or menubar likes office2003's,and I have done parts of it,but parts of it I couldn't do.
Anyone has the sourcecode of it or can do it,please post it to my E-Mail or tell me how to do it .Thank you!
|
|
|
|
|
Noone is just going to give you the source code for an entire toolbar or menubar. We will help you with YOUR code, but you haven't asked us any questions about any problems your having.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The problem of me is that I couldn't redraw the menubar,because the mainmenu is made up of menuitems,I couldn'd measure the size of the top rectangle the mainmenu located at, so I cann't draw the office2003 menubar color on the top of the form.
|
|
|
|
|
dyh2222 wrote:
because the mainmenu is made up of menuitems
You expected something different?
dyh2222 wrote:
I couldn'd measure the size of the top rectangle the mainmenu located at
Why would you want to?
dyh2222 wrote:
so I cann't draw the office2003 menubar color on the top of the form
I take it your trying to ownerdraw the entire Office 2003 menu bar?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Structures support event handlings ?
|
|
|
|
|
How to create Shared Procedures, Static procedures, Shared Properties, Shared events. An example will be very much appreciated
|
|
|
|
|
Public Shared Sub SubNameHere
End Sub
Public Shared Function FuncNameHere
End Function
Public Shared Event EventNameHere()
Public Property NameOfProp()
Get
End Get
Set(ByVal Value)
End Set
End Property
Public Structure StructureName
Dim TestStructure As String
End Structure
Not sure on the static
hope that is what you meant
"If i was king cigarettes would be free."
|
|
|
|
|
How to work on multiple columns in a listbox? Let say, I want two columns, Name and Roll should be displayed two columns in the listbox, values are stored in the database "student".
|
|
|
|
|
Apparently, I read recently that .NET does not support multiple columns in a listbox. I was trying to accomplish the same thing when I read about the this.
|
|
|
|
|
But there is a property Multicolumn with Listbox.
What is this ??
|
|
|
|