|
FAQs have been written, and ignored, since this forum was created.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
The good questions generally get answered and the dumb ones get dumped on, there have been a number of suggestions (including FAQs) to alleviated the issues but an idiot is an idiot and no matter what Chris tries will still post an idiot question before either searching or thinking.
You learn to take a small pleasure in dumping on the idiots or ignoring them. I do notice that the level of idiocy tends to fluctuate quite dramatically.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Ahhahha..........now that's the best response I've read in a while!
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Hi,
How can I addjust sharpening and contrast from a bitmap/image
Jan
I'm using VB.net 2008
I'm using u function like this:
Function Negatief(ByVal I As Bitmap) As Bitmap
Dim b As Bitmap = I.Clone
Dim clr As Color
For py As Integer = 0 To I.Height - 1
For px As Integer = 0 To I.Width - 1
clr = I.GetPixel(px, py)
b.SetPixel(px, py, _
Color.FromArgb(clr.A, clr.R Xor 255, clr.G Xor 255, clr.B Xor 255))
Next px
Next py
Return b
End Function
|
|
|
|
|
To sharpen an image you subtract part of the intensity from the surrounding pixels. To change the contrast you recalculate the intensity values to stretch the intensity curve.
There is some article here on cp about using a color matrix to modify images, which would work for changing contrast.
I have some code for sharpening lying around, that I thought that I would turn into an article some day...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
U have said that you have an image sharpening code lying around!Would you mind if i see it because am working on an image sharpening form which uses track bar to show the effects of sharpening, step by step as you slide the bar.
So i do hope that code would help me kick off.
|
|
|
|
|
Hi Friends,
Pls. help me to send mail in vb.net 2005.
What is the requirements to send mail?
My OS are Win XP with SP2, No mail component(MS Outlook, Outlook express, etc) configure in my PC.
Give me example and requirement to send mail through vb.net 2005.
Thank you,
Chintu Shah
|
|
|
|
|
|
Thank you for immediate reply.
But that links example not work on VB.Net 2005.
|
|
|
|
|
Chintu Shah wrote: But that links example not work on VB.Net 2005.
Maybe not, but if you have any idea about VB.NET it should be easy enough to convert
There are loads of examples both here on CP and on Google, just use a little initiative.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
The page is called "Visual Basic .NET Code Sample: Send Mail." Is there something I'm missing?
|
|
|
|
|
|
I wrote an article on how to use google here on CP. Sending email is both so trivial, and so widely documented, and yet a quesiton asked here so often, that I used it as an example, you should check it out.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi I hope this helps you out...here you are sending mail through exchange server.
This is is vb.net 2005
Public Sub psSendMail(ByVal sSubject As String, ByVal sBody As String)
Try
Dim EmailFrom As String = "SourceServer@Somewhere.com"
Dim EmailTo As String = "YourEmail@yahoo.com"
you can use either of these methods to connect to exchange server
'Dim EmailServer As New System.Net.Mail.SmtpClient("192.0.0.1")
Dim EmailServer As New System.Net.Mail.SmtpClient("emailservername.com")
Dim myMessage As New System.Net.Mail.MailMessage(EmailFrom, EmailTo, sSubject, sBody)
Try
EmailServer.Send(myMessage)
Catch
Finally
myMessage = Nothing
End Try
Catch ex As Exception
End Try
End Sub
|
|
|
|
|
hi friends,
I have made login form.After login when i logout then again Re-login that time without filling username and password show main form during clik on login button.
i want that when i logout then login form show with blank text boxes and when click on login button with blank textboxes gave message(fill text boxes)
Plz sort it out.
I am using following coding:
Code:
Try
conn.Open()
cmd = New SqlCommand("select * from usrs where uname = @user and upwd = @pwd", conn)
cmd.Parameters.AddWithValue("@user", Trim(TextBox1.Text))
cmd.Parameters.AddWithValue("@pwd", Trim(TextBox2.Text))
dr = cmd.ExecuteReader
While dr.Read()
a = dr.Item("upwd")
b = dr.Item("uname")
If TextBox1.Text = a And TextBox1.Text = b Then
sid = dr.Item("uid")
ProgressBar1.Visible = True
'Button1.Visible = False
'Button2.Visible = False
valid = True
Me.TextBox1.Clear()
Me.TextBox2.Clear()
End If
End While
dr.Close()
Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
cmd = Nothing
End Try
modified on Wednesday, September 10, 2008 8:51 AM
|
|
|
|
|
I don't think there's any reason for If TextBox1.Text = a And TextBox1.Text = b Then . Of course they're going to be equal because that's what the query was to start with. (I assume you meant to say And TextBox2.Text = b instead of TextBox1 twice.)
If the username and password are shown in the textboxes when the form loads, clear the textboxes in Form_Load() .
|
|
|
|
|
Nothing happen:
Try
sUNAME = Trim(TextBox1.Text)
sPass = Trim(TextBox2.Text)
conn.Open()
cmd = New SqlCommand("select * from usrs where uname = @user and upwd = @pwd", conn)
cmd.Parameters.AddWithValue("@user", Trim(TextBox1.Text))
cmd.Parameters.AddWithValue("@pwd", Trim(TextBox2.Text))
dr = cmd.ExecuteReader
If dr.HasRows = 0 Then
MsgBox("Invalid User or Password, Try Again", vbCritical, "Login Error")
TextBox2.Clear()
TextBox1.SelectionStart = 0
TextBox1.SelectionLength = Len(TextBox1.Text)
TextBox1.Focus()
Exit Sub
Else
While dr.Read()
a = dr.Item("uname")
b = dr.Item("upwd")
If sUNAME = a And sPass = b Then
sid = dr.Item("uid")
ProgressBar1.Visible = True
valid = True
End If
End While
End If
dr.Close()
Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
cmd = Nothing
End Try
form closing event:
sUNAME = String.Empty
sPass = String.Empty
|
|
|
|
|
Hi Frnds..
I need to convet byte array into string and send the text to SMTP Server for sending mails..
Thnks in advance...
Regards Pushpa...
|
|
|
|
|
Dim s As String = System.Text.Encoding.Default.GetString(bytearray)
|
|
|
|
|
In my project I have 3 datatables with different data inside. I have datatables like:
Customers:
Customer number | Name | ID | 123450 | Customer A | 169 | 987650 | Customer B | 753 |
orders in last week:
and orders in sekond week in past:
Now I want to combine these tables data to table like next:
Customer number | Name | ID | 1 week
| 2 week
| 123450 | Customer A
| 169 | 7 | 9 | 987650 | Customer B
| 753 | 3 | 2 |
I know this can be done with datarelation or with SQL inner join but idont have any datasource in my project becose I parse these datas from csv-file to in-memory datatables and dataset.
So how can i do this 4th table in my project?
Thanks in advance
TEH
|
|
|
|
|
_teh_ wrote: I parse these datas from csv-file to in-memory datatables
What makes you think you cannot create a datarelation for a dataset (a dataset is always an "in memory" construct).
You will need to move the 3 tables to the 1 dataset and then create the realtions but this is easy using dataset.tables.add
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
So this can be done with datarelations.
I have not use datarelations before so could you please tell me how should I create the relation to get same result than with this SQL-code?
SELECT a.customerID, a.Name, a.shop_id, ISNULL(sa.PCS1, 0) AS PCS1, ISNULL(sb.PCS2, 0) AS PCS2
FROM customers AS a
LEFT JOIN Shop1 AS sa ON (a.shop = sa.shop)
LEFT JOIN Shop2 AS sb ON (a.shop = sb.shop)
|
|
|
|
|
Data relations are not the same as joins. Only the inner join is valid in a data relation. RTFM type in datarelation hit F1 for more details.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
Dim Table1 As DataTable
Table1 = New DataTable("Customers")
What would be the other way to write this statement??
Please Suggest
Thank You
Nitin
Nitin Jenwal
|
|
|
|
|
Dim table1 As New DataTable("customer")
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|