|
No, there's no way to do that.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi,
try something like
first of all make a structure
this is the code for the structure.
Private Structure ComboMultipleData<br />
Dim FILED_NAME As String<br />
Dim TABLE_NAME As String<br />
Public Sub New( ByVal FieldVal As String, ByVal TableVal As String)<br />
<br />
FILED_NAME = FieldVal <br />
TABLE_NAME = TableVal <br />
End Sub<br />
<br />
Public Overrides Function ToString() As String<br />
Return Me.FILED_NAM<br />
End Function<br />
End Structure
And the code to put this in the combobox and translate it when the user selects an item from the list.
Private Sub frmDemo_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
'for the purposes of this demo I am hard coding the entries<br />
With REPORT_CHOICE<br />
.Items.Add(New ComboMultipleData( "FieldVal1", "Table 1"))<br />
.Items.Add(New ComboMultipleData( "FieldVal2", "Table 2"))<br />
.Items.Add(New ComboMultipleData( "FieldVal3", "Table 3"))<br />
End With<br />
<br />
End Sub<br />
<br />
Private Sub REPORT_CHOICE_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles REPORT_CHOICE.SelectedIndexChanged<br />
'in this case simply put the data up into the available fields<br />
Dim acc As ComboMultipleData= CType(cboAccounts.SelectedItem, ComboMultipleData)<br />
<br />
txtFieldName.Text = acc.FILED_NAME<br />
txtTableName.Text = acc.TABLE_NAME<br />
End Sub
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
First point of interest is that the application is being developed on a mobile device using .NET CF 2.0. On to the problem...
I have a combo box set to DropDown so the user can enter text if the provided options don't apply. This text eventually is sent, via a stored procedure, to a database. I'm trying to limit the number of characters allowed in this combo box to the max size of the field in the particular table I'll be writing to.
The problem is that .NET CF 2.0 ComboBox doesn't include any method for setting the position of the cursor within the combo box.
As of right now, once the limit is reached I set the text of the combo box back to what it was prior to the key being pressed. This, unfortunately, causes the cursor to return to the front of the combo box. I want the cursor to remain at the end of the text.
Anyone encounter (and overcome) this problem in the past? Or perhaps any ideas of how to overcome it?
|
|
|
|
|
Just a thought, but maybe you can set up a text changed event and count how long your text string is. Once the text hits a length = X then run a REGEX to replace the next char with a back space.
|
|
|
|
|
hy everyone!
i know this question is off topic but maybe someone could help me solving this problem. i have already been searching in google etc. but couldn't find any solution to the following problem:
i would like to check, if a file is write protected and if it is i want to remove this write protection in/via a vbs program/script.
does anyone know how to do this?
thanks!
stephan.
|
|
|
|
|
|
oh well, it's already quit late here
but thanks anyway
|
|
|
|
|
I am not sure what I need to do to get this done, so Be nice.
First off some background Info
I am creating a Class in a Windows Scripting Component File (.WSC), that will connect to a DB and run Querys for me.
Then I will use a Vbscript and reference the WSC file to it, and call the functions.
On my Script, I will call the Function OpenDBConnection() (which sets up the connection to the DB).
How do I pass the connection from OpenDBConnection to the Function GetSomethingDone() from the script that called OpenDBConnection()
Class SQLDBQuery
Private objSQLConn
Private Sub Class_Initialize
Set objSQLConn = CreateObject("ADODB.Connection")
End Sub
Public Function OpenDBConnection(strDomainController)
Dim strDBPath
strDBPath = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDomainController & "netlogon\user.mdb"
objSQLConn.Open strDBPath
Set OpenDBConnection = objSQLConn
End Function
Function GetSomethingDone
Do something Here....
End Function
End Class
Private objSQLDBQuery
Set objSQLDBQuery = New SQLDBQuery
Function OpenDBConnection(strDomainController)
Set objSqlConnection = objSQLDBQuery.OpenDBConnection(strDomainController)
Set OpenDBConnection = objSqlConnection
End Function
|
|
|
|
|
Just to Update the Code in the post is from the WSC file.
|
|
|
|
|
Hi,
I am usiung Vb.Net 1.1 and i need to draw a Rhombus can any one help thanks.
Mohammad Al Hoss
|
|
|
|
|
The DrawPath method on the graphics object passed to a PaintEvent will draw any shape you like.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hey, assuming you're the one who voted my answer a 1 - my answer is correct. If you're incapable of understanding it, try asking me some more questions, so I can try to help you further.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Is there a way to disable the close button in the upper right corner of a form? I know how to get rid of the minimize and maximize, but I would like to disable the close button as well.
Any help would be greatly appreciated.
|
|
|
|
|
Hi,
go to the form properties window and set the control box to false,
and u can check the other properties like maximize and else.
Mohammad Al Hoss
|
|
|
|
|
|
|
Can anybody help me out, i want to develop code for chatting in lan. means i will supplies ip adrees to whoem i want to send the msg.
if any body have any idea pls reply
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
Hi Yogesh,
Refer to the following links:
http://www.codeproject.com/KB/cs/LanChat.aspx
http://www.codeproject.com/KB/IP/ChatMasala.aspx
I hope this would be helpful.
Vinay
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Hiii
I sending a sample code for send msg in Lan.
If lstnames.SelectedItems.Count > 0 Then
For Each strSeleted As String In lstnames.SelectedItems
'somehow a list item is in fact a string
Dim strname As String = " " & strSeleted
Dim lngPos As Long = 1
Do
Dim lretval As Long = Shell("net send " & strname & _
" """ & Mid(strMessage, lngPos, iChunk) & """", vbHide)
lngPos += iChunk
'pause to stop out of sequence message chunks
Sleep(100)
Loop Until lngPos > Len(strMessage)
strStatus &= strname.ToString
Next strSeleted
End If
Your LAN messanger setting on Your computer must be enable for run this code.
May be this code helps U.
Thanx
Mitesh Khatri
khatrimitesh@hotmail.com
|
|
|
|
|
Hi all
I am trying to translate reports (.rdlc files) from english into well, for starters, Portuguese. The program these reports work for, written in Visual Basic, already has a translation function that works - it translates the program fine - by passing it the string to be translated and it returns the corresponding value from a textfile recompiled to .resx . The program checks what the system language is, and accordingly selects the appropriate resource file.
My question is this - how do I translate these reports?
|
|
|
|
|
Hello all,
I've just installed a copy of VS2008 Standard, and I'm looking at the MicrosoftReportViewer, and the ability to design a new report from it. To get started with it, I'm using the wizard.
What I'm finding is that the report doesn't display anything (data), although it is displaying the header text, and field names.
The way I'm firing the report is via a button on form MultipleLicenceResponse.vb. This form has a DataGridView (dgvResponseData) on it, which gets its data from tblResponseData.
This is opening LicenceReportPreview.vb via ...
Dim frmReport As New LicenceReportPreview
With frmReport
.Licence = "Display anything in this field for now"
.LicenceTable = tblResponseData ' Just to see if I can access this instead - which I can't!
End With
frmReport.ShowDialog()
The report wizard gets its object data from the LicenceReportPreview.vb class, where I'm selecting the LicenceReportPreview as the object and, for now, just the Licence property (which should be the string, "Display anything in this field for now") .... just to get something on the report!
What am I missing? Does anybody know of a good tutorial that I can follow which shows me how to get the contents of my table onto the report?
|
|
|
|
|
Check box column getting unchecked when I am sorting column in datagridview.
Can any one can help me?
Regds.
Suman
|
|
|
|
|
Hello Suman,
I have checked this and it works fine for me. Could you please provide us a small
sample application showing the mentioned behavior.
Regards,
Allen
Allen Smith
ComponentOne LLC
www.componentone.com
|
|
|
|
|
Imports System
Imports System.Data.SqlClient
Public Class Form1
Dim str As String
Dim con As SqlConnection
Dim da As SqlDataAdapter
Dim ds As New DataSet
Dim dt As DataTable
Dim dv As DataView
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
str = "Integrated Security=SSPI; User Id=sa;Initial Catalog=MAS08; Data Source = suman"
con = New SqlConnection(str)
con.Open()
str = "select * from unitmaster"
da = New SqlDataAdapter(str, con)
da.Fill(ds, "unitmaster")
dt = ds.Tables(0)
dv = New DataView(dt)
Dim colCheckbox As New DataGridViewCheckBoxColumn()
' Size the column width so it is wide enough to display the header
colCheckbox.AutoSizeMode = DataGridViewAutoSizeColumnMode.ColumnHeader
colCheckbox.ThreeState = False
colCheckbox.TrueValue = 1
colCheckbox.FalseValue = 0
colCheckbox.IndeterminateValue = System.DBNull.Value
colCheckbox.DataPropertyName = "Checkbox"
colCheckbox.HeaderText = "Checkbox"
colCheckbox.Name = "Checkbox"
'colCheckbox.ReadOnly = True
dgv.Columns.Add(colCheckbox)
dgv.DataSource = dv
End Sub
End Class
|
|
|
|
|
Hi all
Please help!
How to write filter by date in macro in Excel?
Automatic generated macro looks like this:
Selection.AutoFilter Field:=10, Criteria1:=">=01.01.2007", Operator:=xlAnd, _
Criteria2:="<01.01.2008"
But this macro is not working.
Thanks
|
|
|
|