Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

VB.NET Programming Corner!

Hi, to all

Bago lang po ako sa .net kasi mostly vb6 pa din tinuturo ^^ self study lang ako
Anyway tanong ko lang po di ba meron portable na vb6 meron po bang protable na .NET para madali lang po magprogram sa ibang computer ?

I've searched google and I've found eh puro my error so ginawa ko po ay niresearch ko pano gumawa ng portable application pero it opens but nagcracrash ewan ko kung bakit ? Ang nagexperimentuhan ko is VS 2008 and VS 2010 currently try try ko gawin portable yung 2005 .net

Please kung meron kayung portable I really need it.


Note :
kung gagawa kayu ng portable app using ThinApp ng VMware make sure gumawa kayu sa Clean OS kasi matagal din pag maraming laman and pagsuccessfull try nio sa other PC's kasi kahit maunistall mo yun eh gumagana pa din yung portable mo pero in my experience gagana siya sa PC na pinaginstallan mo but if you try sa others it would run and crash

Thanks in advance
Godbless
 
Hi, to all

Bago lang po ako sa .net kasi mostly vb6 pa din tinuturo ^^ self study lang ako
Anyway tanong ko lang po di ba meron portable na vb6 meron po bang protable na .NET para madali lang po magprogram sa ibang computer ?

I've searched google and I've found eh puro my error so ginawa ko po ay niresearch ko pano gumawa ng portable application pero it opens but nagcracrash ewan ko kung bakit ? Ang nagexperimentuhan ko is VS 2008 and VS 2010 currently try try ko gawin portable yung 2005 .net

Please kung meron kayung portable I really need it.


Note :
kung gagawa kayu ng portable app using ThinApp ng VMware make sure gumawa kayu sa Clean OS kasi matagal din pag maraming laman and pagsuccessfull try nio sa other PC's kasi kahit maunistall mo yun eh gumagana pa din yung portable mo pero in my experience gagana siya sa PC na pinaginstallan mo but if you try sa others it would run and crash

Thanks in advance
Godbless


I wont advice PORTABLE for any serious work.

VB2008 is based on the .NET Framework 3.5, it is already installed on Vista and 7, just download it for XP.
VB2005 is based ng .NET 2.0, most XP machines meron na nyan.

Just bring an installer of VB.NET Express Edition and install it sa PC na hihiramin mo.

Now kung gusto mong may magamit sa ibang PC parin, i suggest you create a virtual machine with Windows7 and VB2008 in it, then use VMware Player on another PC to use it.
If WindowsXP, use VB2005, not VB2008.

You can also use VirtualBox, meron silang Portable Version, so ang dala mo lang ay ang Virtual OS and the player (VirtualBox or VMWare Player) kasya lahat yan sa 4gb na usb drive.

Or
Pwede ka gumamit ng alternative .NET IDE like yung SharpDevelop. Free at opensource ito, similar lang sa Visual Studio IDE, a good way to learn VB.NET.

Meron din silang Portable Versions
http://community.sharpdevelop.net/forums/p/2132/23488.aspx
http://portableapps.com/node/6010


Visual Studio is not really designed to be PORTABLE, sobrang integrated yan sa WIndows OS.

Saka for a serious developer kasi, mahirap magtrabaho sa PC ng iba since madami ka tools na ginagamit.

Your development platform is your personal tool, the same sa painter na may sariling brush at ang carpenter na may sariling martilyo.
 
ano po ba ang kaibahan nang vs.net at vb.net...any sample programs in inheritance at polymorphism?
 
ano po ba ang kaibahan nang vs.net at vb.net...any sample programs in inheritance at polymorphism?

anoa ng kaibahan ng MSOffice at MSWord?

Visual Studio.NET is a SUITE (GROUP/FAMILY) of development tools (VB.NET, C#, C++) and at the same time a development environment


Visual Basic.NET is a programming languange

can you handle a classic example of inheritance in C# or VB.NET?
kasi you dont even know the difference of Visual Studio.NET and Visual Basic.NET

i suggest start ka muna sa basic like classes and objects
sa vb.net we dont worry about inheritance and polymorphism, it comes naturally na sa language
kumbaga automatic na yan.

bigyan kita ng simple then explain mo sakin kung ano ang ginagawa then saka kita bibigyan ng mas advanced
Code:
Public Class First

    Private m_x As Integer
    Private m_y As Integer

    Public Property X() As Integer
        Get
            Return m_x
        End Get
        Set(ByVal value As Integer)
            m_x = value
        End Set
    End Property

 

    Public Property Y() As Integer
        Get
            Return m_y
        End Get
        Set(ByVal value As Integer)
            m_y = value
        End Set
    End Property

End Class

Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim obj As New First
        With obj
            .X = 10
            .Y = 20
            Me.Label1.Text = .X + .Y
        End With
    End Sub
 
up lang natin for this week

ano pa ba ang need nyo makitang samples?





i found a nice tutorial page, maganda yung outline ng topics

http://www.homeandlearn.co.uk/NET/vbNet.html

samples oriented din sya, i hope some newbies find it usefull
 
Last edited:
thanks po dito master...hope na mamaster ko po itong vb.net
 
thanks po sa thread na ito...i learn a lot..,vB kasi yung gamit naming prog lang ngayon ehh..at 'di kupa masyadong kabisado kasi java yung gamit namin last year..tnx po dito sir.. :)
 
thanks po dito master...hope na mamaster ko po itong vb.net

practice, practice.
pag may nakita kang code ng iba, itype mo sa IDE mo then aralin mo how it runs.
 
@ericgmejia

boss balak ko po sana maggawa ng application na ung ginagamit sa mga internet cafe na ung nag lilimit ng time sa mga customers or user para bang internet cafe managing software..

balak ko sana sa vb 6 ko gawin, wala pa kasi ako masyadong alam sa vb.net. pero gusto ko sana subukang gumawa sa vb.net....

sana po help nyo ko kung pano ko sisimulan...
 
master magkaiba ba ang code sa vb 2003 sa ibang higher version...

share naman po kayo nang programs ninyo para mapag-aralan
 
master magkaiba ba ang code sa vb 2003 sa ibang higher version...

share naman po kayo nang programs ninyo para mapag-aralan

konti lang pinag iba, if you open yung VB2003 sa 2008 makikita mo naman ung mga commands na di supported at may suggestion kung ano ang gagawin.

madami na samples dito, sa first post ng programming puro samples yun, meron din samples dito sa thread na to.

sa internet andami din.
 
may mga bago methods pero la naman masyado changes sa syntax

madami unsupported codes or tawag nilang DEPRECATED functions,
meaning may kapalit na syntax na mas maganda sa higher version.

makikita mo to pag madami kang codes na advanced
 
Mga tol:),, pinag aaralan ko ngayon Vb.net baguhan lang ako sa language na ito mga 1Weak pala hehe.. ayos dito ako tatambay:D

may tanong ako, may ginawa akong app "stopwatch" may dalawang button (start) and (Stop) ang gusto ko sanang mangyari pagka run ng apps pag press ng space bar sa keyboard ma click narin yung start "button".. para hindi ma gamitan ng mouse kumbaga space bar for start button.. medyo magulo ako magpaliwanag sana maintindihan nyo ko mga dud:D kagabi pa ako sa google eh di ko makita.. vb 2010 gamit ko..

 
Mga tol:),, pinag aaralan ko ngayon Vb.net baguhan lang ako sa language na ito mga 1Weak pala hehe.. ayos dito ako tatambay:D

may tanong ako, may ginawa akong app "stopwatch" may dalawang button (start) and (Stop) ang gusto ko sanang mangyari pagka run ng apps pag press ng space bar sa keyboard ma click narin yung start "button".. para hindi ma gamitan ng mouse kumbaga space bar for start button.. medyo magulo ako magpaliwanag sana maintindihan nyo ko mga dud:D kagabi pa ako sa google eh di ko makita.. vb 2010 gamit ko..


may tabindex na property ang lahat ng control, un ang index kung alin unang pupuntahan ng focus pag pindot ng tab. sa load ng form mo set mo na din un focus sa button mo.

button.setfocus

at pre hindi "1 weak" dapat "1 week" hehehehe
 
Mga tol:),, pinag aaralan ko ngayon Vb.net baguhan lang ako sa language na ito mga 1Weak pala hehe.. ayos dito ako tatambay:D

may tanong ako, may ginawa akong app "stopwatch" may dalawang button (start) and (Stop) ang gusto ko sanang mangyari pagka run ng apps pag press ng space bar sa keyboard ma click narin yung start "button".. para hindi ma gamitan ng mouse kumbaga space bar for start button.. medyo magulo ako magpaliwanag sana maintindihan nyo ko mga dud:D kagabi pa ako sa google eh di ko makita.. vb 2010 gamit ko..


mag set ka ng global keyboard handler, ibig sabihin maski nasaan ang focus, mahuhuli mo parin maski anong keypress.

Set Form KEYPRESS Property to TRUE
yan ang global key handler mo

then pwede mo i TRAP yung key press sa mga event na:
KeyDown
KeyUp
KeyPress
maski may kasamang shift, ctrl or Alt pa yan

check mo kung ano ang tamang event na gagamitin
ito yung boung explantion ng isa sa mga gumawa ng VB.NET
When a key is pressed,
three events fire in the following order, and they only fire for the
active control, not for the Form itself (although all three will fire
for the form if you set this.KeyPreview = true and THEN they will ALSO
fire for the active control unless you set e.handled = true in the
Form1 handler(s)).
1. Keydown (KeyEventArgs)
2. KeyPress (KeypressEventArgs/KeyChar) - KeyChar means "Characters only!" This event does not fire for nonchars.
3. KeyUp (KeyEventArgs)

Keypress
fires only for those keystrokes that really are chars. This means you
won't get a KeyPress event from keys such as function keys, control
keys, and the cursor movement keys; you must use the KeyDown and KeyUp
events to trap those keys.

With KeyDown and Keyup, you can find
out whether a keystroke combo was pressed because in addition to the
following boolean values:
if (e.Alt == true) //boolean tests for Alt key.
if (e.Control == true) //boolean tests for Control key.
the
other key pressed (a char key) is stored in e.KeyCode. The way it works
is that if Alt alone is pressed, e.keyCode = Altkey. If a combo using
Alt plus one other key (excepting the control key), e.keycode is the
other key. Thus to test for a two-key combo of Alt-SomeOtherKey (this
does NOT include alt-Ctrl) do the following (note we make sure the
Control key is NOT pressed):
if (e.Alt == true && e.Control == false && e.keycode.ToString != "Menu")
{//"Menu" means Alt key. Arrive here if the user is pressing Alt plus any key (other than the control key)
}
if you want to detect a three-key combo using Alt-Ctrl plus any key, do this:
if
{e.Alt == true && e.Control == true &&
e.KeyCode.ToString() != "Menu" && e.KeyCode.ToString() !=
"ControlKey")
{
//arriving here means the user is pressing Alt-Ctrl plus a third key.
}

Typically, suppose you were trying to detect the combo Alt-F1:
if (e.KeyCode = Keys.F1 && e.Alt == true) then do whatever.

You can also write:
If e.Modifiers.ToString = "Control, Alt" AndAlso e.KeyCode = Keys.F1 Then...
And this
If e.Modifiers.ToString = "Shift, Control, Alt" AndAlso e.KeyCode = Keys.F1 Then...
Or this:
If e.Modifers.ToString = "Shift, Control" AndAlso e.keyCode = Keys.F1 Then...
Or this
If e.Modifers.ToString = "Shift, Alt" Then...

The
value e.KeyData includes the modifier bits whereas e.KeyCode is the
Keydata stripped of modifiers. For example if you press Control-F1
using the following code:
If e.KeyCode = Keys.F1 Then MsgBox("yes")
If e.KeyData = Keys.F1 Then MsgBox("double yes")
You will NOT see "double-yes" because in reality
e.KeyData = Keys.F1 + modifer-bits.
rather than
e.KeyData = Keys.F1
whereas in truth
e.keyCode = Keys.F1

this is how to trap space in keydown
Code:
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        If e.KeyCode = Keys.Space Then
MessageBox.Show("space")
        End If
    End Sub

this is how to trap spaec in keypress
Code:
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
        If e.KeyChar = ChrW(32) Then
            MessageBox.Show("space")
        End If
    End Sub
 
Back
Top Bottom