|
|
When I am dragging a column divider,sysheader32 will issue HDN_TRACK Notification.But the interval of this notification (column width changing) is not by 1 pixels step . How to get notification by 1 pixel changing?
I want to implement ColMaxWidth and ColMinWidth property into vbaccelerator’s sGrid2.
When I am dragging the divider of a column, the column will stop resizing when column width is reaching the colmaxwidth or colminwidth boundary.
I am checking the mouse position or lWidth in sub m_cHeader_ColumnWidthChanging,if Column Width is reaching the colmaxwidth or colminwidth boundary,then I use ClipCursor API to restrict mouse movement. But the problem is that Header's HDN_TRACK notification is not being sent by 1 pixes change . When I got the notification,the column width has been changed by more than 1 pixels.That is why I can't control the column width accurately. e.g. the Max. Column width is set to 100,The min. Column Width is 50,But somehow,the Column width is going to 48 or 102,not the exact 50 or 100 while resizing.
in Header Class,I am Subclassing those related notifications:
Case HDN_TRACKA, HDN_TRACKW
CopyMemory tHDN, ByVal lParam, LenB(tHDN)
'/* Get HD_ITEM from tHDN.lPtrHDItem. Don't use a HD_ITEM
'/* structure - you will crash...
'
Private Sub m_cHeader_ColumnWidthChanging(ByVal lColumn As Long, _
lWidth As Long, _
bCancel As Boolean)
Dim iCol As Long
Dim iIntCol As Long
Dim tR As RECT
Dim tClipRect As RECT
Dim iCurrentCol As Long
For iCol = 1 To m_iCols
If (m_tCols(iCol).lHeaderColIndex = lColumn + 1) Then
iCurrentCol = iCol
End If
Next
If Not m_tCols(iCurrentCol).lMaxWidth = -1 Then
If lWidth > m_tCols(iCurrentCol).lMaxWidth Then
ClipCursorRect tClipRect
End If
End If
If Not m_tCols(iCurrentCol).lMinWidth = -1 Then
If lWidth < m_tCols(iCurrentCol).lMinWidth Then
ClipCursorRect tClipRect
End If
End If
pGetDragImageRect lColumn, lWidth, tR, False
DrawDragImage tR, False, False
RaiseEvent ColumnWidthChanging(lColumn, lWidth, bCancel)
If bCancel Then
DrawDragImage tR, False, True
End If
End Sub
Private Sub pGerClipColRect(ByVal lCol As Long, _
ByVal lMaxWidth As Long, _
ByVal lMinWidth As Long, _
ByRef tR As RECT)
Dim iCol As Long
Dim iGCol As Long
Dim tP As POINTAPI
'/* Find RECT for header column with Max and Min Width to stop sizing when out of boundary:
If lCol > 0 Then
'
[Chinese]当拖动Header的分界线时候,会发出HDN_TRACK消息(Notification)。问题是HDN_TRACK消息的发出间隔不是1 pixels by 1 pixels,可能多过一个Pixels.请问要用什么办法可以获得sysheader32的Column每改变1 pixels消息?
|
|
|
|
|
mates,
how to read the name of a public class.
example.
Public Class frmEntry
i want to put the name frmEntry in my log.txt using log4net.
in log.txt.
what i did in c#.net
private void Page_Load(object sender, System.EventArgs e)
{
log.debug(typeof(frmEntry) +"【Page_Load】*************[Start]")
}
what is equivalent in vb.net
Private Sub frmEntry_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
log.debug(Me.ToString & "【frmEntry_Load】*************[Start]")
EndSub
typeof(frmEntry) in vb.net???? TypeOf(Me) will not work.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
C#Coudou wrote: typeof(frmEntry)
GetType(frmEntry).ToString
|
|
|
|
|
Hi all
I'm new here and new to VB.Net 2008, so forgive my naivety...
I am trying to read the contents of .cbr and .cbz files.
Searching the net I have found UnRARdll.exe but when I try to add the reference in Visual Studio 2008 (VB) it won't accept the DLL as a valid reference.
Any ideas on what I am doing wrong or what I should be using?
I have also ssen the declaration 'imports RARNET' but I can't work out how to find the reference either.
Any help much appreciated. Many thanks in advance...
|
|
|
|
|
You can only set a reference to a .NET or COM-based .DLL. Since the reference won't go, you're trying to set one on a normal library .DLL. The only way to get at the functions of a library .DLL is to use P/Invoke. But, in order to do that, you need the documentation on the functions in the .DLL. Wihtout it, you're just guessing at the parameters you have to setup for each function.
|
|
|
|
|
Dave, many thanks I'll try a work around...
|
|
|
|
|
Hi group,
I have a tree view with eg. following nodes
# People
|
+--# Custumers
|
+-- # Anne Charles, Hillroad 14, 7766 MyTown, My Country
|
+-- # Steve Jones, Forestroad 12, 7766 MyTown, My Country
With the command
Me.treeViewM.Nodes(0).Nodes(0).Nodes(0).EnsureVisible()
I can ensure that "Anne Charles" is visible within the treeview. My problem is: If the treeview is not wide enough to show the complete node text of this node, the horizontal scroll bar is automatically moved to the right so that node structure shown left from the "A" in the text "Anne Charles" is not visible any more. Thus
Anne Charles, Hillroad 14, 7766 MyTown, My Country
Steve Jones, Forestroad 12, 7766 MyTown, My Country
is visible and the node structure is hidden.
Question: How can I ensure that the node "Anne Charles" is visible and also the horizontal scrollbar is aligned to the left, which means that the node structure left from the text is still visible?
Best wishes
Michael
[Visual Basic .net 2005]
|
|
|
|
|
Take a look at this[^]. One of the responses claims to do the trick. Unfortunately the code is C#, but have a look, you may be able to convert it yourself, but if not I'm sure that someone here will be able to help you out.
I have also found this snippet:
SendMessage(treeView.Handle, WM_HSCROLL, SB_LEFT, 0);
This also uses the Windows API, I don't think it is possible without doing that, but there's plenty on the web about the SendMessage API call, you will also need to look up the values for the WM_HSCROLL and SB_LEFT constants.
Good luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
modified on Wednesday, April 1, 2009 6:58 PM
|
|
|
|
|
thanks for your hints.
I've found the explanations on
[^]
It solved my problem.
best wishes
Michael
|
|
|
|
|
hi .... everybody
who can give me example of Database + listbox with image or icon
the icon and image within listbox can be checked by people and give the result of database query
garnett
|
|
|
|
|
If memory serves, QuickBooks used to use that technique.
Hope this helps.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I can use VB.Net or C# .... just what I want
I now estimate the method
please don't post the reply answer of no help
garnett
|
|
|
|
|
This guy has posted the same request in more than one forum.
I have asked him to remove one, and explained the reasons that he should.
He appears not to want to.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I just want to know C# or VB.Net method
so I post to two forum
and plz don't waste time to reply unuseful answer
I only want to know the method that how to do it
garnett
|
|
|
|
|
I found the answer by myself, it uses component called "listbar"
I only want the answer like this , ok ?
garnett
|
|
|
|
|
Hi all,
i have vb.net dll and i used this dll from webbage, i want this dll to display message box through webpage to the client ans open new page contains textbox to get input from user.
please i want urgant help in this point.
Thanks
|
|
|
|
|
Several things wrong with your post:
0: this is the VB.NET forum, your question is about webdevelopment so go to the ASP.NET forum : Correct forum[^] and ask there again
1: every question here is urgent, the people answering however don't get payed so you'll get an answer whenever you get it.
2: from what I can understand from your question, what you are trying to do isn't possible (as far as I know), but ask in the correct forum and people can make better suggestions
|
|
|
|
|
|
Hello friends,
I want to copy a file from one folder to another.
I am using File object.copy to copy the file from one folder to another. How can i make sure that the copy is success or not?
Thanks and regards
Jishith
|
|
|
|
|
If it succeeds, no exception will be thrown, and File.Exists(destination) will return true
|
|
|
|
|
I have a text file that has similar lines..;
i want to count those similar lines and write it as 1 line with a new fieldname Quantity indicating the number of similar lines...
thanks in advance
|
|
|
|
|
Import it in a database and do a SELECT DISTINCT
I are troll
|
|
|
|
|
When handling text files and doing actions on them I always find its best to read the whole text file line by line into a datatable or array or list. Do your actions you need to do on that datatable / array / list and then overwrite the file with a new one.
|
|
|
|
|
i have not used datatable before...
i have no idea about it.
i searched google, but did not get anything useful to do...
any help to import text file into datatable will be mmore helpfull.
thanks for the previous reply and for the future replies...
|
|
|
|