|
Hi Guille,
Yeh but I would still cast TopNode to a TreeNodeCommand see? The problem seems to be casting the node causes the tree to duplicate itself, get me?
Nursey
|
|
|
|
|
can someone pls tell me how do i do this when using a rtf???
[code]
Dim strHeading as string
dim strLabel as string
strheading = "====================================="
strlabel = "S.No Name Contents DateCreated"
[/code]
how do i put the str heading in one line of the rtf?
how do i move to the newline?
how do i put the strLabel in the new line?
how do i bring the cursor to the next new line?
tks a lot....
really really appreciate your help...
"Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18
|
|
|
|
|
When I need to do this, I open wordpad (not word) and i type in some text, do some formatting and examine the structure of the generated rtf file
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
I have a question that may or may not be difficult to answer... I've never done anything like this before.
Could anyone provide me with information about how I could use visual basic 6 (not .net) to convert a bitmap image to a 2D array of pixels? I've found a reference page on the format of a BMP file, but it's not as detailed as I would hope... and when I try to use file input from the BMP file, I just come up with mostly null strings instead of usable bytes.
|
|
|
|
|
Im new to vb.net and Im trying to move mi apliccations to the new language...and i have the following problem.
Im trying to intercept the ListView messages because i want a LV footer to autoresize when a column resize.
I create a Class inherit a LV and override the WndProc sub. But when i try to intercept the WM_NOTIFY message, the asociated code seems incorrect.
Here is my code (the class):
-----------------------------------------------------------------------------
Public Class MyListView
Inherits System.Windows.Forms.ListView
Structure NMHDR
Dim hwndFrom As Long ' Window handle of control sending message
Dim idFrom As Long ' Identifier of control sending message
Dim code As Long ' Specifies the notification code
End Structure
Structure NMHEADER
Dim hdr As NMHDR
Dim iItem As Long
Dim iButton As Long
Dim lPtrHDItem As Long ' HDITEM FAR* pItem
End Structure
Public Const WM_NOTIFY = &H4E
Public Const WM_PAINT = &HF
Public Const WM_USER = &H400
Public Const WM_REFLECT = WM_USER + &H1C00
Const HDN_FIRST As Long = -300&
Const HDN_LAST As Long = -399&
Const HDN_GETDISPINFO As Long = (HDN_FIRST - 9)
Const HDN_BEGINDRAG As Long = (HDN_FIRST - 10)
Const HDN_ENDDRAG As Long = (HDN_FIRST - 11)
Const HDN_ITEMCLICK As Long = (HDN_FIRST - 2)
Const HDN_ITEMDBLCLICK As Long = (HDN_FIRST - 3)
Const HDN_DIVIDERDBLCLICK As Long = (HDN_FIRST - 5)
Const HDN_ITEMCHANGING As Long = (HDN_FIRST - 0)
Const HDN_ITEMCHANGED As Long = (HDN_FIRST - 1)
Const HDN_BEGINTRACK As Long = (HDN_FIRST - 6)
Const HDN_ENDTRACK As Long = (HDN_FIRST - 7)
Const HDN_TRACK As Long = (HDN_FIRST - 8)
Const NM_FIRST As Long = -0& ' (0U- 0U)
Const NM_CUSTOMDRAW As Long = (NM_FIRST - 12)
Const NM_RCLICK As Long = (NM_FIRST - 5)
Const NM_RELEASEDCAPTURE As Long = (NM_FIRST - 16)
Const NM_CLICK As Long = NM_FIRST - 2
Const LVN_FIRST As Long = 100
Const LVN_COLUMNCLICK As Long = LVN_FIRST - 8
Protected Overrides Sub WndProc(ByRef m As Message)
Dim nmh As NMHDR
Select Case m.Msg
Case WM_NOTIFY
nmh = CType(m.GetLParam(nmh.GetType), NMHDR)
If nmh.code = HDN_BEGINTRACK Then
MsgBox("track")
End If
End Select
MyBase.WndProc(m)
End Sub
End Class
'-----------------------------------------------------------------------------
The WM_NOTIFY is detected OK. But I cant get the HDN_BEGINTRACK code. Instead, I get some stranges values
like 5334658619277312 or 5334486820585472
Please HELP!
Thanks in advance.
|
|
|
|
|
First of all, in VB.NET long becomes integer, integer becomes short, ...
This may not solve your problem, but will help you with this and future translations
I suggest you read the translation guidelines @ MSDN
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
Thanks a lot Niels!!
Your sugestion was good, it help me a bit...
Now the values looks more "real"....but aparently
appears increased in 20 (i.e.: -326 instead -306)
But now I'm closer to the solution!
Any idea why this happenns?
|
|
|
|
|
Values are NOT incorrect... look what I found
Hdn_begintrackw: INTEGER is -326
-- Notifies a header control's parent window that the user has
-- begun dragging a divider in the control (that is, the user
-- has pressed the left mouse button while the mouse cursor is
-- on a divider in the header control). This notification
-- message is sent in the form of a WM_NOTIFY message.
--
-- Declared in Windows as HDN_BEGINTRACK
I found it here
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
Correct translation to VB.NET is here:
Structure NMHDR
Dim hwndFrom As IntPtr ' Window handle of control sending message
Dim idFrom As Integer ' Identifier of control sending message
Dim code As Integer ' Specifies the notification code
End Structure
Structure NMHEADER
Dim hdr As NMHDR
Dim iItem As Integer
Dim iButton As Integer
Dim lPtrHDItem As IntPtr ' HDITEM FAR* pItem
End Structure
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
Good afternoon!
I want to ask for a VB.Net code for copying files from its source to its destination path.
Thanks in advance!
len_ems
|
|
|
|
|
System.IO.File.Copy(source, destination)
|
|
|
|
|
How do I get a list of active machines in a network using vb.net?
|
|
|
|
|
We need a little more info than this...
Define "active"?
Is it a machine that is connected to the network and turned on, but not doing anything?
Or is it a machine that is "actively" communicating and then not "active" when it is not communicating?
Is it a member of an Active Directory or Novell Directory?
What kind of information are you looking to gather from these "active" machines?
RageInTheMachine9532
|
|
|
|
|
Active machines according to me are those of the 2nd type. It would be good if u could get the machines in the active directory also.
|
|
|
|
|
Then you really can't do that. You would have to write an app that can capture all the packets that come by the machine it is running on. This would only work on Ethernet segments that are running on hubs. Switches will prevent you from seeing all the packets, which is what most corporate networks are going to be built with.
RageInTheMachine9532
|
|
|
|
|
hi...
i want to print something in a formatted manner.. but the thing is that its not from a database. its from collected information withing the program..
basically its read from a lot of files and printed in a orderly manner.. i have all the infor with me.. i just need to print it in the following manner.
the printed matter should look like the post below
can anyone pls help on how can i print in this manner???
actually i need to know how do i put it in some control in sucha way tat the thing will look like a report..
prnting will be easy once i can make it look like the post below...
my prob is how do i arrange it and what control should i use to arrange it in the below manner?? so that later i can just proint out of that control...
tks a lot...really appreciate your help...
"Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18
|
|
|
|
|
==========================================================================
S.No | File Name | File Contents |Date Created|
1 |test 1 |This is a test ... this is a test.. | 12/12/03 |
| |continuing the test..this is a test | |
| |test.this is the the test that is | |
| |continued.end of test 1. | |
2 | test 2 |Start test 2.. test 2 initiating count- | 13/12/03 |
| |down to the start of test 2. ABORT!!!!NOW!!| |
3 | test 3 |no one likes test 3. KILLED test 3 | 14/12/03 |
4 | test 4 |Anouncing the arrival of test 4!! test 4 | |
| |is here.... initiating startup............ | |
| |couting down for test 4.Crew dead! | |
5 | test 5 |Thats all folks! | |
===========================================================================
"Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18
|
|
|
|
|
i was wondering...if i put all the info i need into a listview...(which will solve my formatting problem) can i directly proint the contents of the list view to a printer in a aWYSIWYG manner??
"Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18
|
|
|
|
|
Hi,hello.I want to create a command button that used to
convert microsoft access file to Excel file.What is the code in vb6 for the command button.
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'm having all kinds of fun trying to iron out this problem, and im SURE there's an easy solution out there...
I need to use COM interop between unmanaged C++ and VB .NET to have my C++ client catch and respond to events raised in VB .NET. More specifically, I've got a VB .NET custom user ActiveX control with a valid COM interface that I've imported and used in my C++ client. I can make function calls from the COM client to the .NET server, but I cannot seem to handle events from the control.
I'm certainly no expert on COM interop, but I've browsed around and read bits of literature here and there on how to do this to no avail. The control doesn't seem to have any connection points to which I can connect to (which might be the problem), but trying to use ATL SINK_ENTRY with IDispEventImpl hasn't worked, nor has an MFC DECLARE_EVENTSINK_MAP with ON_EVENTs. I'm at a total loss and any help would be greatly appreciated.
P.S. if none of this works, would it be feasible to pass VB a C++ function pointer via its COM interface and then have VB "call" the C++ function using this pointer? They're in the same address space so it should work, but can VB call a function given only an address as a long?
|
|
|
|
|
Any suggestions on using a timer to check for a backup log's existence at a certain time every day? Is there some other function I should be using instead of Timer? Newbie needs help. Thanks!
Stacy
|
|
|
|
|
At a certain time every day? Doesn't sound like a job for a Timer. Sounds more like using the Scheduled Task control panel. Then your app wouldn't have to bother with the time or a countdown timer.
RageInTheMachine9532
|
|
|
|
|
Can I create a scheduled task programatically? This was written as a service. Thanks!
Stacy Springer
|
|
|
|
|
If it was written as a Service, then you can't launch it with the Scheduler. What does this thing do? Why the service?
RageInTheMachine9532
|
|
|
|
|
The service was designed to access a network drive once a day and verify that a certain backup file exists and that the size is greater than 500MB. If the file is there and meets the size requirement it sends an email to several people letting them know the backup was successful, else it sends an email indicating backup failure. I wrote it as a service to ensure it would run without user intervention and whether or not a individual was logged into the server it is running on. This has been my first project and a good learning experience. I appreciate any advice you have to offer. Thanks!
Stacy
|
|
|
|