I'm quite confused on my project I use Spy++. What do you call the child window having another child window? If I'm using FindWindowEx does it mean I need to create another one?! I know that hwnd1 is for parent window handler, but I can not figure out what is hwnd2... Can I assign 2 parents on FindWindowEx or do I define the 1st child window as another FindWindowEx and not FindWindow?! The textbox I'm looking at, is inside a frame window and Spy++ can not determine the class of that frame window... And that frame is inside the 1st child window... So I assume that the textbox belong to the 1st child window...
↧
[RESOLVED] What does hwnd2 means?
↧
How to make Pop Up Box ala Yahoo Messenger
Dear Master/Guru/Shifu/etc
How to make pop up message ala Yahoo Messenger, so I can show notice or information such as expired date, stock product, etc
thank you
How to make pop up message ala Yahoo Messenger, so I can show notice or information such as expired date, stock product, etc
thank you
↧
↧
Press button from web page to Command1
Hello
Please Help
Press button from web page to Command1 VB
![Name: nmbn.jpg
Views: 59
Size: 37.7 KB]()
Please Help
Press button from web page to Command1 VB
↧
highlight msflexgrid row except last column
I have this msflexgrid which I populate from database. So when it is first loaded from database and I move to every row, my code to highlight the row I am in is OK. But when I filter the grid records only those matching my criteria typed on textbox and only the filtered records are seen, then I click the row to highlight, the highlighting takes so much time. It seems to loop all the rows even those rows that were hidden by the filtering search.
So I would like to ask for your advice to fix the hanging of highlighting of the row.
Below are the codes
Hoping to fix this real soon. Thanks
So I would like to ask for your advice to fix the hanging of highlighting of the row.
Below are the codes
Code:
' variable declaration
Dim rw As Long
Dim rrw As Long
Dim m_lRowHeight As Long ' to store the original rowheight
'to filter the grid record
Private Sub SearchFlexGrid()
Dim lCol As Long, lRow As Long
Dim sSearch As String
Dim bMatch As Boolean
sSearch = txtitemname1.Text
With fgcode
.Redraw = False ' for faster updating
' search all rows
For lRow = .FixedRows To .Rows - 1
If Len(sSearch) = 0 Then
' if the search text is empty then show all rows
bMatch = True
Else
' initially we don't have a match for this row
bMatch = False
For lCol = 1 To 1 '.Cols - 1 'search in column 1
' For lCol = .FixedCols To 1 '.Cols - 1
' check whether the search string is in the cell
bMatch = (InStr(1, .TextMatrix(lRow, lCol), sSearch, vbTextCompare) > 0)
If bMatch Then Exit For ' no need for searching any further
Next lCol
End If
' update the RowHeight to simulate hidden rows
If bMatch Then
.RowHeight(lRow) = m_lRowHeight
Else
.RowHeight(lRow) = 0
End If
Next lRow
.Redraw = True ' enable updating
.Refresh
End With
End Sub
'to highlight the row
Public Sub rowhighlight(ColorGrid As MSFlexGrid, rr As Long)
Dim j As Long
Dim i As Long
ColorGrid.Redraw = False
For j = 0 To 5
If rrw > 0 Then
ColorGrid.Col = j
ColorGrid.Row = rrw
ColorGrid.CellBackColor = vbWhite
End If
Next
For j = 0 To 5
ColorGrid.Col = j
ColorGrid.Row = rr
ColorGrid.CellBackColor = &H80C0FF
Next
ColorGrid.Redraw = True
ColorGrid.Refresh
rrw = rr
ColorGrid.Col = 19
End Sub
'grid row selchange
Private Sub fgcode_SelChange()
Call rowhighlight(fgcode, fgcode.Row)
End Sub
↧
Shocking Experience with MidiStreamOpen!
Almost there with MidiStreamOpen, but not quite there- hence the title.
The following represents what I think is the signature:
Here's how it's invoked:
But it's returning MMSYSERR_INVALPARAM so something is wrong with the handle.
Now just as an exercise I tested this in AutoHotKey and this works:
Something special with hWnd has to be performed for the function to return zero. Is it VarPtr(), and is curmididev okay as a ByRef arg?
Thanks for reading.
The following represents what I think is the signature:
Code:
Private Declare Function midiStreamOpen Lib "winmm.dll" (ByVal hms As LONG_PTR, ByRef puDeviceID As LONG_PTR, ByVal cMidi As Long, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal fdwOpen As Long) As Long
Code:
CALLBACK_NULL = 0
hWnd = 0&
curmididev = 0
midirc = midiStreamOpen(hWnd, curmididev, 1, 0, 0, CALLBACK_NULL)
Now just as an exercise I tested this in AutoHotKey and this works:
Code:
hWnd = 0000
curmididev := 0
DllCall("winmm.dll\midiOutOpen", UInt,&hWnd, UInt,curmididev, UInt,0, UInt,0, UInt,0, UInt)
Thanks for reading.
↧
↧
[RESOLVED] Color Conversion
How do I convert &H00FFF8F0& to RGB?
Thanks
Thanks
↧
[RESOLVED] Non-Standard Font
I have a font for JEOPARDY! (gyparody.ttf) downloaded to my computer. How do I use this font in a VB6 application (label, textbox, etc)?
Edit: I did install it in my Windows 10 machine, and I see it when I view fonts on the computer (Control Panel, Appearance and Personalization, Fonts).
Edit 2: Never Mind....I had to close the currently opened VB6 Application, then reopen it (I install the font while that app was open). Now I see it in the list provided by VB.
Edit: I did install it in my Windows 10 machine, and I see it when I view fonts on the computer (Control Panel, Appearance and Personalization, Fonts).
Edit 2: Never Mind....I had to close the currently opened VB6 Application, then reopen it (I install the font while that app was open). Now I see it in the list provided by VB.
↧
fill in listview subitem
Hi experts
I need to loop through the listview subitems(2) items and populate the listview subitems(3) as shown in the picture.
![Name: lvw.png
Views: 14
Size: 1.8 KB]()
val(ListView1.ListItems(i).SubItems(3) = the difference between the item in ListView1.ListItems(i).SubItems(2) and the preceding item.
something like this:
20....... 0
25...... .5
27........2
I wish you understand me
thank you
I need to loop through the listview subitems(2) items and populate the listview subitems(3) as shown in the picture.
val(ListView1.ListItems(i).SubItems(3) = the difference between the item in ListView1.ListItems(i).SubItems(2) and the preceding item.
something like this:
20....... 0
25...... .5
27........2
I wish you understand me
thank you
↧
What's the right one to choose?
I'm trying to create a code wherein if I open another application my own form/application follow suite... I was thinking of Conditional statement and with the use of "shell" or use an API call "SetForegroundWindow" which basically I don't have any experience of using this API call, so I still don't know what it could do?
↧
↧
[RESOLVED] Shocking Experience with MidiStreamOpen!
Almost there with MidiStreamOpen, but not quite there- hence the title.
The following represents what I think is the signature:
Here's how it's invoked:
But it's returning MMSYSERR_INVALPARAM so something is wrong with the handle.
Now just as an exercise I tested this in AutoHotKey and this works:
Something special with hWnd has to be performed for the function to return zero. Is it VarPtr(), and is curmididev okay as a ByRef arg?
Thanks for reading.
The following represents what I think is the signature:
Code:
Private Declare Function midiStreamOpen Lib "winmm.dll" (ByVal hms As LONG_PTR, ByRef puDeviceID As LONG_PTR, ByVal cMidi As Long, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal fdwOpen As Long) As Long
Code:
CALLBACK_NULL = 0
hWnd = 0&
curmididev = 0
midirc = midiStreamOpen(hWnd, curmididev, 1, 0, 0, CALLBACK_NULL)
Now just as an exercise I tested this in AutoHotKey and this works:
Code:
hWnd = 0000
curmididev := 0
DllCall("winmm.dll\midiOutOpen", UInt,&hWnd, UInt,curmididev, UInt,0, UInt,0, UInt,0, UInt)
Thanks for reading.
↧
[RESOLVED] fill in listview subitem
Hi experts
I need to loop through the listview subitems(2) items and populate the listview subitems(3) as shown in the picture.
![Name: lvw.png
Views: 52
Size: 1.8 KB]()
val(ListView1.ListItems(i).SubItems(3) = the difference between the item in ListView1.ListItems(i).SubItems(2) and the preceding item.
something like this:
20....... 0
25...... .5
27........2
I wish you understand me
thank you
I need to loop through the listview subitems(2) items and populate the listview subitems(3) as shown in the picture.
val(ListView1.ListItems(i).SubItems(3) = the difference between the item in ListView1.ListItems(i).SubItems(2) and the preceding item.
something like this:
20....... 0
25...... .5
27........2
I wish you understand me
thank you
↧
Can VB6 use JavaScript or HTML5 chart controls?
About the chart control, I have the following questions:
(1) FasionCharts for VB6 is the best VB6 chart control I've ever seen, but this control was abandoned by its developer InfoSoft Global a few years ago. I know that the development workload of a similar chart control is very large if we start from scratch. Is there a third-party graphics library such as vbRichClient5 (Cairo graphics engine) that can reduce the development workload of this chart control? Or whether there is a better product that can replace FusionCharts for VB6.
(2) Now many people are using JavaScript and HTML5 to develop chart control, if VB6 apps can use these chart controls it would be great. (I mean wrapping a JavaScript or HTML5 chart control into an OCX control for VB6 calls like FusionCharts for VB6.)
Though my current work doesn't need to use the chart control, I am still interested in this issue.
(1) FasionCharts for VB6 is the best VB6 chart control I've ever seen, but this control was abandoned by its developer InfoSoft Global a few years ago. I know that the development workload of a similar chart control is very large if we start from scratch. Is there a third-party graphics library such as vbRichClient5 (Cairo graphics engine) that can reduce the development workload of this chart control? Or whether there is a better product that can replace FusionCharts for VB6.
(2) Now many people are using JavaScript and HTML5 to develop chart control, if VB6 apps can use these chart controls it would be great. (I mean wrapping a JavaScript or HTML5 chart control into an OCX control for VB6 calls like FusionCharts for VB6.)
Though my current work doesn't need to use the chart control, I am still interested in this issue.
↧
INSERT image in subitems of lisvtview
I need to insert a Gif image(is a little image) in subitems of lisview from dir c:\dir1\image.gif, not from imagelist.
How to?
How to?
↧
↧
How does Spy++ highlighting work?
Hey everyone, in Spy++, if you are navigating the window tree hierarchy where it lists Windows parents and there children there is an option where you can right click on one of those elements and click "Highlight". When you do that it will flash a border around the window showing you where it is on the UI.
I would like to learn how to do that with VB6. I want to use the feature highlight windows and there controls to create sort of a tutorial to teach somebody how to do something, ie first push this button (highlight) and then push this button (highlight) etc...
I would like to learn how to do that with VB6. I want to use the feature highlight windows and there controls to create sort of a tutorial to teach somebody how to do something, ie first push this button (highlight) and then push this button (highlight) etc...
↧
[RESOLVED] RC5 form.visible is true after close it
Checking the "1 Hello Form-Engine (basics)" from RC5 I found fMain.Form.Visible = True, after exit from Cairo.WidgetForms.EnterMessageLoop and no form is visible;
Why this happen
Working with M2000 interpreter, revision 3 of version 8.8 I can make all objects, without references on vbcode (on interpreters dll), using M2000 commands, and got events also that runs M2000 code, and without EnterMessageLoop, using M2000 loop for threads - working threads behind RC5 forms- but then I found visible was not change it, so i use for exit a keypress(1) - mouse click on M2000 console. I am in trials with new M2000 code, but visible on form must be false if form is not shown.
Why this happen
Working with M2000 interpreter, revision 3 of version 8.8 I can make all objects, without references on vbcode (on interpreters dll), using M2000 commands, and got events also that runs M2000 code, and without EnterMessageLoop, using M2000 loop for threads - working threads behind RC5 forms- but then I found visible was not change it, so i use for exit a keypress(1) - mouse click on M2000 console. I am in trials with new M2000 code, but visible on form must be false if form is not shown.
Code:
Option Explicit
Public New_c As New cConstructor, Cairo As cCairo
Public fMain As New cfMain
Sub Main()
Set Cairo = New_c.Cairo
fMain.Form.Show
Cairo.WidgetForms.EnterMessageLoop 'this is required, since no VB-Forms are involved
MsgBox "coocoo"
Debug.Print fMain.Form.Visible ' this is TRUE but Form is not visible
End Sub
↧
create new papersize
On windows, when a print a document, you may want to select what papersize to use like letter, legal, a4, etc.
Now, if the papersize is not there, you go to print server setting and add new papersize.
my question is how do you create this programmatically through vb6 app.
Now, if the papersize is not there, you go to print server setting and add new papersize.
my question is how do you create this programmatically through vb6 app.
↧
Label hides behind other controls. ZOrder doesn't bring it to the front.
Hi.
I have a form with a lot of controls on it (SSTabs, Frames on the SSTabs, Textboxes, checkboxes, etc. on the Frames, etc).
I have placed a label directly on the form (on the bottom of all the above controls), and I have set the Visible property of this label to False (because usually it must be invisible).
The purpose of this label is to show a message to the user in case something happens.
Let's say I show this message if a Commandbutton is pressed:
It works perfectly.
Now, I change the above code a little bit, to show that message in the middle of the screen:
This does not work. The message does not show.
And the reason is obvious: It is hiding behind all those controls (SSTabs, Frames, Textboxes, etc)
In order to fix this problem and make the message show, I use ZOrder as follows:
But this STILL does not work. The message does not show.
I guess the label is still hiding behind all those controls (SSTabs, Frames, Textboxes, etc) even in spite of ZOrder being set to zero.
But, why?
And how can I fix this?
I need to show this message on the screen, on top of every other control.
How can I do that?
Please advise.
Thanks.
I have a form with a lot of controls on it (SSTabs, Frames on the SSTabs, Textboxes, checkboxes, etc. on the Frames, etc).
I have placed a label directly on the form (on the bottom of all the above controls), and I have set the Visible property of this label to False (because usually it must be invisible).
The purpose of this label is to show a message to the user in case something happens.
Let's say I show this message if a Commandbutton is pressed:
Code:
Private Sub Command1_Click()
Label1.FontBold = True
Label1.FontSize = 14
Label1.Visible = True
End Sub
Now, I change the above code a little bit, to show that message in the middle of the screen:
Code:
Private Sub Command1_Click()
Label1.FontBold = True
Label1.FontSize = 14
Label1.Top = 3000
Label1.Visible = True
End Sub
And the reason is obvious: It is hiding behind all those controls (SSTabs, Frames, Textboxes, etc)
In order to fix this problem and make the message show, I use ZOrder as follows:
Code:
Private Sub Command1_Click()
Label1.FontBold = True
Label1.FontSize = 14
Label1.Top = 3000
Label1.Visible = True
Label1.ZOrder 0
End Sub
I guess the label is still hiding behind all those controls (SSTabs, Frames, Textboxes, etc) even in spite of ZOrder being set to zero.
But, why?
And how can I fix this?
I need to show this message on the screen, on top of every other control.
How can I do that?
Please advise.
Thanks.
↧
↧
This isn't working right!! Resource file extraction data process
Dear VBForumers, here is ThEiMp talking to you, today here on in. I am looking to simplify the source code in this Code block tags, below. I wish to have the UserControl to execute the Video file, and play it in the ActiveX Control Object which is the Media Player Control for Windows 10 Professional. Then when the video is finished playing then to delete the file off the local disk and then to be in standby mode for another command by the end-user, even.
!! Thanks in advance !!
Code:
Private Sub UserControl_Initialize()
On Error Resume Next
Dim strBuff As String
strBuff = StrConv(LoadResData("1", "WEBM"), vbUnicode)
Open "c:\Temp\1.webm" For Output As #1
Print #1, strBuff
Close #1
Shell "c:\Temp\1.webm", vbMaximizedFocus
End Sub
↧
TabStrip control in vb6
I use TabStrip control in vb6.
I insert Tab1 and Tab2 in to TabStrip.On the TabStrip put PictireBox1/named ChoicePictureBox(0)/ and Frame1 .
On the PictureBox1 and Frame1 I put PictureBox2/named ChoicePictureBox(1)/and Frame2.
Once I Run the program,problem is that the Frame2 is visible on the PictireBox1!
I would like the controls placed on the PictureBox2 not to be visible on the PictireBox1.
Thanks!
I insert Tab1 and Tab2 in to TabStrip.On the TabStrip put PictireBox1/named ChoicePictureBox(0)/ and Frame1 .
On the PictureBox1 and Frame1 I put PictureBox2/named ChoicePictureBox(1)/and Frame2.
Once I Run the program,problem is that the Frame2 is visible on the PictireBox1!
I would like the controls placed on the PictureBox2 not to be visible on the PictireBox1.
Thanks!
Code:
Private SelectedTab As Integer
Private Sub Form_Load()
Dim i As Integer
' Move all the frames to the same position
' and make them all invisible.
For i = 1 To ChoicePictureBox.UBound
ChoicePictureBox(i).Move _
ChoicePictureBox(0).Left, _
ChoicePictureBox(0).Top, _
ChoicePictureBox(0).Width, _
ChoicePictureBox(0).Height
ChoicePictureBox(i).Visible = False
Next i
' Select the first tab.
SelectedTab = 1
TabStrip1.SelectedItem = TabStrip1.Tabs(SelectedTab)
ChoicePictureBox(SelectedTab - 1).Visible = True
End Sub
Private Sub TabStrip1_Click()
ChoicePictureBox(SelectedTab - 1).Visible = False
SelectedTab = TabStrip1.SelectedItem.Index
ChoicePictureBox(SelectedTab - 1).Visible = True
↧
AnimateWindow broken post-XP?
I'm not sure when AnimateWindow quit working. I was sure it was working Ok even for a simple PictureBox in the past. But I can't get it working right for a UserControl either.
Something like a simple TextBox seems Ok yet, but I'm sure the issues necessary were addressed within common system controls like the one inside a TextBox.
This is broken on Windows 10 though it might work yet on something earlier:
![Name: sshot Broken.png
Views: 51
Size: 1.3 KB]()
I have two fixes but one has an awful flicker on Form Load (it has to make the UserControl visible to do a capture on it), here is the second one that works as desired:
![Name: sshot Fix 2.png
Views: 44
Size: 2.4 KB]()
Surely there is a better alternative though? The gyrations I'm going through seem beyond unnecessary.
Something like a simple TextBox seems Ok yet, but I'm sure the issues necessary were addressed within common system controls like the one inside a TextBox.
This is broken on Windows 10 though it might work yet on something earlier:
I have two fixes but one has an awful flicker on Form Load (it has to make the UserControl visible to do a capture on it), here is the second one that works as desired:
Surely there is a better alternative though? The gyrations I'm going through seem beyond unnecessary.
↧