|
Oh ok, never thought about using .JPG or .GIF, I am curious on how to convert a chart into an image file.
|
|
|
|
|
I am in the middle of developing a VB.NET application that interfaces with Excel 2002. I had a hardware problem, so corporate sent me a new computer, but it is loaded with Excel 2003. This caused my Solution's reference to Excel to disappear!
I can't use a reference tothe Excel 2003 library, because none of my users have this version. I loaded Excel 2002 into a different folder than Excel 2003, but I can't find the file that contains the library.
Can anyone tell me how to reestablish the correct reference?
Thanks!
nvmoss
|
|
|
|
|
Hi everyone
Is there a windows or customer control that handle picutes and text, or is there a way to make the text box handle pictures as well. How do you format the layout in text boes so that they r in parargraphs for example or in the the correct layout style that you want it.
Thanks
Vu
|
|
|
|
|
The control System.Windows.Forms.RichTextBox can display both pictures and text in the same control, along with formatting features for fonts, colors, etc.
|
|
|
|
|
Yeah, the RichTextBox control supports images inline in the document. It is basic functionality, but it works. You can search the web for other controls, like RichEdit, but most you'll have to pay for if you want to use them.
RageInTheMachine9532
|
|
|
|
|
Hi everyone
I am in my final yr at uni doing my main project on a program to teach the basics of Word to beginners, it will be it two languages Vietnamese and English. My program will have tests, quizzes and tutorials. I have been playing around with VB.Net and can not decide on how to get the forms to loads the files, and what format to have the files in html, pictures our just a text box. Please can anybody suggest a suitable method for loading files on forms or another of presenting data on forms.
Thanks
Vu
|
|
|
|
|
I'm not totally clear on what you're trying to do. Are you trying to load MS Word documents in a Windows Form? What is the end result?
|
|
|
|
|
How do I add attributes to an assembly that specify
1. That an assembly/class is visible/invisible to COM
2. That a method is visible/invisible to COM
3. That a property is visible/invisible to COM
Jim
|
|
|
|
|
The default is visible.
If you want to hide something, use System.Runtime.InteropServices.ComVisibleAttribute like so:
<ComVisible(False)> _
Public Class MyClass
End Class The same syntax applies to methods and to properties.
However, types are not registered with COM by default. To do so, check 'Register for COM Interop' in the project properties, or use regasm.exe .
|
|
|
|
|
Thats great, thanks very much ;o)
Jim
|
|
|
|
|
Hi
ive created a program that will read a file, check it for the word "error" and then email me with a list of all new errors in the file. im now trying to get the program to read the file every 5 minutes and then send email notification only if there are new errors - could some1 pls help? here's my code so far, which was working until i started to get the timer working!
Imports System
Imports System.IO
Imports System.Collections
Imports System.Web
Public Class Form1
Inherits System.Windows.Forms.Form
Private Shared myTimer As New System.Windows.Forms.Timer
'Private Shared exitFlag As Boolean = False
Private Shared Sub TimerEventProcessor(ByVal myObject As Object, ByVal myEventArgs As EventArgs)
myTimer.Stop()
Dim LineNo As String
Dim CurrentLineNo As New Integer
If GetSetting("OrEM", "Settings", "LineNo") = "" Then
SaveSetting("OrEM", "Settings", "LineNo", "1")
End If
LineNo = Val(GetSetting("OrEM", "Settings", "LineNo"))
Dim objReader As New StreamReader("c:\ProjectSearch\sx3liveALRT.LOG")
Dim sLine As String = ""
Dim arrText As New ArrayList
Do
sLine = objReader.ReadLine() : CurrentLineNo = CurrentLineNo + 1
If CurrentLineNo >= LineNo Then
If InStr(UCase(sLine), "MON") Or InStr(UCase(sLine), "TUE") Or InStr(UCase(sLine), "WED") Or InStr(UCase(sLine), "THU") Or InStr(UCase(sLine), "FRI") Or InStr(UCase(sLine), "SAT") Or InStr(UCase(sLine), "SAT") Then
sLine = objReader.ReadLine() : CurrentLineNo = CurrentLineNo + 1
If InStr(UCase(sLine), "ERROR") Then arrText.Add(sLine)
While sLine <> ""
sLine = objReader.ReadLine() : CurrentLineNo = CurrentLineNo + 1
End While
End If
End If
If Not sLine Is Nothing Then
End If
Loop Until sLine Is Nothing
objReader.Close()
'create mail notification
Dim mailMsg As New System.Web.Mail.MailMessage
mailMsg.BodyFormat = Mail.MailFormat.Text
mailMsg.To = "???"
mailMsg.Subject = "???"
mailMsg.From = "???"
Dim txtBody As String
For Each sLine In arrText
txtBody = txtBody & sLine & vbCrLf
Next
mailMsg.Body = txtBody
System.Web.Mail.SmtpMail.SmtpServer = "???"
System.Web.Mail.SmtpMail.Send(mailMsg)
SaveSetting("OrEm", "Settings", "LineNo", Trim(Str(CurrentLineNo - 2)))
LineNo = Val(GetSetting("OrEM", "Settings", "LineNo"))
' myTimer.Start()
'adds the event and the event handler for the method that will process the timer event to the timer
AddHandler myTimer.Tick, AddressOf TimerEventProcessor
CurrentLineNo = 0
'sets the timer interval to 5 minutes
myTimer.Interval = 30000
myTimer.Start()
'runs the timer, and raises the event
' While exitFlag = False
'Processes all the events in the queue
Application.DoEvents()
'End While
End Sub
Chrissy Callen
|
|
|
|
|
Since I am not sure what OS you are running on I can’t make a concrete recommendation but why not use the available system scheduler that exists in the OS and not worry about that part in your application.
Most OS today offer some type of scheduler to automate tasks running at specific intervals.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Hi there Ok, the timers seems fine now, next prob is this: I want the program to email only if the file contains new "errors" but NOT to email if there are no new instances of the "error" word. so i wrapped the mail code in if sline <> "" then ... (mail code)...end if and it doesnt seem to mail at all now (i added errors manually to the file to check it). Could u pls tell me where im going wrong? Thanx!
Imports System
Imports System.IO
Imports System.Collections
Imports System.Web
Module Module1
Sub Main()
Dim myTimer As New System.Timers.Timer
Dim LineNo As String
myTimer.Stop()
Dim CurrentLineNo As New Integer
If GetSetting("OrEM", "Settings", "LineNo") = "" Then
SaveSetting("OrEM", "Settings", "LineNo", "1")
End If
LineNo = Val(GetSetting("OrEM", "Settings", "LineNo"))
Dim objReader As New StreamReader("filename")
Dim sLine As String = ""
Dim arrText As New ArrayList
Do
sLine = objReader.ReadLine() : CurrentLineNo = CurrentLineNo + 1
If CurrentLineNo >= LineNo Then
If InStr(UCase(sLine), "MON") Or InStr(UCase(sLine), "TUE") Or InStr(UCase(sLine), "WED") Or InStr(UCase(sLine), "THU") Or InStr(UCase(sLine), "FRI") Or InStr(UCase(sLine), "SAT") Or InStr(UCase(sLine), "SAT") Then
sLine = objReader.ReadLine() : CurrentLineNo = CurrentLineNo + 1
If InStr(UCase(sLine), "ERROR") Then arrText.Add(sLine)
While sLine <> ""
sLine = objReader.ReadLine() : CurrentLineNo = CurrentLineNo + 1
End While
End If
End If
If Not sLine Is Nothing Then
End If
Loop Until sLine Is Nothing
objReader.Close()
If sLine <> "" Then
'create mail notification
Dim mailMsg As New System.Web.Mail.MailMessage
mailMsg.BodyFormat = Mail.MailFormat.Text
mailMsg.To = "me@co.uk"
mailMsg.Subject = "name"
mailMsg.From = "name"
Dim txtBody As String
For Each sLine In arrText
txtBody = txtBody & sLine & vbCrLf
Next
mailMsg.Body = txtBody
System.Web.Mail.SmtpMail.SmtpServer = "server"
System.Web.Mail.SmtpMail.Send(mailMsg)
End If
SaveSetting("OrEm", "Settings", "LineNo", Trim(Str(CurrentLineNo - 2)))
LineNo = Val(GetSetting("OrEM", "Settings", "LineNo"))
CurrentLineNo = 0
myTimer.Interval = 30000
myTimer.Start()
End Sub
End Module
Chrissy Callen
|
|
|
|
|
Hello all!
I have a problem with my application.
After completion of my program, when I install it to some other PC & try to run it, it gives me "path not found error" for database file. I have used Ms Access file as my backend.
I use Data Adapter Configuration Wizard to make Oledbadapter, Oledbconnection & Dataset. I then realize that the path of my backend file is set according to my computer's path. Someone told me to use Application.Startuppath in connection string.
Now I want to know here how to use it, & specially where to use it?
As I have mentioned earlier that I use wizard to make connection object, I copy the connection string from oledbconnection's property window & copy it to my form's load event like so (but I didn't delete the Oledbconnection object):
Dim cnn as new oledbconnection
dim path as string = application.startuppath & "\" & "Database.MDB"
cnn.connectionstring="........, Data source=" & path & ",..........
But this thing didn't work here. I still got path error, or sometimes I got this error "Object reference not set to an instance of an object."
Isn't there a way by which I can solve this problem? I am using wizard as I am not so familier with VB.NET.
Can anyone help me to complete my project.
Thanx in advance.
|
|
|
|
|
A couple of questions...
Is the Database.MDB file shared on a server somewhere or is it local to the client machine?
If it is supposed to be local, is the file part of the installation?
If it is part of the install, where is the file being written to?
RageInTheMachine9532
|
|
|
|
|
The file is not shared, its local to client system.
I want to deliver this database file to my client, so I added it while I develop my setup & package. So when the setup is run, the file is also installed to application's folder.
Now for your last question, sorry I don't understand what you want to say. Its a simple Ms Access file having some tables & relationships between them. That's it. I just want to deliver this file alongwith my application so I add it with the application.
Waiting for reply.
Thanx...
|
|
|
|
|
Are you absolutely sure the database file is being written to the same directory as your .EXE?
RageInTheMachine9532
|
|
|
|
|
I am using the componentone TrueDBGrid and i want to use Celltips. Using the FetchCellTips event is can populate the celltip with informnation. However i cant set the tooltip to multiline or grow so when i have a long celltip it is displayed as one long line.
Anyone?
Grtz, Guus
|
|
|
|
|
I had the same problem and I could solve it but when I try it on a different application it worked and which IDE are you using in VB.NET
Regards
Stepdaddy
|
|
|
|
|
I am using VB6. Even tried strTip = "Hello" & vbcrlf & "World"
didnt work
Grtz, Guus
|
|
|
|
|
|
hello friends,
iam developing an application. i want to insert a picture from my front end . this picture has to be saved in the sql server database. how can i do it
|
|
|
|
|
vb6 and ADO or Vb.Net and ADO.NET ?
if vb6:
check the AppendChunk method of the field object
you can load the picture in an array then add it to that field.
|
|
|
|
|
how do i go about scanning an image with an adodb control with access as a backend and VB6 as the front end.THis is needed for the purpose of the project regarding automating the registrations of a computer institute.
PRAVEED
|
|
|
|
|
Are you f***ing mad. Try and do something else like have sex. F***er?????
|
|
|
|
|