|
Just set the Sorted property of the combobox to TRUE.
|
|
|
|
|
hi
i am using date-time-picker for "date of birth" field. another column called "age" has to fill automaticaly after entering date of birth column. how to do this?
please inform.
|
|
|
|
|
Dim intAge as Integer
intAge = DateDiff("yyyy",DateofBirth,Date)
Hint: Replace DateofBirth with the value of whatever variable name you are using for the DateofBirth field.
|
|
|
|
|
Good morning everybody,
I have a Question concerning the Types that can be used in Functioncalls. (It's about usability...)
Let's say I got this Function:
function Foo (byval chooseTime as INTERVALL )
TIMEVALUES is an enum like this:
Public Enum INTERVALL As Integer
D_EFAULT = 0
SEC_5 = 5000
SEC_10 = 10000
SEC_30 = 30000
MIN_1 = 60000
MIN_5 = 300000
MIN_10 = 600000
End Enum
When someone is calling the Function Foo he will see a dropdownlist where he can choose one of the values in the enum.
My Problem now is that I only want a dropdown with the Values (e.g. D_EFAULT,SEC_10 etc.) instead of the whole path that is presented (e.g. INTERVALL.D_EFAULT....). Is that possible in any way ?
Thank you very much
cu
immes
|
|
|
|
|
Dear ,
My application is client- server application and one module is used for send file to server application for mail sending purpose.
If the user type the mail text than click send button it will save to the database,than it will convert to XML(from Dataset) ,than the file will be
zipped than it will pass accros the Dial-up Network.The server will recieve the file and Unzip it ,than the XML file convert to dataset and saved
and save to the database .this will work fine but when i want to see the mail .,I opened that mail,that time the appliaction crash and give this error
and sometime when i click the mail delete button ,the application crash. can u help me in my case.
if u need more info about scenerio,please mail me
Error Ocuured In Form : frmMail
Error Ocuured In Module : Button10_Click
Error Ocuured At Time : 10/4/2005 2:29:24 PM
Exception Occured In ITICSMS Server :
Message : Object reference not set to an instance of an object.
Source : System.Windows.Forms
StackTrace : at System.Windows.Forms.SafeNativeMethods.MessageBox(HandleRef hWnd, String text, String caption, Int32 type)
at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
at System.Windows.Forms.MessageBox.Show(String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
at CSMSServer.frmMail.Button10_Click(Object sender, EventArgs e)
Explanation : System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.SafeNativeMethods.MessageBox(HandleRef hWnd, String text, String caption, Int32 type)
at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
at System.Windows.Forms.MessageBox.Show(String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
at CSMSServer.frmMail.Button10_Click(Object sender, EventArgs e)
================================================================================
Error Ocuured In Form : MdlStart
Error Ocuured In Module : Main
Error Ocuured At Time : 10/4/2005 2:29:39 PM
Exception Occured In ITICSMS Server :
Message : Object reference not set to an instance of an object.
Source : System.Windows.Forms
StackTrace : at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at CSMSServer.mdlConnect.main()
Explanation : System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopIn ner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at CSMSServer.mdlConnect.main()
Ishak
|
|
|
|
|
Hello everybody
I'm doing a programming using VB6.0.
My question is..
How am I going to code the coding for combo box.. For smart card reader..
How the combox will detect there are a new card reader installed to the computer.
yani
|
|
|
|
|
The combobox doesn't do this at all. It won't detect anything because it's not designed for this.
Your application has to detect and use the SmartCard reader through whatever SDK you can find for it. Check the manufacturer's website to see if there is any developer information for it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Damn what a useless comboBox, what were they thinking
|
|
|
|
|
Hi all,
I am a VB.net programmer recently doing a project to interface with digital camera or web cam. I understand that there is a WIA driver which can be program in VB.net but only on Window XP. Is there any similiar for Window 2000 ?
Tx and best regard
|
|
|
|
|
WIA comes standard built into Windows 2000, XP, 2003 and Vista.
Everything else must download and install it seperately.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave,
Tx for the info. But when I try to add in the reference in the VB.net, I can't locate WIA ? Do u have any info about this files under window 2000 ?
Tx and best regard
|
|
|
|
|
It's the System.Management.dll. There's no difference between 2000 and XP and 2003. Once you add a reference to that, you can import the System.Management namespace[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
do you know how to paste clipboard to grid??
its giving me tedious time,kindly help me.
thanks
|
|
|
|
|
hi there,
just simply read data from clipboard and then paste it into the grid
this link might give u a hint on this:
Clipboard
<< >>
|
|
|
|
|
I have two forms, Form1 and Form2. Form2 is opened when a button in Form1 is clicked. What I try to implement is when Form2 is closed, Form1 is also closed.
Thanks.
|
|
|
|
|
Lets say form1 is the form you want to close
Dim Form As form1
Form = New form1
Form.Close()
|
|
|
|
|
In form2 Unload event write the foll.
Unload form1
|
|
|
|
|
How would I go about getting the amount of ram on the system as well as free hard drive space?
Thanks
|
|
|
|
|
Heres some code for disk free space, i got some code for the RAM thingy, gonna try find it later...
Public Shared Function GetHardDiskInfo(ByVal Path As String) As HardDiskInfo
If IO.Directory.Exists(Path) = True Then
Path = Path.Replace("\", "")
Dim diskClass As New System.Management.ManagementClass("Win32_LogicalDisk")
Dim disks As System.Management.ManagementObjectCollection = diskClass.GetInstances()
Dim disk As System.Management.ManagementObject
Dim hdi As New HardDiskInfo
For Each disk In disks
If CStr(disk("Name")) = Path Then
hdi.Space = CLng(disk("FreeSpace").ToString)
hdi.Size = CLng(disk("Size").ToString)
hdi.FileSystem = disk("FileSystem").ToString
hdi.Label = disk("VolumeName").ToString
hdi.DriveType = CLng(disk("DriveType").ToString)
End If
Next disk
Return hdi
Else
Return Nothing
End If
End Function
Public Class HardDiskInfo
Public Path As String
Public Space As Long
Public Size As Long
Public FileSystem As String
Public Label As String
Public DriveType As Long
End Class
|
|
|
|
|
I have a button on a form that's sole purpose is to lauch a new instance of another form.
Private Sub btnFigure7_1_Click(ByVal sender As System.Object, ByVal e _
As System.EventArgs) Handles btnFigure7_1.Click
Dim Figure7_1 As frmMap
Figure7_1 = New frmMap
Figure7_1.Show()
End Sub
I would like for the form to be showed only if it is not visible. Currently it can be opened as many time as the user hits the button.
Any Help?
|
|
|
|
|
Why dont you use a variable......such that set the variable when you create an instance of the form and reset it on closing that form or what ever may be the requirement
Got it......?
_mubashir
|
|
|
|
|
Replace all your Figure7_1 code with this.
Figure7_1.show
|
|
|
|
|
I have one last line of code to write then this project is complete. I have spent 2 weeks on this "Last Line" ....
Trying to read the contents of a datagrid to Excel:
This works if the column is simply a bound column:
For i = 0 To StatusGrid.Items.Count - 1
worksheet.Cells(i + 2, 1) = StatusGrid.Items(i).Cells(1).Text()
Next
However, for Template columns, the following SHOULD work, but does not:
For i = 0 To StatusGrid.Items.Count - 1
worksheet.Cells(i + 2, 2) = CType(StatusGrid.Items(i).Cells(2).Controls(0), DataBoundLiteralControl).Text()
Next
I get the following error:
Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.DataBoundLiteralControl'.
I am at my wit's end on this one... Can anyone help?
|
|
|
|
|
I want to send email out through my application.
I found a way using System.Web.Mail but when I make a reference to it I get the blue jagged under line. I think its because I'm missing the proper dll? I have Windows XP Home edition and Visual Basic Standard edition. How can I get this to work or are there other options?
Thanks again.
|
|
|
|
|
Did you set a reference to the System.Web.dll? If not, right-click the References folder of your project, then click Add Reference. Find the System.Web.dll file, then double-click it, then click OK.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|