|
Hi,i would like to create a date that is automatic display when we would like to add a data in a VB form
Hi, i have create a program using VB6.The purpose of this program are for sales department person key in the data and then review by manager.Now, my problem is manager want me to create a command button to export the data from microsoft access to excel.What is the command button code and the step? Another Question,this program must set up in the office and all the staff can see and use this program at their own PC's!Thank for ur help!
|
|
|
|
|
I've spent a week on making COM+ ManagementTool displaying COM+ Catalog Infomation using COMAdminCatalogCollection.
Surly,I'm using VB.NET to do this job.
Most of infomation I'd like to
find was in COMAdminCatalogCollection.
But I couldn't find a way of retrieving imfomation of state of Object activated. I'd like to know how many Object is Activated as if I see the COM+ Management Tool provided in Windows 2003.
Please,Help me.
Any idea will be helpful.
|
|
|
|
|
im really having trouble with this and cant find any help anywhere any help will be appreciated
e-mail me at G_Callender@hotmail.com
or Ga19852003@hotmail.com
|
|
|
|
|
set RecordSource to the table or query you need
then set datagrids data source property to adodc1
|
|
|
|
|
Does vb have one, and if so what is the syntax for a #Define equivalant?
do you need to investigate an online backup company
|
|
|
|
|
Sort of. VB6 has #Const, which allows you do define a constant variant, which can then be used in a #if..then..#else construct.
But it isn't as powerful as the equivalent features in C
See here[^]
Ian Darling
"The different versions of the UN*X brand operating system are numbered in a logical sequence: 5, 6, 7, 2, 2.9, 3, 4.0, III, 4.1, V, 4.2, V.2, and 4.3" - Alan Filipski
|
|
|
|
|
Hi guys,
This is my first post here and need a pretty big favor from someone. I need to write a script that will allow me to imput a path (and be able to browse to a path) on my network, imput how many boxes (folders named Box001, Box002, etc.) I want to create and how many CDs(folders named CD001, CD002,etc.) that I want to create.
I just a Visual Basic program called RealBasic to design the visual layout, but can't figure out how to make it all come together. I could give someone a print screen to show the layout of how it needs to look just e-mail me at e-mail
I know this is probably no enough information to go on but if someone that knows VB pretty well could shoot me an e-mail I could explain a little better.
Thanks a lot!
|
|
|
|
|
I am looking for VB code that deals with Wireless devices. I have a wireless network at home and I am curious to know how programs like Net Stumbler can pick up different wireless signals. If anyone can help - much appreciated.
|
|
|
|
|
Hi,
It takes some lower level interaction with the cards devices drivers. Here are a couple of links to look at:
http://www.stumbler.net/
http://ramp.ucsd.edu/pawn/wrapi/
RageInTheMachine9532
|
|
|
|
|
I am doing some "creative" syntax hilighting with VB.NET and RichEdit. Only problem is it shows the selection box! "NoHiglight" isn't going to work in this case because the text actually has to be selected to change the color. (I tried it anyway, didnt work)
Anyone got any ideas?
|
|
|
|
|
|
you'll have to use the LockWindowUpdate function from the User32.lib
The LockWindowUpdate function disables or enables drawing in the specified window. Only one window can be locked at a time.
Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" (ByVal hwndLock As Long) As Long
Applicable to VB4-32,5,6
Parameter Information
hWndLock
Specifies the window in which drawing will be disabled. If this parameter is NULL, drawing in the locked window is enabled.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero, indicating that an error occurred or another window was already locked.
Declare the function - usually in a .bas module
Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" (ByVal hwndLock As Long) As Long
Where your code is...
Private sub WhereEver()
LockWindowUpdate Rich1.hwnd
your code goes here...
LockWindowUpdate False
end sub
Hope this is useful
Budgieboy
|
|
|
|
|
I want to call the file properties dialog box, the one when you right clik in a file or in many files usind the explorer and them click ont the properties menu...
I heard about many ways, one is calling an api(the worst way, I think), other is add a reference to the shell32.dll, and i heard about something in the System.Diagnostics.Process...
Does anyone knows one of these ways or other ways?
Thanks in advance.
|
|
|
|
|
I'm new to vb.net and I was wondering if it would be possible to use regex on a treeview?
I haven't got any code but at least that makes for a quick read..
what I would like is to be able to traverse a treeview for a regex, then building a new treeview with the nodes found maintaining the original structure of the tree (parent - child)
inputs are extremely welcome
peace
How terrible is wisdom when it brings no profit to the wise
|
|
|
|
|
In a nutshell ...
Private Sub btnMatch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMatch.Click
targetTree.Nodes.Clear()
Dim Expression As New Regex(txtExpression.Text)
Dim Matches As MatchCollection
For Each node As TreeNode In sourceTree.Nodes
If Expression.IsMatch(node.FullPath) Then
targetTree.Nodes.Add(node.Clone)
End If
CheckNodes(Expression, node, targetTree)
Next
End Sub
Private Sub CheckNodes(ByVal expression As Regex, ByVal node As TreeNode, ByVal target As TreeView)
For Each child As TreeNode In node.Nodes
If expression.IsMatch(child.FullPath) Then
NodeParent(target, node).Nodes.Add(child.Clone)
End If
CheckNodes(expression, child, target)
Next
End Sub
Private Function NodeParent(ByVal target As TreeView, ByVal node As TreeNode) As TreeNode
If node.Parent Is Nothing Then
For Each Parent As TreeNode In target.Nodes
If Parent.Text = node.Text Then Return Parent
Next
Return target.Nodes.Add(node.Text)
End If
Return NodeParent(target, node.Parent).Nodes.Add(node.Text)
End Function
|
|
|
|
|
Hi,
I have a string variable and it has over 300000 chars.... it is like it:
text
text1
txt2
it has many lines, and so, I have to read one by one. I tryed to use System.IO.StreamReader, but it does not accept over 260 chars...
If someone has any ideas it would be very helpfulll
Thanks in advance
|
|
|
|
|
Maybe this isn't the best way to handle it, but how about using .Split() on the string, supplying the newline character?
Dim lines() as String = _
myBigString.Split(System.Environment.NewLine)
Dim i as integer
For i = 0 to lines.Length - 1
'--do something with the line
DoSomething(lines(i))
Next
|
|
|
|
|
Hi,
Yes it should works, but the problem is that I will make a copy of my big string, and it will use more memory. I am thinking about use your method, but them clear my big string...
I will try to get a better way...
Thanks, it could be usefull
|
|
|
|
|
How about using a StringReader then?
Dim sr as System.IO.StringReader = _
new System.IO.StringReader(myBigString)
Dim line as String
'--read the first line from the string
line = sr.ReadLine()
Do While Not (line Is Nothing)
'--do something with the line
DoSomething(line)
'--read the next line from the string
line = sr.ReadLine()
Loop
|
|
|
|
|
Yes... I tryed just with the StreamReader, and it does not work, I have not thinked about StringReader. So I will se it...
Thanks
|
|
|
|
|
Hi,
Since String are immutable, any changes you make to the String, like removing a line from it, will result in a copy of the string being created that includes the change you made, then the original string is abandoned and, later, cleaned up by the garbage collector.
Holding a 300K string in memory doesn't sound like a good use of resources. Why the large string?
RageInTheMachine9532
|
|
|
|
|
Hi,
I have a .txt file, and it is very big, my application needs to change this file at any time, and to open edit and save it will result in a long time token, so I think it is better to copy it to a variable, make the changes to the variable, and in the end of the program, it could write again.
I do not know if there is a way to rewrite the file just where it has changed, and do not write all the file again, them it will be much better.
If you could help me...
Thanks
|
|
|
|
|
What's in this file? Is it a text document? flat database? Worlds Largest Configuration (.INI) file?
Maybe there is a better way to do it, but it depends on the what the data is and what your doing to manipulate it.
RageInTheMachine9532
|
|
|
|
|
Hi,
It is a text document, so i read it, edit it and them it write again, but jsut write wher it has changed, the it wil be faster...
I do not know with there is a direct way to edit it, or if I have to put it in a variable anyway...
Any ideas...
|
|
|
|
|
OK. It looks like that a String() is the best method then. It sounds like the problem you have now is the speed at which the string is read from or written to the file. I've come up with a partial implementation of a text editor with some code that is the fastest text file reader/writer that I can come up with. It reads/writes 500K in less than 0.05 seconds on my machine.
Here's the code snippet for reading and writing the file:
Private Sub mnuFileOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuFileOpen.Click
If ofdOpenFile.ShowDialog = DialogResult.OK Then
fileName = ofdOpenFile.FileName
Dim openFile As New StreamReader(fileName)
txtEdit.Text = openFile.ReadToEnd()
openFile.Close()
End If
End Sub
Private Sub mnuFileSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuFileSave.Click
If Not fileName.Equals(String.Empty) Then
Dim saveFileWriter As StreamWriter = File.CreateText(fileName)
Dim strReader As New StringReader(txtEdit.Text)
saveFileWriter.Write(strReader.ReadToEnd)
saveFileWriter.Flush()
saveFileWriter.Close()
strReader.Close()
End If
End Sub
If you want the entire sample project, send me an email with an address to reply to.
RageInTheMachine9532
|
|
|
|