|
Alex, I'd be suspicious of the SelectedIndexChanged event handler code since the CPU seems to peg after that event is fired.
Are you sure that the event handler does not create an infinite loop or sets (or resets) some variable that may cause repeated executions of the event? How is the combobox being populated? Is it manually or via some data control? Without inspecting your code it can be hard to provide any clear cut answer.
Have a look at Task Manager to see whether or not it is VB or some other process that is consuming the CPU. That may give you some clues.
...Steve
|
|
|
|
|
Thanks a lot for your interest in my problem. I found out that my application behaves in such a way only when I am running it in Debug-Mode. I built the release version of it and it works without messing with the CPU at all.
Once again, thank you very much for your help.
Alex.
|
|
|
|
|
I am new to .NET please help me out to start it
|
|
|
|
|
I don't think you could have asked a more generic question. You're going to have to specify what you want help with. Start what? The IDE (development environment)? Creating a project or application? What type of application, Windows Forms, Windows Service, Web Service, Class Library, or Web App? Or starting out learning VB.NET perhaps?
The quality of any answer to your question lies in the details of the question itself...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
First, install the IDE. Then, read the MSDN that came with it. Then buy a book/download some of the samples and play with them. If at any point you get stuck, ask specific questions here.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
johnalwaysweb wrote: I am new to .NET please help me out to start it
public void Main()
{
delete Microsoft.VisualBasic;
return 0;
}
Pumk1nh3ad illustrates that Intelligent Design oft goes awry. - Ed Gadziemski
|
|
|
|
|
I am using Printer.Print method to print some strings. The printer does not start printing until Printer.EndDoc method is not called. Why?
Another problem, I want to stop paper after printing some line until I order to move forward.
When I call Printer.EndDoc , printer starts printing and then eject all the remaining paper.
I want to use printer for billing on 3 inch paper strip with unspecified length.
Pleae solve my problem.
Thanks for you inclination to my problem.
Shoaib Nawaz
|
|
|
|
|
hellow ..
i have an updatedatagrid function how can i use it in other forum that dose not have the datagrid it self ?
|
|
|
|
|
I have a search page with 3 textboxes. I want to do a search on any text that may be in the text boxes. Let's say we have box1, box2, and box3. I want to do a search as follows:
If box1 <> "" Then
do this...
ElseIf box2 <>"" then
do this..
ElseIF box3 <> "" Then
Do this...
Else
do this ...
Does anyone know how to do this using CASE statement?
macca
|
|
|
|
|
Hi there,
Instead of using the two else statement in the if block i would rather use one as follows
If box1= "" and box2="" and box3="" then
SQL= no query or no search
else
' this indicates at least one box has the a text
'then SQl query can be as follows
SQl = "Select * from Table where ColumnA=box1.text or ColumnA=box2.text or columnA=box3.text
end if
I hope this helps
Mandar Patankar
Microsoft Certified professional
|
|
|
|
|
Hi All,
Point function of Form object returns color of the pixel at a
partcular location on the form.
I tried to use this function in a project of Graphics.
I found that the behaviour of the function was strange.
Sometimes, the function returned a color value upon clicking
a pixel on form.
Other times, it simply falied to return anything.
It just kept returning -1 eventhought the color of the pixel was red.
The same code worked on other PCs while on still others it failed.
Can anyone explain why Point function behaves like this ?
I need a quick reply.
Thank you.
Varun
|
|
|
|
|
Hi!
I wanna send a value to a field on a site, i m using AxWebBroeser Control in vb.net, i 've displayed the page in the control..how can i do this...plz help me
Thanks!
Sufyan
|
|
|
|
|
You need to obtain a reference to the control to which you want to send the value and then set it. The trick is to get the Name of the control to obtain the reference. For this you can inspect the source code for the target page.
This is some sample code that loads the Google web site in an AxWebBrowser control, sets the search value to "axwebbrowser" and auto-presses the Search button. I based this example on one I found on the web somehere a while ago.
Assuming the web browser control is named web1, navigate to the web site in your Sub Main() (or whatever).
web1.Navigate("http://www.google.com")
In web1's DocumentComplete event:
Private Sub web1_DocumentComplete(ByVal sender As Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent) Handles web1.DocumentComplete
' Get the web document
Dim myDoc As mshtml.HTMLDocument
myDoc = DirectCast(web1.Document, mshtml.HTMLDocument)
' Get the reference to the search text input box.
' The name of this control is "q" which I found from
' inspecting the page's source code.
Dim otxtSearchBox As mshtml.HTMLInputElement
otxtSearchBox = DirectCast(myDoc.all.item("q", 0), mshtml.HTMLInputElement)
' Set the search value to "axwebbrowser"
otxtSearchBox.value = "axwebbrowser"
' Get a reference to the search button and simulate
' pressing it by calling the control's Click() event.
Dim btnSearch As mshtml.HTMLInputElement
btnSearch = DirectCast(myDoc.all.item("btnG", 0), mshtml.HTMLInputElement)
btnSearch.click()
' The web control will now update and presnet the search results.
End Sub
...Steve
|
|
|
|
|
:-DHi Steve!
your tip was indeed very help ful for me thanks!!!
i 'll looking forward for any future help from u
thanks aloooot!!!
Sufyan_shani
|
|
|
|
|
Hi,
I have just completed making my user control for the VB.NET studio,which I have built as a DLL file. Now, when it comes to setting up the deployment project, I am unable to determine the appropriate location to install the DLL file so that another VB.NET programmer can easily access this file and make use of the control.
Thanks in advance!
|
|
|
|
|
Could someone helpe me,please.
I want to make two buttons in my form ,one search the DB by the patient_no and the other by the patient_name.
I did one button search by the patient_No and it worked, but the other didn't What should I do?
this is part from my code:
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click<br />
DataSet11.Clear()<br />
<br />
OleDbDataAdapter1.Fill(DataSet11, "PatientsTable")<br />
End Sub<br />
<br />
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click<br />
Dim delc As New OleDbCommand()<br />
Dim message As String<br />
Try<br />
delc.CommandText = " Delete from PatientsTable where Patient_No =" & TextBox1.Text<br />
delc.Connection = OleDbConnection1<br />
OleDbConnection1.Open()<br />
delc.ExecuteNonQuery()<br />
<br />
MsgBox("The deletion procees done successfully .")<br />
<br />
Catch<br />
message = "choose a record first"<br />
MsgBox(message)<br />
Finally<br />
OleDbConnection1.Close()<br />
clear()<br />
End Try<br />
End Sub<br />
<br />
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click<br />
Dim selcom As New OleDbCommand()<br />
Dim drobj As OleDbDataReader<br />
Dim message As String<br />
<br />
Try<br />
selcom.Connection = OleDbConnection1<br />
selcom.CommandText = "select* from PatientsTable where(Patient_No= " & TextBox1.Text & ")"<br />
OleDbConnection1.Open()<br />
drobj = selcom.ExecuteReader<br />
If drobj.Read Then<br />
TextBox1.Text = drobj.GetValue(0)<br />
TextBox2.Text = drobj.GetValue(1)<br />
TextBox3.Text = drobj.GetValue(2)<br />
TextBox4.Text = drobj.GetValue(3)<br />
TextBox5.Text = drobj.GetValue(4)<br />
TextBox6.Text = drobj.GetValue(5)<br />
TextBox7.Text = drobj.GetValue(6)<br />
<br />
Else<br />
MsgBox("The record not found .")<br />
End If<br />
<br />
drobj.Close()<br />
<br />
Catch<br />
message = "You must write just a patient number in it's field "<br />
MsgBox(message)<br />
Finally<br />
<br />
OleDbConnection1.Close()<br />
<br />
End Try<br />
<br />
End Sub<br />
<br />
<br />
Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click<br />
Close()<br />
End Sub
with thanks
deema
-- modified at 23:28 Thursday 10th November, 2005
|
|
|
|
|
On which line of the above code is an error being thrown, and what is the error?
...Steve
|
|
|
|
|
There is no any error in the above code ,but I want to make a button search by the patient_name in a DB when I wrote the following code I got an error:
Dim selcom As New OleDbCommand()<br />
Dim drobj As OleDbDataReader<br />
Dim message As String<br />
Try<br />
selcom.Connection = OleDbConnection1<br />
selcom.CommandText = "select* from PatientsTable where(Patient_Name= " & TextBox2.Text & ")"<br />
OleDbConnection1.Open()<br />
drobj = selcom.ExecuteReader<br />
<br />
If drobj.Read Then<br />
TextBox1.Text = drobj.GetValue(0)<br />
TextBox2.Text = drobj.GetString(1)<br />
TextBox3.Text = drobj.GetValue(2)<br />
TextBox4.Text = drobj.GetValue(3)<br />
TextBox5.Text = drobj.GetValue(4)<br />
TextBox6.Text = drobj.GetValue(5)<br />
TextBox7.Text = drobj.GetValue(6)<br />
<br />
Else<br />
MsgBox("The record not found")<br />
End If<br />
drobj.Close()<br />
Catch<br />
message = "You must write just a patient name in it's field "<br />
MsgBox(message)<br />
Finally<br />
<br />
OleDbConnection1.Close()<br />
End Try<br />
<br />
End Sub So what is the write code to make the search by name work?
deema.
-- modified at 23:29 Thursday 10th November, 2005
|
|
|
|
|
Deema Jack wrote: There is no any error in the above code ,but I want to make a button search by the patient_name in a DB when I wrote the following code I got an error:
Ok, so you DID get an error! What was it? Provide more information and thou shall receive quality help...
Anyway I can see one obvious coding problem with this line:
Deema Jack wrote: selcom.CommandText = "select* from PatientsTable where(Patient_Name= " & TextBox2.Text & ")"
It should read:
selcom.CommandText = "select * from PatientsTable where Patient_Name = '" & TextBox2.Text & "'"
Note the use of single quotes surrounding the TextBox2.Text value otherwise SQL Server will most likely throw out the query. All strings should be quoted in queries. Additionally there should be no parentheses where you have used them in the WHERE clause.
...Steve
-- modified at 23:02 Thursday 10th November, 2005
|
|
|
|
|
Thanks Steve,thank you very much. Do you know,I tried the statement which you wrote above before you tell me ,but I got an error,I think my error was in the quotes,but when I copyed yours it's done, Thank you again. I want to say that I'm a begginer student in Vb.net in an institute for computer ,there,they're just teaching us the basics of the vb.net language.
So, would you tell me about the try-catch-finally statements, what is the correct method in writing them, I don't know more about it,and could you tell me the name of a helping book in the structured exception handling.
with thanks,
deema
-- modified at 3:30 Friday 11th November, 2005
|
|
|
|
|
Deema, you are welcome. Glad I could help you.
The best first place to find more information on structured exception handling would be a Google search. Also try searching through The Code Project archives for articles on the subject. The VB.NET online help is also useful.
I could not provide a tutorial on the subject in this forum - it is not the place for it and I simply don't have the time to do so but I will answer any specific questions if you get stuck at any stage as will many other contributors.
...Steve
|
|
|
|
|
Thanks Steve ,I really appreciate your helpe,it's true that google is the huge source for this and any other information. Also,this forume butI'll need more time to search it,but it's o.k.
Thanks
deema
|
|
|
|
|
i want a function in the web service to return a xml file which contains multiple value i need, how to write this function ? using Array ???
I am Entry level person
|
|
|
|
|
I just made a BIG, STUPID mistake. I deleted all the .resx and .aspx.vb files on my machine through Dreamwaver Test Server view! It will kill me to re-write all the code .
I have recently re-built the project into .DLL file before deleting those files. Is there anybody know how to decompile .DLL file to get source code back????
I also find there is a tempporary folder "_vti_cnf" under my wwwroot/project folder. In this folder, there are .aspx.vb and .RESX files. However, .aspx.vb file only contains the information like :
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR| 17 Oct 2005 16:58:30 -0000
vti_extenderversion:SR| 4.0.2.8912
Could anybody help me out???
Thank you in advance!!!!!
|
|
|
|
|
Vicky,
Stupid question, but are the files in the recycle bin or do you do what I do and delete bypassing the r/c bin?
If you have not already done so, I suggest downloading a file undelete utility from the web - there are several out there, try FreeUndelete for a start but of course download it on another machine or to a different drive etc so you won't overwrite any deleted files.
Programs do exist to extract resources etc from DLLs but I cannot help in that regard. They certainly won't be able to recover your source code.
...Steve
|
|
|
|