|
Hello all,
Could somebody please tell me can a window application written in VB.NET interact with a NET service, and how to do that ?
Thank you very much in advance.
Spidervn
|
|
|
|
|
If you are talking about a Windows service, then use the ServiceController[^] class. If you are talking about a webservice, then just Google and read a page like this one[^].
|
|
|
|
|
I manually set my drop down items (ex. MyDropDown.Items.Add("something")) since our database is not yet complete data and to avoid typographical errors.
Basically i just want to know how can i set the selected value of my DropDownList based from my database query.
to explain further my problem ill give a scenario: my dropdown items defined as "a", "b", "c". then the result of my query is "c" ... how can i set "c" as my 'SelectedValue'?
thanks in advance!
|
|
|
|
|
hi
Look at this Article , but instead use a Combobox
http://www.codeproject.com/KB/vb/N-Tier_Application_VB.aspx[^]
its Simple
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
You can select the needed value from the database.If DropDownList1 be the dropdownlist which contain the values a,b,c,d.You can make the selected item of the dropdownlist as that value.If you used a DataReader to retrive the data from database
DropDownList1.SelectedItem =dr(0).ToString()
where dr is my DataReader
Hope This Code Help You
|
|
|
|
|
If the DropDown's style is set to something other than DropDownList then you can just do DropDown.SelectedText = "c" . (Setting DropDown.SelectedText when the DropDownStyle is set to DropDownList won't have any effect.)
Or, perhaps you might want to save the SelectedIndex instead of the Text? That way you can just set the SelectedIndex when you retrieve the value from the database.
|
|
|
|
|
i need to ask about using the streaming technique in delivering the video , which means;
split the video into parts , transmit these parts in succession (using UDP packets) and enable the receiver to decode and playback the video as these parts are received without having to wait for the entire video to be delivered (on pocket pc side: capturing video - encoding - storing - sending ) so the streaming in sending only :
1- partition the compressed video into UDP packets.
2-start delivery of these packets.
3-begin decoding and playback at the receiver while is still being delivered.
i've problem in displying the video as soon as the first packet is recieved ???????????
|
|
|
|
|
hi guys can any body help me getting the
crack or free telerik winforms controls kit .
thanks in advance
hello
|
|
|
|
|
You must be kidding. This site is dedicated to the fine folks who make a living developing software. They get paid for it. Using cracked or illegal software is stealing; if the company doesn't get paid, how are they supposed to pay their staff ?
This is not the site for you if you think someone is going to support your efforts of stealing code.
You'll be lucky if they don't ban you from using this site.
|
|
|
|
|
|
Set the WindowState of your form to minimized. You can do so either in the designer, or otherwise in the load event of the form.
My advice is free, and you may get what you paid for.
|
|
|
|
|
hi,
im using VS2008 and working on windows form application..
here is the problem that im don know how to solve it..
its about my textbox..
How can my text that im typing can be to it left position, i mean the text must be start at position 1 in x-axis..
when im typing text, it make space between textbox border and the text..
im using Arial font.. is this because of the font or something? and how can i change the height of my text in the textbox so it can touch the top border of textbox..
plz... any help..
|
|
|
|
|
Hey guys!
I am following this tutorial (http://www.vbdotnetheaven.com/UploadFile/scottlysle/VBQuickMap03182007085423AM/VBQuickMap.aspx ) to put googlemaps in my WinForms Application. It runs well except that the browser control in it brings in the whole googlemaps website. Is there anyway i could show only the map in the browser control ?
I tried creating my own google maps using google maps API in a .jsp page and used the url (http:\\localhost:8080..) in the tutorial (above). I can see the map but the search form isnt working on the new url. I used www.wikimapia.com too, but the search form isnt working with this url either.
My form needs to be able to search longitude/latitude and address in the google maps through a search form in the application.
I am new to vb.net. I dug out a lot of articles from the internet regarding this but dont understand half of them and even if i did, i had trouble implementing them.
This is my school project (due in 4 days )
I have tried creating the world map using shape files. They weren't accurate and proper shapefiles werent available for all the countries and cities in the world. Right now i am trying to use the browser control to bring in the google maps.
Any sort of suggestions, ideas and guidance are most welcome. Thank You!
-Venus
|
|
|
|
|
DictionaryFile - the file name of a text file containing four letter words
StartWord - a four letter word (that you can assume is found in the DictionaryFile file)
EndWord - a four letter word (that you can assume is found in the DictionaryFile file)
ResultFile - the file name of a text file that will contain the result
The result is the shortest list of four letter words, starting with StartWord, and ending with EndWord, with a number of intermediate words that are to be found in the DictionaryFile file where each word differs from the previous word by precisely one letter.
For example, if StartWord = Spin, EndWord = Spot and DictionaryFile file contains
Spin
Spit
Spat
Spot
Span
then ResultFile should contain
Spin
Spit
Spot
Two examples of incorrect results:
Spin, Span, Spat, Spot (invalid as it takes 3 changes rather than 2)
Spin, Spon, Spot (invalid as spon is not a word)
Any instruction and help will be really helpful
Thanks in dvance
Sarfarj Ahmed
|
|
|
|
|
What is this? Your homework programming assignment?
|
|
|
|
|
Ah, to be back in school again...
|
|
|
|
|
Just a hint to point you in the right direction: think sql.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Iteration and recursion are your new friends?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I have write a program for sending SMS from my PC. But there is a small problem that is the message did not save in the inbox of the mobile phone. Pl help in this regard. The complete code is
Imports System.IO.Ports
Public Class Form1
Dim WithEvents serialport As New IO.Ports.SerialPort
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For i As Integer = 0 To My.Computer.Ports.SerialPortNames.Count - 1
ComboBox1.Items.Add(My.Computer.Ports.SerialPortNames(i))
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If serialport.IsOpen Then
serialport.Close()
End If
Try
With serialport
.PortName = ComboBox1.Text
.BaudRate = 96000
.Parity = Parity.None
.DataBits = 8
.StopBits = StopBits.One
.Handshake = Handshake.RequestToSend
.DtrEnable = True
.RtsEnable = True
.NewLine = vbCrLf
End With
serialport.Open()
Catch ex As Exception
End Try
serialport.WriteLine("AT+CMGF=1" & vbCr)
System.Threading.Thread.Sleep(200)
serialport.WriteLine("AT+CMGS=" & Chr(34) & "destination" & Chr(34) & vbCr)
System.Threading.Thread.Sleep(200)
serialport.WriteLine("test message" & vbCrLf & Chr(26))
System.Threading.Thread.Sleep(200)
End Sub
End Class
|
|
|
|
|
Please use a more meaningful subject line.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Wow your Code has nothing to do with ado.net, Paul told you to use a Correct Subect and secondy you are posting in a Wrong Forum. you should post this here
http://www.codeproject.com/script/Forums/View.aspx?fid=13695[^]
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I am new to vb.net and I am designing a custom control and I want to have one of the properties of that control have a dropdown list where the data in this list comes from a database and is not hard coded using a Public enum statement..
I know that you can create a dropdown list using a Public enum statement where the list is based on the the data typed in the enum statement as seen in my project below. What I can not figure out is how to create a dropdown list of values that would be loaded dynamically from a query from a database, or from an array
Is there a way to to fill a enum statement dynamically based of data from a query of a database? Or is there another method for filling a drop down list of a control property? Please show me the code in VB and not C#
Public Class UserControl1
Private myDirection As compas_dir
Public Enum compas_dir
North = 0
South = 1
East = 2
West = 3
End Enum
Public enumType As Type
Public returnValue As String
Public Property CurrentDirection() As compas_dir
Get
Return myDirection
End Get
Set(ByVal value As compas_dir)
myDirection = value
Label1.Text = [Enum].GetName(GetType(compas_dir), value)
End Set
End Property
End Class
|
|
|
|
|
I need to import excel records into access database using vb.net 2003.i’m successful in retrieving records from excel to datagrid.
The datagrid may have 1000 records with 10 columns.I need to iterate through each row of datagrid to find whether this record is
already exist in access database 2003.i have given 3 field combination as primary key in database.if record already exists in
Database it should ignore that row and check for next record of datagrid.and if tht record not found in database then it should able to insert that new record to access database.i need ur valuable suggestion regarding how to proceed
Or any sample codes wil help me a lot.
Please give me the solution as early as possible...
Thanking you in advance.
Regards
Chandru
|
|
|
|
|
You asked essentially the same question a month ago.
This isn't really a VB.NET question; it is more of a SQL question.
But, here is some help anyone.
Rather than checking to see if the record exists before inserting it, allow the insert to check if the record exists.
And, use a stored procedure instead of writing the SQL statments in the code.
Given these helps, you should be able to accomplish the task.
Tim
|
|
|
|
|
you said you have primary key table in the database.
So don't loop through each table rows with your records because it would take a lot of time
to loop through and execute the insert statement.
Better fire all the insert statements and catch the error message for primary key voilation and that's all. Your all the records that are not in the database will be saved and the other duplicate records will throw the exception saying it can't have duplicate primary key values.
enjoy
You can go to http://www.rprateek.blogspot.com[^] to get some more code for visual basic.
Interested in development projects
|
|
|
|