|
Im sorry you dont understand what I am trying to say, Im trying to say 'if i clicked on a button to make this code run' where would i put this code in the button click event, in the middle, at then end? or maybe this goes at the very start of the program (obviously not in most cases). anyhow this is starting to put me off of coding now since i cant get a straight answer from anyone... I came here to get straight answers like everyone else who posts. not to start a war.
|
|
|
|
|
SLRGrant wrote: 'if i clicked on a button to make this code run' where would i put this code in the button click event, in the middle, at then end?
It plain does not matter. Parts of this code, you don't want, they just print to the console. Other parts go where-ever, in the event, you want the registry entry to be written. As I said before, if you want to go back and forth, you're better off writing the values in the close event of the form, and not every time a check box is changed.
SLRGrant wrote: anyhow this is starting to put me off of coding now since i cant get a straight answer from anyone
I am trying desperately to help you, but your questions make no sense to me. I don't know what else you're doing in your event handler, or why you think it matters what order you do things in, but can't work out which order is correct. I don't know if you realise that some of that code isn't about writing to the registry, or if you understand what any of it does, line by line, or just have an idea of what it does as a block.
SLRGrant wrote: I came here to get straight answers like everyone else who posts. not to start a war.
I'm not trying to start any war, I am trying to help. Since the release of the Express Editions, I find often the best help I can give people is to recommend they start over and try to learn some basics. I'm sorry if that offended you, I was only trying to give good advice.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
This is driving me crazy! I've been able to relay through my office SMTP server, but I can't use vb.net to authenticate properly through my mailserver at home. I use Kerio Mailserver and my whole family relays through it, but I can't get vb to do it. Here's a sample --
Dim MailClient As New System.Net.Mail.SmtpClient
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.MailClient.Host = "xxxx.xxx"
Me.MailClient.Port = "25"
Dim MyCred As New System.Net.NetworkCredential("Brandon@xxxx.xxxx", "xxxxxxx")
MailClient.UseDefaultCredentials = False
MailClient.Credentials = MyCred
MailClient.Send("Brandon@xxxx.xxx", "bbmxxx@xxxxx.xxx", "[Test]- VB App", "VB App")
End Sub
Now, when I try to send an email to a email address on the mailserver, it works fine. But when trying to send to for example, a Gmail or Yahoo account, it will not - says 'Cannot Relay'. Yes, the user I'm authenticating with does have permission to relay....
Thanks!
Brandon
|
|
|
|
|
I want to make one of my forms refresh itself and all controls in it every few seconds, how would I go about doing this?
Thanks in advanced
|
|
|
|
|
What you need to do is to create a new timer and set the .Interval to the number of few seconds you want multiply by 1000 (ex. 1000 = 1 sec). Timer1.Interval=3000 'will occur every 3 seconds
After it you need to Enable the timer: Timer1.Enabled=True
In the Timer1_Tick event:
=========================
> To update graphic, use Me.Refresh.
> To update controls, write the code that does it.
Ex:
<br />
Private Sub Timer1_Tick(...)<br />
Me.Refresh ' Refresh the form<br />
txtText1.Text = strA ' strA is a string that changed<br />
numID.Text = Num3 ' Num3 is an Integer<br />
...<br />
End Sub<br />
|
|
|
|
|
Ah thanks for the reply, it works perfecly
|
|
|
|
|
The code I just added is VB.NET code.
In VB6 the parameters are same, but the event called "Timer" instead of "Tick".
<br />
Private Sub Timer1_Timer<br />
Me.Refresh ' Refresh the form<br />
txtText1.Text = strA ' strA is a string that changed<br />
numID.Text = Num3 ' Num3 is an Integer<br />
...<br />
End Sub<br />
|
|
|
|
|
How can I best persist the format of a datagridview (column order and column widths) across sections? I can't figure out how to serialize it.
Thanks!
|
|
|
|
|
could not access CDO.Message ----------Error how to rectify
How to access CDO.Message ---------------Urgent
|
|
|
|
|
I don't understand the question
|
|
|
|
|
hi guys,
i am using sqlserver and datagrid.
i want to change to the rows color while aplication runnig
and i specially want to change the color of row that in the index that i specified with writing code
how can i do this
thanks..
|
|
|
|
|
Ya u can change the row color by using
For all rows:
DataGrid1.DefaultCellStyle.BackColor = Color.DarkGray
For alternating row style:
DataGrid1.AlternatingRowsDefaultCellStyle.BackColor = Color.Beige
Janani
|
|
|
|
|
thakn you but i want to change only one row.
for example
DataGrid1.CurrentRowIndex = 3
i want to change this row.
and there not AlternatingRowsDefaultCellStyle ana DefaultCellStyle in datagrid of peculiarity
or there?
if there, how can i use?
|
|
|
|
|
This is for changing the particular row color.
Try it:
DataGrid1.Rows(3).DefaultCellStyle.BackColor = Color.Azure
For which row, u want, change the row value only.
|
|
|
|
|
excuse me..i didnt write this.i use vb.net.
i cant this in vb.net
DataGrid1.Rows(3).DefaultCellStyle.BackColor = Color.Azure
|
|
|
|
|
This is in VB.net only.
I worked out.
It was changing the particular row.
Janani
|
|
|
|
|
Hi
I want coding for a text box in which if i press a '.' Dot from keyboard then
a message should be displayed and that '.' Dot must not be seen in that TextBox. How can i do that.
Please help me.
I have coding for text box in which if i press more then 1 '.' dot then message will be seen But how can i do for first '.'dot?
If KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 46 Then
If KeyAscii = 46 Then
If InStr(TxtMRP.Text, ".") Then
KeyAscii = 0
MsgBox "You can enter One Decimal at a Time", vbInformation
Exit Sub
End If
End If
End If
Withe Regards
Alok Singh
|
|
|
|
|
Ya u can do this by using regular expression regex.
Janani
|
|
|
|
|
regex
What is that?
Kindly tell me
i will be very thankful to you.
with regards
Withe Regards
Alok Singh
|
|
|
|
|
Dim Id As Boolean = ValidateSearch(TextBox1.Text)
If Id = True Then
--------> U do ur functionality.
else
MsgBox("Don't Enter Dots", MsgBoxStyle.OkOnly)
end if
This is the regular expression. U include it in ur code behind.
Public Function ValidateSearch(ByVal texttype As String) As Boolean
Dim RoomType As System.Text.RegularExpressions.Regex _
= New System.Text.RegularExpressions.Regex("[0-9]+$")
Dim M As System.Text.RegularExpressions.Match = RoomType.Match(texttype)
Return M.Success
End Function
This regular expression will accept only numbers.
Like this there are several expressions, like characters etc.
-- modified at 2:05 Monday 30th October, 2006
With regards Janani
|
|
|
|
|
Thank you very much
Janani Divya
Withe Regards
Alok Singh
|
|
|
|
|
Is there a way to expose classes belonging to a web-service without referencing the dll?
Every time I add the web-service as regular web reference then I lose the ability to access all the classes belonging to the web-service. Currently the only Web Methods I have access to are located in the service.asmx file. If I could access the classes belonging to the web service then I could use it to pass strongly typed collections and keep my functions grouped accordingly. Thanks so much!
- Paul
|
|
|
|
|
Hi members, I've written a prog that enables the user to move controls around on the form using the mouse at runtime. I would like to know how to save the position of these controls so that their positions are the same as they left them, when they're loaded up again.
|
|
|
|
|
You will have to save the position information in an external location (config file, registry, database, etc.). Generally you would load the settings when the form loads and save the settings upon closing of the form.
Mike Lasseter
|
|
|
|
|
Cheers Mike, but any idea how I would go about doing this? Any help at all is helpful.
EvSott
|
|
|
|