|
|
Thanks this worked Great, I apprecaite it Very Much.
|
|
|
|
|
Hey guys, I was just wondering if it is possible to have a program that searches the screen for a certain color in VB.Net via input of RGB values or the built in color tool. Also if that is possible is it possible for it to click or rick click on the spot where it found the color? Any help is appreciated.
|
|
|
|
|
|
Hello,
I have created an application that creates Active Directory users. The application is working fine. I read and write some settings to the application settings with My.Settings.mysettingname
Here comes my problem, I would like to have multiple templates into my application so that if a dropdown box value has "template1" selected other values like department, location, etc. are changed depending on the selected template.
What is the best method to read and save data to? Could i use an Access database? Or is it better to use a XML file or INI file? And how could I read and write to the advised method?
Any help is appriciated. Thanks in advance.
Kind regards,
Roland
|
|
|
|
|
|
Ask your instructor for help.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Pay attention to forum rule no. 9
Paul Marfleet
|
|
|
|
|
Hi everyone
I am using vb.net 2005, and I am trying to get information on how to use the reports that come with it. I would like to generate reports that would serve as invoices from a sql server database and I would want to do this programmatically. I have tried using crystal but that does not seem to be getting me any where, a m getting a load report error.
Does anyone know a site where I could get information on these reports that come with vb.net and just out of interest are these the SQL server reports.
Thanks for reading this
tw5ed f8
|
|
|
|
|
Dim Arr(1,2) As String
Arr.Length = 6
No, I wanna know
Length that = 2
Width that= 3
|
|
|
|
|
Arr.GetLength(0) and Arr.GetLength(1) .
---
single minded; short sighted; long gone;
|
|
|
|
|
My question about properties
Look at this property
http://aycu37.webshots.com/image/30436/2001091364269527811_rs.jpg[^]
when I wrote Cursor I can chose const form list
I need build property like that for example
I created sub building html page
And I want build property specified page color "red or blue or black or ……………"
so user can select color of page
How I can do it?
|
|
|
|
|
Create an enum with the values you want, and use that as type for your property.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hallo guys.
I'm writing a program in VB6.0 that captures numbers as string in a text box. These numbers vary in length.
Can anyone please help me how to get the last two numbers captured in the textbox.
Thanx in advance.
Prospery
|
|
|
|
|
Use Right$ function
Dim s as string
s=Right$(txt.Text,2)
|
|
|
|
|
Thanx. really good code. it working.
Prospery
|
|
|
|
|
hi
how can i design multicolumn combobox for selecting 2 columns from popup ?
i am using 2 fields - itemcode & length. for same itemcode there is multiple length which i have to select. e.g.
itemcode - length - rate
abc - 15m - 2.0
abc - 20m - 1.20
abc - 200 m - 4.0
asd - 2 m - 0.50
asd - 1 m - 0.20
if i have to select 1 popup item thru combo box. how do that ?
Thanks
bye
|
|
|
|
|
hi guys
i am using tablmapping property of data adapter. my data table is the o/p of sql query execution. that table i am mapping with datatable in database as follows -
da.tablemapping.add("table","abc")
it shows data correctly in datagrid. but instead of datagridview i have to add that data in my database table - abc which is empty. how can i do this ?
& tell me one thing what is the diff. betn. in tablemapping & datatablemapping property ? when it should be use?
this table i have to use for crystal report . if is there any direct method for collecting data from 2,3 tables & printing it.
Thanks
bye
|
|
|
|
|
How can I use or declare the SELECT command in vb.net in order for me to access my DataTableAdapter and so that I can show the values of a column into a list?
Or just tell me how can I use the SELECT command in VB.NET.
thanks..
|
|
|
|
|
Plenty of info here[^]. Ideally you will write a seperate data layer that handles all your database calls. A book on ADO.NET is what I'd recommend here.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi everyone.
Hoping for some clarification how the error provider and the "validating" event works on a form, because what I am experiencing doesn't seem very user friendly for the end user.
In a nutshell, once the control FAILS my conditions in the "validating" event and I issue the e.cancel command, focus returns to the failed control and I cannot move the focus until the control has a valid entry.
Why is this bad ? For example, consider a textbox that accepts a file system directory path, and a browse button next to it. I want the advanced users to be able to type (using autocomplete) the path and basic users to be able to use the browse button. However once the textbox has the focus, any attempts to click on the browse button fail as the focus cannot move from the textbox that just failed validation.
Now I have read a lot of articles, and it appears the error provider doesn't normally exhibit this behaviour. Am I right ?? If it is not normal, any ideas what might cause this ??
- I have a form with a tabcontrol that has several pages
- I have an error provider on the form
- All bound controls reference the same bindingsource
- initially the error provider had a datasource of the bindingsource. I removed it and still nothing.
Here is one of the pieces of code:
Private Sub txtClientBaseFilePath_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtClientBaseFilePath.Validating
Dim IsError As Boolean = False
'check if the string is not null using the basic textbox validation
If IsTextBoxEmpty(txtClientBaseFilePath, strErrorPathNotSpecified & strErrorPath) = True Then
IsError = True
Else
'check if the patch exists. if not exist then offer to create the path
Try
If My.Computer.FileSystem.DirectoryExists(txtClientBaseFilePath.Text) = False Then
If MessageBox.Show("Directory does not exist. " & vbCrLf & vbCrLf & "Would you like to create the directory?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) = Windows.Forms.DialogResult.Yes Then
My.Computer.FileSystem.CreateDirectory(txtClientBaseFilePath.Text)
SetStatusLabel("Directory '" & txtClientBaseFilePath.Text & "' created successfully", False)
Else
Me.epSystemSettings.SetError(txtClientBaseFilePath, strErrorPathMustExist)
IsError = True
End If
Else
'directory exists OK
End If
'catch errors such as creating path fails due to rights, invalid path, etc
Catch ex As ArgumentException
'The directory name is malformed. For example, it contains illegal characters or is only white space (ArgumentException Class).
'The directory name is Nothing (ArgumentNullException Class).
Me.epSystemSettings.SetError(txtClientBaseFilePath, strErrorPathInvalidCharacters & strErrorPath)
SetStatusLabel("Directory creation failed - " & strErrorPathInvalidCharacters, True)
IsError = True
Catch ex As IO.PathTooLongException
'The directory name is too long (PathTooLongException Class).
Me.epSystemSettings.SetError(txtClientBaseFilePath, strErrorPathTooLong & strErrorPath)
SetStatusLabel("Directory creation failed - " & strErrorPathTooLong, True)
IsError = True
Catch ex As IO.IOException
'The parent directory of the directory to be created is read-only (IOException Class).
Me.epSystemSettings.SetError(txtClientBaseFilePath, strErrorPathReadOnly & strErrorPath)
SetStatusLabel("Directory creation failed - " & strErrorPathReadOnly, True)
IsError = True
Catch ex As NotSupportedException
'The directory name is only a colon ( . (NotSupportedException Class).
Me.epSystemSettings.SetError(txtClientBaseFilePath, strErrorPathNotSupported & strErrorPath)
SetStatusLabel("Directory creation failed - " & strErrorPathNotSupported, True)
IsError = True
Catch ex As UnauthorizedAccessException
'The user does not have permission to create the directory (UnauthorizedAccessException).
Me.epSystemSettings.SetError(txtClientBaseFilePath, strErrorPathNoRights & strErrorPath)
SetStatusLabel("Directory creation failed - " & strErrorPathNoRights, True)
IsError = True
Catch ex As Security.SecurityException
'A partial-trust situation exists in which the user does not have sufficient permissions (SecurityException).
Me.epSystemSettings.SetError(txtClientBaseFilePath, strErrorPathNoRights & strErrorPath)
SetStatusLabel("Directory creation failed - " & strErrorPathNoRights, True)
IsError = True
Catch ex As Exception
Throw ex
IsError = True
End Try
End If
If Not IsError Then
Me.epSystemSettings.SetError(txtClientBaseFilePath, "")
End If
e.Cancel = IsError
End Sub
|
|
|
|
|
Thinking about it I guess it is behaving as expected. ie: when leaving the control the validating routine runs and when it fails the action to move elsewhere is aborted through the e.cancel.
So with this in mind I have moved the code to different events such as "TextChanged" and "Leave" BUT for some reason the errorprovider only displays on some occasions rather than all. Typically on the first time I enter an invalid value (such as blank ""), the errorprovider doesn't display but if I create the same error it displays.
This validation stuff is driving me Nuts !!!!
What do you guys normally do to validate a whole bunch of controls on a page ? I would have thought validating field by field was more user friendly than waiting til the end and doing it, but as described in my example sometimes it isn't practical to force a user to stay on the control.
|
|
|
|
|
With help from this and other forums, ihave be able to make a countdown timer.
Now what i would like to do is make the programs window Flash when the counter has reached ZERO.
can anybody steer me in the right direction.
THANKS
|
|
|
|
|
Flash in what way ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I don't really care, "in what way" as long as it stands out.
|
|
|
|