TALK @ PhilMusic.com - The Online Home of the Pinoy Musician
Tech Forums => ph.Cyberview => Topic started by: jigaman 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?? :?
-
what kind of problem bro? pls specify..
-
im having a hard time using a radiobutton for the scoring of my quiz project.
-
Radio button for scoring? Please tell us more.
-
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
-
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:
(http://i1221.photobucket.com/albums/dd466/robertshanepascual/sampleimage.jpg)
// 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
-
Search lang?
-
Wow. babantayan ko to... :)
-
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:
(http://i1221.photobucket.com/albums/dd466/robertshanepascual/update1.jpg)
* 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
-
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.
-
@ 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:
(http://i1221.photobucket.com/albums/dd466/robertshanepascual/searchasptype.jpg)
---
Editing/Updating Excel file in Asp nalang ang kulang :)
-
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
(http://i815.photobucket.com/albums/zz72/glennaui/1-2.jpg)
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...
(http://i815.photobucket.com/albums/zz72/glennaui/2.jpg)
Any tips would help... :wave:
-
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/
-
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... :)
-
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.
-
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...
-
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:
-
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?
-
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!
-
Im looking for a book(Hard Copied) that can help me build VB.net programming skills... any suggestions?
-
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.
-
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.
-
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:
-
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.
-
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
-
Ampft meron pala nitong thread! Baka puede magpatulong mga sirs kung merong malupit dito sa VBA.
-
Ampft meron pala nitong thread! Baka puede magpatulong mga sirs kung merong malupit dito sa VBA.
oras na para magtulungan tayo, wahahahaha! un din kasi ginagawa ko ngayon :idea:
-
oras na para magtulungan tayo, wahahahaha! un din kasi ginagawa ko ngayon :idea:
Sakto hehe! May ginagawa kasi ako ngaung template sa Excel with saving functionality sa separate sheet (next empty row). Problema ko, merong range sa source na kelangan din copy sa kabilang sheet. Eto ung code ko so far, di pa kasama ung range na dapat ma copy din:
Private Sub CommandButton3_Click() 'save to local database
If Range("B1:B7").Text = "" Then
MsgBox "No data to save.", vbInformation, "Call Log Form"
Else
Sheets("Database").Activate
Application.ScreenUpdating = False
Dim sh As Worksheet
Dim LR As Long
LR = Sheets("Database").Range("B" & Rows.Count).End(xlUp).Row + 1
If LR < 6 Then LR = 6
Sheets("BTO Template").Range("b1:b7").Copy
Sheets("Database").Range("B" & LR).PasteSpecial xlPasteValues, xlPasteSpecialOperationNone, False, True
Sheets("BTO Template").Range("A10").Copy
Sheets("Database").Range("I" & LR).PasteSpecial xlPasteValues, xlPasteSpecialOperationNone, False, True
Sheets("BTO Template").Range("A19").Copy
Sheets("Database").Range("J" & LR).PasteSpecial xlPasteValues, xlPasteSpecialOperationNone, False, True
Sheets("BTO Template").Range("B29").Copy
Sheets("Database").Range("K" & LR).PasteSpecial xlPasteValues, xlPasteSpecialOperationNone, False, True
Application.CutCopyMode = False
Application.ScreenUpdating = True
End If
End Sub
Any thoughts sirs?
-
Sakto hehe! May ginagawa kasi ako ngaung template sa Excel with saving functionality sa separate sheet (next empty row). Problema ko, merong range sa source na kelangan din copy sa kabilang sheet. Eto ung code ko so far, di pa kasama ung range na dapat ma copy din:
Private Sub CommandButton3_Click() 'save to local database
If Range("B1:B7").Text = "" Then
MsgBox "No data to save.", vbInformation, "Call Log Form"
Else
Sheets("Database").Activate
Application.ScreenUpdating = False
Dim sh As Worksheet
Dim LR As Long
LR = Sheets("Database").Range("B" & Rows.Count).End(xlUp).Row + 1
If LR < 6 Then LR = 6
Sheets("BTO Template").Range("b1:b7").Copy
Sheets("Database").Range("B" & LR).PasteSpecial xlPasteValues, xlPasteSpecialOperationNone, False, True
Sheets("BTO Template").Range("A10").Copy
Sheets("Database").Range("I" & LR).PasteSpecial xlPasteValues, xlPasteSpecialOperationNone, False, True
Sheets("BTO Template").Range("A19").Copy
Sheets("Database").Range("J" & LR).PasteSpecial xlPasteValues, xlPasteSpecialOperationNone, False, True
Sheets("BTO Template").Range("B29").Copy
Sheets("Database").Range("K" & LR).PasteSpecial xlPasteValues, xlPasteSpecialOperationNone, False, True
Application.CutCopyMode = False
Application.ScreenUpdating = True
End If
End Sub
Any thoughts sirs?
yung parang V Lookup ba sa excel yung gamit nito? yung mailalagay mo sa kabilang sheet yung ibang info sa kabilang sheet?
-
yung parang V Lookup ba sa excel yung gamit nito? yung mailalagay mo sa kabilang sheet yung ibang info sa kabilang sheet?
Yep. Naka save yan to the next empty row galing sa first sheet. ang problema ko, meron kasing range sa template na kelangan i-copy din sa kabila along with the "parent" details., ang nangyayari, nagsasave parin sa next empty row, dapat ma detect muna ng next save yung last row na sakop nung copied range bago sya mag append sa next empty row.
-
yung parang V Lookup ba sa excel yung gamit nito? yung mailalagay mo sa kabilang sheet yung ibang info sa kabilang sheet?
Hindi VLOOKUP, straight copy paste lang talaga.
-
guys, baka meron sa inyo marunong mag-integrate ng JS sa VB scripting. care to share some tips?
-
Guys, pa help na din.
I'm no comsci nor graduated any computer course. I'm just an enthusiast. Merong ginawa in .frm file format yung kaibigan ko. Nag design siya ng additional tool for MS word. Parang mas integrated "search/find" na tool. Here's my issue, when running the MS word 2007, alt + F11 ako. Then import files which are the .frm na ginawa ng kaibigan ko. Tapos pag na import na, mag re record na ng macro sa word. After recording, view the macro, then edit, dun sa edit, anong code yung dapat i-type para makapa run ko yung form ko? Nakalimutan ko kasi. :eek: Di ko na rin ma contact yung kaibigan ko. Is there something like "Run (file name).frm"