|
There was an error in my previous post:
<code>
Private Function TransFormText(ByVal oText As String) As String
Dim oResult As String = ""
Dim oArray() As Char = oText.ToCharArray()
For Each oItem As Char In oArray
If Char.ToUpper(oItem) = oItem Then
oResult = oResult & " " & oItem
Else
oResult = oResult & oItem
End If
Next
Return Trim(oResult)
End Function
</code>
|
|
|
|
|
I have a couple questions about writing a text file (Most of it know as I've been writing files in this application for quite some time now) but the real question I have is this: I am changing my error log text file to a comma delimited file. The first line with be my headers (Error, Message, Stack Trace, Date/Time) how do I go about only writing this line a single time, then go about adding any errors that may happen below it
"Well yes, it is an Integer, but it's a metrosexual Integer. For all we know, under all that hair gel it could be a Boolean."
Tom Welch
|
|
|
|
|
Write the headers when you create the file :
If Not File exists Then
' Create Log File
'Write Header
Else
' Write Log Row
End If
|
|
|
|
|
Hi, to all.
Mine question is : can i use SQL commands about selecting, sorting and filtering data in VB.Net on DataTables...and which of them can i use
Especially CASE...WHEN...ELSE..END
|
|
|
|
|
Not reall sure what you are wanting to know...You can use ADO.NET to select table from a database using SQL commands if that is what you are talking about?
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
You can not use select insert update statements on datatables, rather you can filter your datatable with DataTable.Select(filterexpression as String) method, where filterexpression is like Dept='Administration'.
These filter expression is just like Where clause of Select statements.
Be a part of solution, rather then be a part of problem
|
|
|
|
|
Yes, i was trying to use case.. then .. else .. end statment like in sql in where clause, but i did not make it. Just filtering.
I have some information that there is driver, i guess,thru it is possible to use most of sql statments in vb on datatables. Thank you anyway
|
|
|
|
|
i want to open form2 from menu strip button
Menustrip buttons name is "Preference"
Other button is Exit by which i want to close the application
i want to know its coding plz help me ( (
|
|
|
|
|
to open new form:
dim frmTemp as new Form2
frmTemp.show
to close the application:
Application.Exit()
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
thanx
now i want to make FTP browser
there is no such a option in toolbox
plz help me
|
|
|
|
|
|
|
but where i have to copy & paste these codes??
i had already created design (
|
|
|
|
|
Hello,
i've found a code on this page :http://weblogs.asp.net/kennykerr/archive/2006/08/10/Windows-Vista-for-Developers-_1320_-Part-3-_1320_-The-Desktop-Window-Manager.aspx[^] there's described how to make glass effect, without the known problems with the black controls in the window. But the problem is, the code is written in VC++ and i can't VC++ =(.
How can i do the same in VB.NET?? I've tested a lot, but it doesn't work easyly.
Here's my Code:
Public Class Form1<br />
<Runtime.InteropServices.DllImport("dwmapi.dll", CharSet:=CharSet.Auto)> _<br />
Public Shared Sub DwmExtendFrameIntoClientArea(ByVal hWnd As System.IntPtr, ByRef pMargins As Margins)<br />
End Sub<br />
<br />
<Runtime.InteropServices.DllImport("dwmapi.dll", CharSet:=CharSet.Auto)> _<br />
Public Shared Sub DwmIsCompositionEnabled(ByRef IsIt As Boolean)<br />
End Sub<br />
<System.Runtime.InteropServices.DllImport("user32.dll")> _<br />
Private Shared Function SetLayeredWindowAttributes(ByVal hWnd As IntPtr, ByVal crKey As Int32, ByVal bAlpha As Byte, ByVal dwFlags As Int32) As Boolean<br />
End Function<br />
<br />
Const COLORREF As Int32 = -65281<br />
Const LWA_COLORKEY As Int32 = 1<br />
<br />
Public Structure Margins<br />
Public Left As Integer<br />
Public Right As Integer<br />
Public Top As Integer<br />
Public Bottom As Integer<br />
End Structure<br />
Private inset As Margins = New Margins<br />
<br />
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
Me.BackColor = Color.FromArgb(COLORREF)<br />
'Me.TransparencyKey = Color.FromArgb(COLORREF)<br />
<br />
SetLayeredWindowAttributes(Me.Handle, COLORREF, 80, LWA_COLORKEY)<br />
Dim marg As New Margins<br />
marg.Bottom = -1<br />
marg.Left = -1<br />
marg.Top = -1<br />
marg.Right = -1<br />
<br />
DwmExtendFrameIntoClientArea(Me.Handle, marg)<br />
<br />
End Sub<br />
End Class
Another code, which do the same and is written in C# i've found on this site: http://weblogs.asp.net/kennykerr/archive/2007/01/23/controls-and-the-desktop-window-manager.aspx[^]
Has somebody any ideas how to do this???
Thanks for your help =)
|
|
|
|
|
Are you still having trouble with this?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
how do i can create my own new component in toolbox n how to make other project in the same solution explorer can recognise my new component
|
|
|
|
|
i have 2 table one called store and one called addcard
i have already made a form that add the data to the ("addcard")table
but in the same time i want the computer to open table ("store")and find in row vodafone the field ("v10")and get the value of this field in a string then i want to update this field by adding a number + the number inn this filed and update it in store table how can i do this
iam using vb2205
database type :access
ado.net
urgent plzzzzz
thanks
|
|
|
|
|
this is what i have reach in vb6
If rs5.State = 1 Then rs5.Close<br />
<br />
rs5.Open "store", cn, adOpenDynamic, adLockPessimistic<br />
rs5.Find "ceasr ='" + Combo2.Text + " '"<br />
x = rs5!cost<br />
rs5!cost = x + Val(Text6.Text)<br />
rs5.Update
how can i apply this code in vb2005
|
|
|
|
|
Sorry if its a simple question, but I usually use MFC C++ VS 2005 for coding.
I just want the dialog box to behave as follows when the PASSWOD is entered:-
From either the user hitting Tab or Return (at the end of PASSWORD entering); process the USERNAME & PASSWORD; i.e. no need to click on the OK button.
Currently on hitting Tab or Enter the focus is set to the OK button.
The OK button is enabled when the PASSOWRD and USERNAME is entered!
Many thanks,
Andy.
|
|
|
|
|
1.Set the forms PreviewKeyPress Property to True.
2.Create an event for the the password textbox for on keypress.
3.In the aforementioned event place the following:
if e.keychar = cchar(chrw(keys.enter)) or e.keychar = cchar(chrw(keys.tab)) then<br />
'standard processing actions from OK button<br />
end if
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
Hey all:
Can you help how to read the data of Datagrids?
More concisely, I have loaded some data to datagrids.
Now I want to read each elements of datagrids and want to store in some datastrutures( two dimensional array) or other, if possible.
Can any body help me how can I achieved this?
|
|
|
|
|
can i ask you how you filled this grid with your data ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Why don't you read the data from the data sources that you used to populate the grids?
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks! Datagrid1.item(row,col) works me.
|
|
|
|
|
There are two different ways:
1. is DataGrid.Item(rowindex as Integer, columnindex as Integer) to access (read/write)the value of DataGrid's particular item.
2. is concept based, i.e. Data Grid itself has no rows and columns, it just displays the values of DataSet or DataTable. It means each data grid has dataset or data table, you just need to detach that data set or data table. In order to do that you have to cast the DataSource Property of DataGrid into data table or data set.
Dim dt as DataTable
dt = Cast(DataGrid.DataSource, DataTable)
Now everything is in you hand, mess with them.
Hope this will clear your concept.
Be a part of solution, rather then be a part of problem
|
|
|
|