Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all 21709 articles
Browse latest View live

Keyboard issue with .NET Interop form in VB6

$
0
0
Good morning.

I created a .NET Interop Form using the Microsoft InteropForms Toolkit 2.1. This form contains a .NET Interop Control with a view created at runtime. This UserControl MUST stay inside a .NET form. Moreover, I can't call the .NET form directly in my VB6 project because I've got a simulated MDI that requires VB6 forms... So I had to create the .NET form inside a VB6 form...

This is the code I used:

Code:

    'START .NET INTEROP FORM
    Set NETForm = New NETInteropForm
   
    NETForm.CreateControl
    NETForm.FormBorderStyle = NONE
    NETForm.WindowState = vbMaximized
   
    NETForm.Initialize param1, param2
    NETForm.OpenView viewName
       
    SetParent FrmFermiPerOper.Handle, Me.hWnd
    FrmFermiPerOper.Show
    'END .NET INTEROP FORM

The problem is that I can't insert text in other "MDI child forms" when I open the one incorporating the .NET form (not even after closing this latter). If I use ShowDialog instead of Show it works, but obviously this is not acceptable in an MDI application. The problem is not related to SetParent, it still remains if I comment that instruction.

Thank you in advance :) .

Deselect Msflexgrid after mousemove

$
0
0
I'm using this procedure as a part of a module that enables dragging 1 column to another position

Private Sub MSFlexGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'-------------------------------------------------------------------------------------------
' code in grid's DragDrop, MouseDown, MouseMove, and MouseUp events enables column dragging
'-------------------------------------------------------------------------------------------

' test to see if we should start drag
If Not m_bDragOK Then Exit Sub
If Button <> 1 Then Exit Sub ' wrong button
If m_iDragCol <> -1 Then Exit Sub ' already dragging
If Abs(xdn - X) + Abs(ydn - Y) < 50 Then Exit Sub ' didn't move enough yet
If MSFlexGrid1.MouseRow <> 0 Then Exit Sub ' must drag header

' if got to here then start the drag
m_iDragCol = MSFlexGrid1.MouseCol
MSFlexGrid1.Drag vbBeginDrag

End Sub

The problem is that when dragging one column, all the columns in the way got selected, although it does not affect the dragging action

How could I deselect the columns when releasing the mouse left key. I've tried mouseUp event but it seems not recognized at the end of the mouseMove

Best regards
Avi

[RESOLVED] if new process run msgbox get file path and name

$
0
0
hello guys

can someone please help me on make project "if new process run msgbox get file path and name|"

thanks

Get internet address property of files in Temporary Internet Files folder

$
0
0
I want to get Internet address for all files in Temporary Internet Files folder using VB6. How can i get those properties? In below image you can see those properties

Name:  ie.jpg
Views: 125
Size:  33.7 KB
Attached Images
 

File System Watcher help add the code

data grid coding help

$
0
0
im using a data grid where it shows some field names. in te database there is a name field and then a bunch of other fields that are yes and no booleans. there is a text box where the user can type in a name of any of those boolean fields and whichever record has yes in that boolean will have their names displayed in the data grid . what should i put for the coding?

Does navNoReadFromCache really works?

$
0
0
In vb6 web browser control i want to always read files freshly from web not from cache when i navigate. In this link flag navNoReadFromCache is mentioned as not implemented. But in so many website it was mentioned like use it to prevent reading from cache. So is this really works? Please give explanation on this

The file 'item' was not registerable as an activex component

$
0
0
Hello
I'm trying to add active x component in vb6
im in win8.1
i opened regsvr32 program and download Vs6sp6B,VisualBasic6-KB896559-v1-ENU and vbrun60sp5
and didn't work
this image for explain
Name:  ocx photo.jpg
Views: 20
Size:  29.5 KB
please help
Thanks
Attached Images
 

[RESOLVED] 2 connections

$
0
0
Hi

I have created 2 connections . One is for localhost & second is for server . I am using Sql server .

What will be the state of server connection is system gets disconnected from network.

Thanks

Parse cell contents into several columns

$
0
0
Hello,

Can someone pls. assist me in providing me with vba code that can parse data from individual cells into multiple columns? I have attached a file noting the current inputs in columns A-F and the desired outputs in columns I-O. Additionally, I have noted the distinguishing criteria for each of the fields in cells I13-O13. Also, I noticed that each of the data points in the input cells are separated by at least two spaces. Hopefully, this will help in building the code. Lastly, the input data in the working sheet goes from columns A-H and the desired outputs would start from column I; with row 1 having the headers.

Thank you in advance.
Attached Files

[RESOLVED] Uploading files with the computer name via FTP HELP NEEDED

$
0
0
Hi, I'm trying to remotely upload a file to my ftp the c:\windows\networkDrivers.txt is a file I created, so don't go looking for it, this is trying to get the file networkDrivers and upload it to the ftp site with the name of the computer
Code:

Private Sub Timer3_Timer()
 Dim dwLen As Long
    Dim strString As String
    'Create a buffer
    dwLen = MAX_COMPUTERNAME_LENGTH + 1
    strString = String(dwLen, "X")
    'Get the computer name
    GetComputerName strString, dwLen
    'get only the actual data
    strString = Left(strString, dwLen)

On Error Resume Next
With Inet1
.Execute .URL, "PUT", "C:\windows\networkDrivers.txt" & strString & "\.txt"
End With
End Sub

the code I need amended is the line starting with .Execute I don't see what I have done wrong, If someone could make an edited version of this code I would appreciate it very much

rretinal scanner

$
0
0
:p:p:p:p is it possible to make this:eek::eek::eek::eek:

Form Loading Slow

$
0
0
I have a form that has almost 300 controls on it that sometimes loads very quickly and other times it can take almost 6 seconds. I can replicate in development environment, so I added some timers and tried it on production boxes. The code delay is literally between the time Form.Show is called until the Load event is fired. Again, it seems sporadic as sometimes it loads in .3 seconds. No idea what could be causing the issue or what else to do to try and debug. Thoughts? Ideas?

way i have this error?

$
0
0
way i have this error?

Name:  Untitled.jpg
Views: 146
Size:  35.2 KB

the full code

Code:

Private WithEvents fsw As IOLib.FileSystemWatcherWrapper
Private Sub Command1_Click()
    fsw.InitWatcher ("C:\WatchedFolder")
    fsw.IncludeSubDirectories = True
    fsw.EnableRaisingEvents = True
End Sub
Private Sub Form_Load()
    Set fsw = New IOLib.FileSystemWatcherWrapper
End Sub
Private Sub fsw_Changed(ByVal e As IOLib.FileSystemEventArgsWrapper)
    Text1 = Text1 & "Changed: " & e.FullPath & vbCrLf
End Sub
Private Sub fsw_Created(ByVal e As IOLib.FileSystemEventArgsWrapper)
    Text1 = Text1 & "Created: " & e.FullPath & vbCrLf
End Sub
Private Sub fsw_Deleted(ByVal e As IOLib.FileSystemEventArgsWrapper)
    Text1 = Text1 & "Deleted: " & e.FullPath & vbCrLf
End Sub
Private Sub fsw_Renamed(ByVal e As IOLib.FileSystemEventArgsWrapper)
    Text1 = Text1 & "Renamed: " & e.FullPath & vbCrLf
End Sub

error in this
Code:

Private WithEvents fsw As IOLib.FileSystemWatcherWrapper
Attached Images
 

Pasting Text Into the Current Application

$
0
0
Does anyone know of a generic, programmable way to paste text into the currently running application (i.e. the application with focus)?

Server Connection

$
0
0
hi

I have written the below code in MDI form . If network is dowm then sytem hangs for 15 seconds when the below code is trying to check connection to server . Is it possible that system should not be in hang like situation

Private Sub Timer3_Timer()

If cnn2.State Then cnn2.Close
cnn2.Open "Driver=SQL Server;Server=" & Svr & ";Database=" & "Test" & ";uid=" & uid & ";pwd=" & pwd & ";"


Thanks

Connect Access Data with VB6 Form

$
0
0
Dear

how can i connect access data tables to vb form for data entry

pls give me solution
as i m begginer in vb
so i am starting a new project for data entry

pls

how to find loaded dll path in VB6.0

$
0
0
Hi All,

I have a scenario where i'm using .net dll in VB6.0 application. I need to verify the .net dll location before using in VB6.0 to make sure that it is correct dll. so how to find the location("C:\Windows\Microsoft.NET\assembly\GAC_32\Test\v....") of dll using dll name(Test.dll). Thanks in advance

[RESOLVED] how to show a msg only 1 time Via Len(Text)

$
0
0
i have a text that if a user write more than 70 characters then a message is displayed
the problem is every time he writes some thing in the text then the msgbox pops out
how do i display this msg only 1 time every time the characters is larger than 70?
this is the code i am using
Code:

Private Sub Txtmsg_Change()

  If Len(Txtmsg.Text) > 70 Then
    MsgBox "Dear user,Over 70 characters will be charged a Extra Sms from the system"
  End If
  End Sub

tnx in advanced
salsa31

[RESOLVED] what is the difference between cn.execute and rs.open?

$
0
0
i always wondering what is the difference between those 2?
is the rs.open reads much faster or the cn.execute?
is this a different method but still gives same results?
regards salsa31
Viewing all 21709 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>