hulika

Author Topic: Visual Basic Thread *merged*  (Read 8183 times)

Offline jigaman

  • Regular Member
  • ***
Visual Basic Thread *merged*
« on: April 12, 2011, 10:19:52 AM »
we're having a thesis right now.
and Im having trouble with vb.net application.
pa help naman po. anyone??  :?

Offline jcbska

  • Veteran Member
  • ****
Re: Help sa VB.NET..
« Reply #1 on: April 29, 2011, 02:04:54 PM »
what kind of problem bro? pls specify..

Offline jigaman

  • Regular Member
  • ***
Re: Help sa VB.NET..
« Reply #2 on: April 29, 2011, 09:15:18 PM »
im having a hard time using a radiobutton for the scoring of my quiz project.

Offline ierofan

  • Philmusicus Addictus
  • *****
Re: Help sa VB.NET..
« Reply #3 on: May 01, 2011, 08:20:42 AM »
Radio button for scoring? Please tell us more.
████████████████████████████████████████████████████████████████████████

[This signature has been blocked in accordance to RA No. 10175]

Offline robertshanepascual

  • Philmusicus Addictus
  • *****
Re: Help sa VB.NET..
« Reply #4 on: May 01, 2011, 02:25:29 PM »
we're having a thesis right now.
and Im having trouble with vb.net application.
pa help naman po. anyone??  :?

print screen naman nun form nung vb na ginagawa mo sir para may idea kami sa gnagawa mo
just groove with it and everything will be allright...


Offline robertshanepascual

  • Philmusicus Addictus
  • *****
Visual Basic Thread *merged*
« Reply #5 on: September 10, 2012, 04:22:19 PM »
Anyone na malupit mag VB?
sana matulungan nyo ako mga ka PM...

Goal:

* Connect The VB to MS Excel as its Database - Status: working okay na.
* Be able to search the products Serial No to display its Product Information.
 - hindi pa okay  :-( - my problem


Here's the GUI Screen Shot:



// wag nyo muna po pansinin yung edit/update Button.
Heres the sample attached data * to be saves as " sampledata.xls " in drive c: (as i stated in the source code)


Serial_No   Product Name   Product Code   Date Purchased   Reseller   Warranty   Details
01a   Dell Vostro Laptop   Dell-00121   Sept 29,2012   Octagon   2years   Sample Data Only
02a   MacBook Pro   MBP-1111   Sept 29,2012   TCA   1Year   Sample Data Only
03a   HP Spactre Pro    HP1-01   Sept 29,2012   Villman   3Years   Sample Data Only


and here is the source code (to be pasted in the Search Button)


Imports System.Data.SqlClient

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim MyConnection As System.Data.OleDb.OleDbConnection

        Dim DtSet As System.Data.DataSet

        Dim MyCommand As System.Data.OleDb.OleDbDataAdapter

        MyConnection = New System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source='c:\sampledata.xls';Extended Properties=Excel 8.0;")

        MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [Sheet1$]", MyConnection)

        'MyCommand.TableMappings.Add("Table", "Net-informations.com")

        DtSet = New System.Data.DataSet

        MyCommand.Fill(DtSet)

        DataGridView1.DataSource = DtSet.Tables(0)

        MyConnection.Close()

    End Sub

End Class



---
Sana may makatulong :(
TIA

« Last Edit: September 10, 2012, 04:24:48 PM by robertshanepascual »
just groove with it and everything will be allright...

Offline ierofan

  • Philmusicus Addictus
  • *****
Re: Need Help in Visual Basic 2008. Sana may makatulong :(
« Reply #6 on: September 10, 2012, 08:01:32 PM »
Search lang?
████████████████████████████████████████████████████████████████████████

[This signature has been blocked in accordance to RA No. 10175]

Offline thuzkee02

  • Senior Member
  • ***
Re: Need Help in Visual Basic 2008. Sana may makatulong :(
« Reply #7 on: September 10, 2012, 08:55:47 PM »
Wow. babantayan ko to... :)
:)

Offline robertshanepascual

  • Philmusicus Addictus
  • *****
Re: Need Help in Visual Basic 2008. Sana may makatulong :(
« Reply #8 on: September 11, 2012, 08:47:21 AM »
UPDATE:

Gumagana na yung search button and here's the code:
// yung naka highlight yung dinagdag ko na code.
( Bali ang naging concern ko nun una ay baka hindi nababasa ni VB na Field name yung unang column kasi nga Excel file yung ginawa kong database, first time ko din kasi tong ginawa)


Imports System.Data.SqlClient

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim MyConnection As System.Data.OleDb.OleDbConnection

        Dim DtSet As System.Data.DataSet

        Dim MyCommand As System.Data.OleDb.OleDbDataAdapter
        Dim source1 As New BindingSource()

        MyConnection = New System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source='d:\sampledata.xls';Extended Properties=Excel 8.0;")

        MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [Sheet1$]", MyConnection)

        'MyCommand.TableMappings.Add("Table", "Net-informations.com")


        DtSet = New System.Data.DataSet

        MyCommand.Fill(DtSet)

        DataGridView1.DataSource = DtSet.Tables(0)

        '     Dim view1 As New DataView(tables(0))

        source1.DataSource = DataGridView1.DataSource
        DataGridView1.DataSource = source1
        source1.Filter = "Serial_No = '" & TextBox1.Text & "'"


        MyConnection.Close()



    End Sub

---

OUTPUT:




* Ang Goal ko naman ngayon is Mapagana yung Update Button.
kapag pinindot yung update button kailangan lalabas yung spreadsheet para
makapag lagay ng bagong data dun sa spreadsheet.

* Tsaka kailangan ko ma Convert to as Asp.Net kasi web based ito iaaply.

 - Any suggestions/ Help Please? :D
just groove with it and everything will be allright...

Offline ierofan

  • Philmusicus Addictus
  • *****
Re: Need Help in Visual Basic 2008. Sana may makatulong :(
« Reply #9 on: September 11, 2012, 11:30:51 AM »
Kung ipo-port mo ng ASP.net yan, dapat dinirecho mo na. Kasi the two are completely different, I tell you. Kung anong ginagawa mo ngayon jan sa VB, soooobrang kaiba sa ASP.net.
████████████████████████████████████████████████████████████████████████

[This signature has been blocked in accordance to RA No. 10175]

Offline robertshanepascual

  • Philmusicus Addictus
  • *****
Re: Need Help in Visual Basic 2008. Sana may makatulong :(
« Reply #10 on: September 12, 2012, 12:06:56 PM »
@ ierofan, nagawa ko na sya using asp.net gumamit ako ng same coding sa vb pero hindi naman sila nagkakalayo ng syntax.

eto yung code nung sa Search Button Part:


Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Label1.Text = ""
        Dim MyConnection As System.Data.OleDb.OleDbConnection

        Dim DtSet As System.Data.DataSet

        Dim MyCommand As System.Data.OleDb.OleDbDataAdapter

        'Dim source1 As New LinqDataSource

        MyConnection = New System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source='d:\sampledata.xls';Extended Properties=Excel 8.0;")

        If TextBox1.Text <> "" Then

            MyCommand = New System.Data.OleDb.OleDbDataAdapter("SELECT [Serial_No], [Product Code], [Product Name], [Date Purchased], [Reseller], [Warranty], [Details] FROM [Sheet1$] WHERE [Serial_No] = '" & TextBox1.Text & "'", MyConnection)

            DtSet = New System.Data.DataSet

            MyCommand.Fill(DtSet)

            GridView1.DataSource = DtSet.Tables(0).DefaultView
            GridView1.DataBind()
            If (GridView1.Rows.Count = 0) Then
                Label1.Text = "No records found"
            End If
            MyConnection.Close()
        Else
            Label1.Text = "Please enter Serial No!"
            TextBox1.Focus()
        End If
    End Sub


---
eto yung output:



---

Editing/Updating Excel file in Asp nalang ang kulang  :)
just groove with it and everything will be allright...

Offline glennaui

  • Forum Fanatic
  • ****
share your VB.NET Tips please...
« Reply #11 on: October 15, 2012, 05:07:43 PM »
Anyone here who develops VB.NET Apps?
Im currently teaching myself to be familiar with this language
Right now im familiarizing some techniques and I am stuck at this dilemma.

Can anyone help me or suggest some tips? I am looking through the net but somehow I cant manage to find any tips so Im hoping that anyone here can help me...


My dilemmas are these, I want to have a text in the text box saying instructions to the user.
The other is I want to disable the two operating buttons which are ADD and SUBTRACT if there is no data input.

Like this
NOTE: I just edited this pic but this is how my app should be



Then, when a data has been inserted, the text will be what the user had entered on the textbox and the
two operating buttons shall be enabled...




Any tips would help... :wave:
 

Offline Riff_6603

  • Philmusicus Moderatus
  • Prime Moderator
  • ******
Re: share your VB.NET Tips please...
« Reply #12 on: October 16, 2012, 02:56:54 AM »
I want to have a text in the text box saying instructions to the user.

For displaying a text in a TextBox control:

TextBox1.Text = "insert instructions here"

You can also collect the input value from a TextBox control to a variable like this way

  Dim var As String

var = TextBox1.Text

The other is I want to disable the two operating buttons which are ADD and SUBTRACT if there is no data input.

pwede ka mag-if then statements na dyan:

If textbox1.text and textbox2.text = "insert command here" then add button and subtract button = "false"

said statement may not work but the concept is similar. nuance kasi yung program na ginagamit ko sa office (variation of VB pero for voice commands naman yung scripting).


you could check out more stuff here:
http://vb.net-informations.com/

Offline glennaui

  • Forum Fanatic
  • ****
Re: share your VB.NET Tips please...
« Reply #13 on: October 16, 2012, 06:31:55 AM »
For displaying a text in a TextBox control:

TextBox1.Text = "insert instructions here"

You can also collect the input value from a TextBox control to a variable like this way

  Dim var As String

var = TextBox1.Text

pwede ka mag-if then statements na dyan:

If textbox1.text and textbox2.text = "insert command here" then add button and subtract button = "false"

said statement may not work but the concept is similar. nuance kasi yung program na ginagamit ko sa office (variation of VB pero for voice commands naman yung scripting).


you could check out more stuff here:
http://vb.net-informations.com/

thanks sir. I will try that... :)

Offline ierofan

  • Philmusicus Addictus
  • *****
Re: share your VB.NET Tips please...
« Reply #14 on: October 16, 2012, 02:02:34 PM »
Public Sub Textbox1.onClick() or Public Sub Textbox1.onfocus() something like that. Yun yung pwede mong gamitin.

Kasi yung initialization mo ng textbox is Textbox1.text = "Text here". Sabay yung nasa loob ng Sub Textbox1.text = "" para mabubura sya kapag naclick yung textbox, or nafocus. pwede rin dun mo ilagay yung pag enable/disable ng buttons or other objects.
████████████████████████████████████████████████████████████████████████

[This signature has been blocked in accordance to RA No. 10175]

Offline glennaui

  • Forum Fanatic
  • ****
Re: share your VB.NET Tips please...
« Reply #15 on: October 17, 2012, 06:08:53 AM »
Public Sub Textbox1.onClick() or Public Sub Textbox1.onfocus() something like that. Yun yung pwede mong gamitin.

Kasi yung initialization mo ng textbox is Textbox1.text = "Text here". Sabay yung nasa loob ng Sub Textbox1.text = "" para mabubura sya kapag naclick yung textbox, or nafocus. pwede rin dun mo ilagay yung pag enable/disable ng buttons or other objects.

thanks sir... this would be better for my practice...

Offline Riff_6603

  • Philmusicus Moderatus
  • Prime Moderator
  • ******
Re: Visual Basic Thread *merged*
« Reply #16 on: October 21, 2012, 12:28:19 PM »
Guys, any ideas kung panong command para ma-recognize ang isang running program then i-minimize niya yun? hindi siya recognized as an application sa task manager, though recognized siya as .exe sa processes tab. worst case scenario ko is to use a batch file instead then idikit ko na lang sa VB command ko. :cry:
« Last Edit: October 21, 2012, 12:31:11 PM by Riff_6603 »

Offline ierofan

  • Philmusicus Addictus
  • *****
Re: Visual Basic Thread *merged*
« Reply #17 on: October 21, 2012, 03:37:55 PM »
Guys, any ideas kung panong command para ma-recognize ang isang running program then i-minimize niya yun? hindi siya recognized as an application sa task manager, though recognized siya as .exe sa processes tab. worst case scenario ko is to use a batch file instead then idikit ko na lang sa VB command ko. :cry:

Sir Riff, yung mapupunta ba sa system tray?
████████████████████████████████████████████████████████████████████████

[This signature has been blocked in accordance to RA No. 10175]

Offline Riff_6603

  • Philmusicus Moderatus
  • Prime Moderator
  • ******
Re: Visual Basic Thread *merged*
« Reply #18 on: October 22, 2012, 08:22:41 AM »
Sir Riff, yung mapupunta ba sa system tray?

Is there a better way? here's the whole scenario pala: may program ako na patatakbuhin na naka sendkeys yung command. problem with sendkeys, maliban sa program na pinapatakbo ko, tumatalon siya dun sa exe na yun unless naka-minimize siya. tendency, yung command intended only for the program, sa exe napupunta. yung exe na gusto ko i-minimize could only stay minimized for a maximum of 12 minutes tapos balik ulit. kung may command na pwede niya ma-recognize yung window ng exe tapos i-minimize niya, maigi yun. ako na bahalang maglagay nun sa loob ng existing command ko. unfortunately, ayaw gumana ng command na specific window lang dapat mag-run yung specified command, medyo bago pa kasi yung program kaya di pa ganun kaayos. :-(

by the way, via keystrokes na action ba yung naisip mo papuntang system tray? or pwedeng naka-false para hidden yung action? thanks!

Offline glennaui

  • Forum Fanatic
  • ****
Re: Visual Basic Thread *merged*
« Reply #19 on: October 22, 2012, 08:38:55 AM »
Im looking for a book(Hard Copied) that can help me build VB.net programming skills... any suggestions?

Offline robertshanepascual

  • Philmusicus Addictus
  • *****
Re: Visual Basic Thread *merged*
« Reply #20 on: October 25, 2012, 09:22:24 AM »
Im looking for a book(Hard Copied) that can help me build VB.net programming skills... any suggestions?

maraming ebooks available sa net tapos sa NBS at sa recto may nakita akong hardcopy.
just groove with it and everything will be allright...

Offline ierofan

  • Philmusicus Addictus
  • *****
Re: Visual Basic Thread *merged*
« Reply #21 on: October 25, 2012, 07:59:29 PM »
Is there a better way? here's the whole scenario pala: may program ako na patatakbuhin na naka sendkeys yung command. problem with sendkeys, maliban sa program na pinapatakbo ko, tumatalon siya dun sa exe na yun unless naka-minimize siya. tendency, yung command intended only for the program, sa exe napupunta. yung exe na gusto ko i-minimize could only stay minimized for a maximum of 12 minutes tapos balik ulit. kung may command na pwede niya ma-recognize yung window ng exe tapos i-minimize niya, maigi yun. ako na bahalang maglagay nun sa loob ng existing command ko. unfortunately, ayaw gumana ng command na specific window lang dapat mag-run yung specified command, medyo bago pa kasi yung program kaya di pa ganun kaayos. :-(

by the way, via keystrokes na action ba yung naisip mo papuntang system tray? or pwedeng naka-false para hidden yung action? thanks!

If you're familiar with the DoTA hotkeys, (cat hotkey, mineskeys) Yung mga ganun, ganun ba gusto mong achieve? Yung nakukuha yung mga napipindot na keys kahit na nakaminimize sya? May handout ako about sa paglagay sa system tray e, hanapin ko para sayo boss, malakas ka sakin e. hehe. Nakalimutan ko na kasi, tagal ko na di nagvvb e.
████████████████████████████████████████████████████████████████████████

[This signature has been blocked in accordance to RA No. 10175]

Offline Riff_6603

  • Philmusicus Moderatus
  • Prime Moderator
  • ******
Re: Visual Basic Thread *merged*
« Reply #22 on: October 28, 2012, 12:40:06 PM »
If you're familiar with the DoTA hotkeys, (cat hotkey, mineskeys) Yung mga ganun, ganun ba gusto mong achieve? Yung nakukuha yung mga napipindot na keys kahit na nakaminimize sya? May handout ako about sa paglagay sa system tray e, hanapin ko para sayo boss, malakas ka sakin e. hehe. Nakalimutan ko na kasi, tagal ko na di nagvvb e.

YES. on top of that, need ko din malaman kung paano command na mag-minimize ng external exe file. yung exe na ito hindi siya lumalabas sa applications tab ng task manager, lumalabas naman siya sa may processes tab though. sorry sa hassle kapatid! :lol:

Offline ierofan

  • Philmusicus Addictus
  • *****
Re: Visual Basic Thread *merged*
« Reply #23 on: October 29, 2012, 11:17:12 AM »
YES. on top of that, need ko din malaman kung paano command na mag-minimize ng external exe file. yung exe na ito hindi siya lumalabas sa applications tab ng task manager, lumalabas naman siya sa may processes tab though. sorry sa hassle kapatid! :lol:

Bossing, wala na. Di ko na makita. Tagal na panahon na kasi nun. May naitapon raw na mga papeles yung nanay ko na galing sa aparador ko e. Baka yun na yun. Sayang naman. Good luck nalang from me bossing.
████████████████████████████████████████████████████████████████████████

[This signature has been blocked in accordance to RA No. 10175]

Offline Riff_6603

  • Philmusicus Moderatus
  • Prime Moderator
  • ******
Re: Visual Basic Thread *merged*
« Reply #24 on: October 31, 2012, 02:01:19 AM »
Bossing, wala na. Di ko na makita. Tagal na panahon na kasi nun. May naitapon raw na mga papeles yung nanay ko na galing sa aparador ko e. Baka yun na yun. Sayang naman. Good luck nalang from me bossing.

oks lang bro! been talking to the indian dev guys at the office, apparently they still can't find a way to fix my problem. guess it's more complicated than I thought.. :-P