Click here to Skip to main content
15,909,466 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: 3rd Party Controls Pin
seee sharp18-Sep-05 18:03
seee sharp18-Sep-05 18:03 
QuestionHandling Exceptions Pin
nitin_ion16-Sep-05 21:17
nitin_ion16-Sep-05 21:17 
AnswerRe: Handling Exceptions Pin
Colin Angus Mackay17-Sep-05 2:04
Colin Angus Mackay17-Sep-05 2:04 
GeneralRe: Handling Exceptions Pin
nitin_ion17-Sep-05 23:51
nitin_ion17-Sep-05 23:51 
GeneralRe: Handling Exceptions Pin
Colin Angus Mackay18-Sep-05 0:15
Colin Angus Mackay18-Sep-05 0:15 
GeneralRe: Handling Exceptions Pin
nitin_ion18-Sep-05 0:24
nitin_ion18-Sep-05 0:24 
GeneralRe: Handling Exceptions Pin
nitin_ion18-Sep-05 2:28
nitin_ion18-Sep-05 2:28 
QuestionVB.NET & Win32 API Pin
hung_ngole16-Sep-05 17:48
hung_ngole16-Sep-05 17:48 
I have this code in VB6 but I don't know how to change into VB.NET ?

Private Declare Function GetFocus Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Integer) As Long
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long

Private Const WM_CHAR As Long = &H102
Private Const CH_A As Byte = 65

Private Sub Command1_Click()
Dim handleactive As Long
Dim recString As String
Dim handle As Long

handleactive = GetFocus()
'Call Shell("c:\windows\system32\cmd.exe", vbMaximizedFocus)
'handleactive = GetActiveWindow()
handle = FindWindowEx(0, 0, "ConsoleWindowClass", "C:\WINDOWS\system32\cmd.exe")
DoEvents

SendMessage handle, WM_CHAR, vbKeyC, 0
SendMessage handle, WM_CHAR, vbKeyD, 0
SendMessage handle, WM_CHAR, vbKeyReturn, 0
recString = String(100, Chr$(0))
GetWindowText handleactive, recString, 50
Text1 = recString

End Sub

Thanks for your helping!

Hung
QuestionScrolling Programmatically Pin
Gulfraz Khan16-Sep-05 7:39
Gulfraz Khan16-Sep-05 7:39 
AnswerRe: Scrolling Programmatically Pin
seee sharp18-Sep-05 18:05
seee sharp18-Sep-05 18:05 
GeneralRe: Scrolling Programmatically Pin
Gulfraz Khan19-Sep-05 5:09
Gulfraz Khan19-Sep-05 5:09 
GeneralRe: Scrolling Programmatically Pin
seee sharp19-Sep-05 19:02
seee sharp19-Sep-05 19:02 
GeneralRe: Scrolling Programmatically Pin
Gulfraz Khan20-Sep-05 2:42
Gulfraz Khan20-Sep-05 2:42 
Questionmultiple monitor support. Pin
oyinbogo16-Sep-05 6:49
oyinbogo16-Sep-05 6:49 
AnswerRe: multiple monitor support. Pin
Joshua Quick16-Sep-05 7:47
Joshua Quick16-Sep-05 7:47 
QuestionReplace Item Listbox ? Pin
gerrolette16-Sep-05 6:04
gerrolette16-Sep-05 6:04 
AnswerRe: Replace Item Listbox ? Pin
Briga19-Sep-05 22:23
Briga19-Sep-05 22:23 
GeneralRe: Replace Item Listbox ? Pin
gerrolette20-Sep-05 2:01
gerrolette20-Sep-05 2:01 
GeneralRe: Replace Item Listbox ? Pin
Briga20-Sep-05 6:48
Briga20-Sep-05 6:48 
Questioncombining unicode characters in vb or vbscript Pin
Lanre Ogunkola16-Sep-05 5:20
Lanre Ogunkola16-Sep-05 5:20 
QuestionSingle datatype calculation error Pin
Anonymous16-Sep-05 4:24
Anonymous16-Sep-05 4:24 
AnswerRe: Single datatype calculation error Pin
Dave Kreskowiak16-Sep-05 6:12
mveDave Kreskowiak16-Sep-05 6:12 
QuestionRe: Single datatype calculation error Pin
Anonymous16-Sep-05 10:32
Anonymous16-Sep-05 10:32 
AnswerRe: Single datatype calculation error Pin
Dave Kreskowiak16-Sep-05 12:01
mveDave Kreskowiak16-Sep-05 12:01 
QuestionHow do I embed a database in a VB.NET application Pin
lutherium16-Sep-05 3:34
lutherium16-Sep-05 3:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.