Topic: Visual Basic 6.0 Section  (Read 18824 times)

04-04-13 11:34 PM
vixensalcedo
Jr. Member II
  • Posts: 202
  • Thanked: 14
  • Reputation: 0
good evening ginawa ko itong thread for vb 6.0 users pwede kayo mag tanong at mag share

thank you!

04-14-13 09:15 AM
bubu4
Newbie
  • Posts: 1
  • Thanked: 1
  • Reputation: 0
sir ask ko lang po kung ano po ulit yung vb code ng random number and letter generator. tia.

04-16-13 09:15 AM
tokiobomb
Full Member
  • Posts: 357
  • Thanked: 576
  • Reputation: 0
sa random number pwede pong ganito

dim rndvalue as integer
rndvalue = Int((6 * Rnd()) + 1)

eto naman yung sa random letter pero hinde po ako ang may gawa neto
Quote
Function RandomString(cb As Integer) As String

    Randomize
    Dim rgch As String
    rgch = "abcdefghijklmnopqrstuvwxyz"
    rgch = rgch & UCase(rgch) & "0123456789"

    Dim i As Long
    For i = 1 To cb
        RandomString = RandomString & Mid$(rgch, Int(Rnd() * Len(rgch) + 1), 1)
    Next

End Function
credits here [You are not allowed to view links. Register or Login]
B :angry: MB I LIVE, B :angry: MB I DIE

04-24-13 08:18 PM
__lover__
Jr. Member
  • Posts: 108
  • Thanked: 9
  • Reputation: 0
may sample kayo ng screen capture sa vb 6? paki post naman

05-26-13 07:27 PM
nickalcala
Full Member
  • Posts: 357
  • Thanked: 21
  • Reputation: 0
pahelp po ito po thread ko [You are not allowed to view links. Register or Login]
« Last Edit: 05-26-13 07:28 PM by nickalcala »
[You are not allowed to view links. Register or Login]

06-15-13 11:10 PM
vixensalcedo
Jr. Member II
  • Posts: 202
  • Thanked: 14
  • Reputation: 0
[You are not allowed to view links. Register or Login]
may sample kayo ng screen capture sa vb 6? paki post naman

This code will capture a screenshot from a window or the entire desktop (virtual screen) and draw it to a custom picturebox.

Private Type RECT
  Left As Long
  Top As Long
  Right As Long
  Bottom As Long
End Type

Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hWnd As Long, lpRect As RECT) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long

Private Declare Function GetWindowDC Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hDC As Long) As Long

Private Const SM_XVIRTUALSCREEN = 76
Private Const SM_YVIRTUALSCREEN = 77
Private Const SM_CYVIRTUALSCREEN = 79
Private Const SM_CXVIRTUALSCREEN = 78

Private Function GetScreenshot(Optional ByVal hWnd As Long = 0) As DIBSection
Dim hDC As Long

Dim WindowRect As RECT
Dim Left As Long
Dim Top As Long
Dim Width As Long
Dim Height As Long

  If hWnd = 0 Then
    'Get the DC of the desktop
    hDC = GetWindowDC(GetDesktopWindow)

    'Get the virtual screen coordinates (this handles multiple monitors too :)
    Left = GetSystemMetrics(SM_XVIRTUALSCREEN)
    Top = GetSystemMetrics(SM_YVIRTUALSCREEN)
    Width = GetSystemMetrics(SM_CXVIRTUALSCREEN)
    Height = GetSystemMetrics(SM_CYVIRTUALSCREEN)

  Else
    'Get the DC of the window we want to capture
    hDC = GetWindowDC(hWnd)

    'Get the window coordinates
    GetWindowRect hWnd, WindowRect
    Left = 0
    Top = 0
    Width = WindowRect.Right - WindowRect.Left
    Height = WindowRect.Bottom - WindowRect.Top

  End If

  'BitBlt into our own DC
  BitBlt picScreen.hDC, 0, 0, Width, Height, hDC, Left, Top, vbSrcCopy

  'Delete our reference to the windows's DC
  ReleaseDC hWnd, hDC
End Function

Note the use of GetSystemMetrics() when capturing the desktop. This allows it to get the full virtual screen screen dimensions when multiple monitors are in use instead of just the primary monitor.

credits to stackoverflow

06-16-13 03:03 PM
mustradamus
Semi-Newbie
  • Posts: 43
  • Thanked: 3
  • Reputation: 0
boss pa attach ng installer vb compiler thanks po :)

06-19-13 09:25 AM
vixensalcedo
Jr. Member II
  • Posts: 202
  • Thanked: 14
  • Reputation: 0
wait boss nakamobile ako. . saka yung gusto magpagawa ng system reply lang at sabihin yung details ng system

06-19-13 03:44 PM
time_splitzers
Full Member
  • Posts: 2967
  • Thanked: 977
  • Reputation: 1
wow nice patambay dito
Ang buhay prang sandwich..
minsan masarap, minsan
matamis,
pro pg ang buhay mo ay walang
lasa
icpin mo nlang ham yan! hehehe..

06-19-13 08:37 PM
mustradamus
Semi-Newbie
  • Posts: 43
  • Thanked: 3
  • Reputation: 0
ayos yan tol salamat

06-19-13 09:42 PM
Takashi
Sr. Member
  • Posts: 7072
  • Thanked: 239
  • Reputation: 1
Sir paano ilink ang ms access sa vb6?
[You are not allowed to view links. Register or Login]

06-19-13 10:01 PM
nickalcala
Full Member
  • Posts: 357
  • Thanked: 21
  • Reputation: 0
[You are not allowed to view links. Register or Login]
Sir paano ilink ang ms access sa vb6?
pede pu adodb or adodc..preferably adodc kasi madali lang lalo na sa mga newbie :D
« Last Edit: 06-19-13 10:02 PM by nickalcala »
[You are not allowed to view links. Register or Login]

06-19-13 10:09 PM
Takashi
Sr. Member
  • Posts: 7072
  • Thanked: 239
  • Reputation: 1
Panu nga po yung code format nun?
[You are not allowed to view links. Register or Login]

06-19-13 10:20 PM
nickalcala
Full Member
  • Posts: 357
  • Thanked: 21
  • Reputation: 0
[You are not allowed to view links. Register or Login]
Panu nga po yung code format nun?
component po yun..unlike adodb mas konte ang code nun kaya newbie friendly at madali intindihin :D
« Last Edit: 06-19-13 10:21 PM by nickalcala »
[You are not allowed to view links. Register or Login]

06-19-13 10:49 PM
Takashi
Sr. Member
  • Posts: 7072
  • Thanked: 239
  • Reputation: 1
Component? I mean is example gumawa ako ng database sa ms access , tapos gagawa ako ng program sa vb6. Paanu ko po ikokonect yung database dun sa program.?
[You are not allowed to view links. Register or Login]

06-19-13 11:15 PM
nickalcala
Full Member
  • Posts: 357
  • Thanked: 21
  • Reputation: 0
[You are not allowed to view links. Register or Login]
Component? I mean is example gumawa ako ng database sa ms access , tapos gagawa ako ng program sa vb6. Paanu ko po ikokonect yung database dun sa program.?
gagamitin mu yung component para mai connect..rclick sa toolbox then add component ba yun nakalimutan ko yung word. hanapin mu sa list ang microsoft ado data control...punta ka po sa youtube channel ko hanapin mo yung vb6 simsimi me dl link ng source code dun...tsaka newbie pa ako at that time kaya senya na kung mejo magulo :D [You are not allowed to view links. Register or Login]
edit:
ito pala [You are not allowed to view links. Register or Login]
« Last Edit: 06-19-13 11:28 PM by nickalcala »
[You are not allowed to view links. Register or Login]

06-20-13 09:10 PM
daizu
Full Member
  • Posts: 1248
  • Thanked: 105
  • Reputation: 0
Eto showing a-z alphabet, lagay lang sa command button tapos gawa list box

Code: [You are not allowed to view links. Register or Login]
dim x as integer

List1.clear

for x = 92 to 122
y = chr$(x)

List1.AddItem Cstr(y)

Next x


- tama ba to ? Pakicorrect mga boss kung mali. :D kakaumpisa lang magvb6 sa tesda.

06-20-13 09:52 PM
vixensalcedo
Jr. Member II
  • Posts: 202
  • Thanked: 14
  • Reputation: 0
if want nyo malaman yung proper code about connecting to database i use this site
connectionstrings.com or .org ata . . search nyo sa google

06-20-13 09:55 PM
4Got10Shadow77
Full Member
  • Posts: 1528
  • Thanked: 167
  • Reputation: 1
Quote
- tama ba to ? Pakicorrect mga boss kung mali.  kakaumpisa lang magvb6 sa tesda.

wala bang PHP sa tesda?? ilang months ka daizu??
c/c++/c#/java/php/sql/htmlcss/python/android/webdesign EBOOKS DOWNLOAD
[You are not allowed to view links. Register or Login]
[/size]

06-20-13 10:06 PM
Takashi
Sr. Member
  • Posts: 7072
  • Thanked: 239
  • Reputation: 1
Kaya po nagpopost ng mga ganitong thread para hindi sa google palagi naghahanap.
[You are not allowed to view links. Register or Login]