|
MaWeRic wrote:
as you know, you can either select or click outside to close calendar. I want to change click to mouseleave-function on my control.
If someone who isn't that good with a mouse uses your control, they're going to get very frustrated because your closing a control that they are having problems keeping a mouse pointer in. Changing this behavior is not recommended. I am one of those people who likes to move a mouse pointer out of the way so I can see an entire control before I click on something.
Microsoft published Official Guidelines for User Interface Developers and Designers[^] for a reason...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Anyone Interested...
Is there a specific methodology or "best practice" for having 2 of your user controls on a single web page communicate information. For example, I have Control A which has printing press information on it and Control B which has press materials information on it. I suppose I could expose many of the press properties Public Shared, however, I don't feel that this is elegant as object oriented programming goes.
Would any one care to suggest some ideas that work for your development practices?
Thank you.
William
|
|
|
|
|
I am using vb.Net 2003. the problem is
I want to open a compose mail page of outlook /outlook express with an attachment of image file. upto now I am succeeded in opening mail with every information like To, From, Bcc,CC, subject, Body.. but Attachment is a problem can any one help me out how to do this ?? the code is
Dim mailMess As String = "mailto:abc@xyz.com"
mailMess = mailMess & "?Subject=Mail from Rizwan"
mailMess = mailMess & "&Body=This is the sample text"
mailMess = mailMess & "&attachment=C:\Connection.txt"
System.Diagnostics.Process.Start(mailMess)
this opens fine but attachment never comes... I tried the word Attach as well but no result..
note: I have implemented this with outlook reference library. but dont want to use that as I had problem when client is using any other version of outlook ...
any solution will be highly appreciated..
|
|
|
|
|
I seem to remember reading somewhere that attachment from the command line are not supported. I'm trying to find where I saw this, but it's been a long time...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
stop searching for that line.. I trust your words..
thanks
|
|
|
|
|
Hi all,
I am making a usercontrol but i would like it to make its background colour transparent?
Does anyone know how to do this?
i would like the background colour to be transperent when the control is moved as well, so it does not affect other controls on the form
this is my code so far.....
Public Class MyTransparentControl
Inherits UserControl
Protected Overrides Sub OnPaint(ByVal e As Windows.Forms.PaintEventArgs)
Dim myPath As New System.Drawing.Drawing2D.GraphicsPath
Dim myGraphics As Graphics = e.Graphics
Dim myPen As New Pen(Color:=Me.ForeColor, Width:=2)
Me.Size = New Size(100, 100)
myPath.AddLine(0, 0, 100, 0)
myPath.AddLine(100, 0, 100, 100)
myPath.AddLine(100, 100, 0, 100)
myPath.AddLine(0, 100, 0, 0)
myGraphics.DrawPath(Pen:=myPen, path:=myPath)
End Sub
End Class
Dont forget to rock and roll this summer!
|
|
|
|
|
|
help me...
I have some troubles with M.Access. I want to create the calendar control on a form of my Access database like the calendar control of vb.net or C#. However, I can't find the way to do that .Thus, I'm very happy if you help me...
|
|
|
|
|
I believe you open the form in Design view and in the tool box select the
"more controls" and/or the Calendar 10.0 (in my case) and drop it on your form.
hope that helps
|
|
|
|
|
I am currently wiring an application which needs to use the wake on lan function. I have searched the web for code to do this for several days. There is plenty out there in C, Java and old VB but I can not find any in VB.net. After spending a day trying to convert various examples without success I am a little stuck.
Has anyone out the got any code I could make use of.
Thanks in advance.
|
|
|
|
|
|
Thanks,
Just got back home from a trip will give it a try over the weekend.
Cheers
Geoff
|
|
|
|
|
Thanks for the code it works. I am suffering from one problem, if I wait say 1 hour from shut down the Wake on lan does not work. This problem does not effect a wol utility I am using.
Any Ideas
Thanks Geoff
|
|
|
|
|
Once i connected to sqlserver and executed the query then I closed the connection by either close() or Dispose() method and next time when I again open the connection and execute the query, the old connection is still there,
I can see it on the sqlserver, where the CPU usage as increased,
it never comes down, for the same the SPID getting increased, for each of my execution.
If I left ideal for sometime, the SPID is cleared,
my problem is, when I am in a continuous usage it is not getting cleared or decreased, even though each of my connection is a different instances,
(new sqlconnection)
does any body has face this issue,
Need some help on this
Regards
|
|
|
|
|
Try this method and tell me if you get the same result, we are using sql server 7 and visual studio professional we dont have any problems with connections or queries. this will also work for multiple connections just make sure you close the previous...
so lets first test the code...
copy and paste into a windows form dont forget to add
......Imports System.Data.SqlClient
at the very top of the code
Dim Dtr As SqlDataReader = Nothing
Dim Conn As New SqlConnection
Private Function SqlRetrieve(ByVal SqlString As String) As Object
Dim Index As Integer
Conn.ConnectionString = ("Server=192.168.42.210; database=shprod; " & _
"user id=sql_cfd; password=sql;max pool size=500")
'use to catch any exceptions
Try
'instantiate an sqlcommand
Dim cmdSelect As SqlCommand = Nothing
'open a conncetion to server
Conn.Open()
'run sql query
cmdSelect = New SqlCommand(SqlString, Conn)
'start a sqldatareader
Dtr = cmdSelect.ExecuteReader()
'return sql data
'reset exception flag
SqlRetrieve = Dtr
'catch an sql exception
Catch e As SqlException
'close server connection
Conn.Close()
End Try
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim MyList As New ArrayList
SqlRetrieve("SELECT timestamp FROM dbo.BEADMOUNT")
While Dtr.Read()
ComboBox1.Items.Add(Dtr(0).ToString())
End While
Dtr.Close()
Conn.Close()
End Sub
good luck!
|
|
|
|
|
hi
Thanks for response,
I tried this, but still the connection is opened, if I keep on accessing the query.....
Amju
|
|
|
|
|
add this in the last of procedure
gc.waitforpendingFinalizer() '' check if any spelling mistake
gc.collect()
I hope this will help
|
|
|
|
|
Hi
Yes i have added in code already, and
I think it wouldn't be any spelling error, since I usually get it through intellisence,I mean (gc.) will automatically display the exposed method/properties from where I select the appropriate option.
thanks for reply
Amju
|
|
|
|
|
ya GC. will automatically show this but does not show when you are writing in explorer textbox...
|
|
|
|
|
cool....
Amju
|
|
|
|
|
how to place controls on a form at run time
|
|
|
|
|
You can place controls at runtime using the following code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim MyControl As New MyButton
MyControl.CreateObject(Me)
End Sub
End Class
Public Class MyButton
Inherits Button
Public Sub CreateObject(ByVal Form As Object)
With Me
'just use the dot operator to add any new properties to the control
.Location = New Point(100, 100)
.Size = New Size(100, 100)
.BackColor = System.Drawing.Color.White
.ForeColor = System.Drawing.Color.Black
.Text = "Click Me!"
Form.Controls.Add(Me)
End With
End Sub
Private Sub MyButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Click
'the new control also has events
MsgBox("This Demonstrates how to add a control at runtime", MsgBoxStyle.Information)
End Sub
This should help!
Lets rock and Roll at Guildford Festival 2005 Oh Yeah!
|
|
|
|
|
this code is not working. i need the code for visual basic6.
|
|
|
|
|
I have a data table of which, one column has been made unique.
Datatable.Columns("ColumnName").Unique = True
This table has been assigned to a Data grid. While running the application when unique constraint is violated it displays an exception massage. Is it possible to catch this exception massage and customize according to my wish?
|
|
|
|
|
Catch ex
Throw New System.Exception("your customize message.")
Amju
|
|
|
|