|
Thats right. it shoud spill out zeros. thats what chr(0) means. remember that the ascII set exist of 256 chars 0-255
some examples:
32=space
64=@
65=A
97=a
all code below 32 are normely not visible and used for printer modems ...
Jan
|
|
|
|
|
We have different classes in System.Xml namespace in VB.net like XmlWriter and XmlReader... with the help of them we can retrieve different information from xml document.
Is there any way to manipulate controls like textboxes, checkboxes ,radio and submitting buttons? like sending some data to a textbox or getting data which is linked with Submit buttons etc?
|
|
|
|
|
Your question is kind of basic sounding, can you give a specific example of what you are trying to do?
|
|
|
|
|
a website shows result of some entry test conducted but you can access it only by the userID, (a number). It has just a textbox and a submit button. you enter the userID and submit it and the data is displayed to you ! like
ID NAME Marks obtained Percentage
in that format!
Now i want the entire result! I know that students were from id number 1 to 10,000! so in a loop i enter the id and retrieve the info linked with that id that is a student's result and I SAVE IT somewhere in a file like ms excel file or a word file.
Its not something illegal cuz i can sit and start entering IDs and writing down the result and so on but that ll be too dumb! i need all the result by an auto way(though it ll still take a bit time, hours maybe ) .
If any other legal way you ppl know than tell me...
|
|
|
|
|
Firstly, i don't care if its illegal or not. But you do sound guilty =)
Really though, you will need to use the WebRequest and WebResponse classes to programatically make requests and recieve responses to/from the site. Each response will need to be parsed so you get only the data you care about (no HTML tags, etc), and then you can save the result. There are a bunch of ways to do this, and a few dozen primers on using WebRequest, etc.
Be Careful not to make it too efficient. If you loop 10K times in a few minutes you are doing the same as a Denial of Service attack and will either get in REAL trouble, or your IP blacklisted from the site. Wait a few seconds (10-15) between each request to simulate a human use and let it run over night.
|
|
|
|
|
thanks!
and i don't feel guilty:P actually someone else said like its illegal at some other post so i veta clear it at the beginning
|
|
|
|
|
Hi,
I'm trying to recognize when the user clicks the + or - on a TreeNode in a WinForms TreeVeiw control. I want to update the icon depending on whether the parent node clicked is open or closed.
I've googled extensively, and can't seem to find this. I've subclassed the TreeView, and can intercept messages, but don't know how to proceed from here. I THINK I want to do something like:
If msg = WM_Notify Then
'figure out if it was the collapsed or opened message.. wparam?
'do what I want to do.
End If
Any ideas?
Also, where can I obtain a COMPLETE list of windows messages? I can't seem to find that either.
Thanks...
|
|
|
|
|
Look into the before/after collapse and before/after expand events.
|
|
|
|
|
That was dumb... I was looking all over for an API way to do this, and didn't notice the TreeView had Before- and After- Collapse & Expand events...
Thanks...
|
|
|
|
|
|
hi,
i've created a form with two checkboxes
at the time of retrieving the data from the database
firstly i cleared the binding
Me.chkIsError.DataBindings.Clear()
Me.chkIsBlock.DataBindings.Clear()
then i add the controls with new data
Me.chkIsBlock.DataBindings.Add("checked", dataseted.Tables("ClientaddMaster"), "IsBlock")
Me.chkIsError.DataBindings.Add("checked", dataseted.Tables("ClientaddMaster"), "IsError")
during this process the error message comes as:-
Object cannot be cast from DBNull to other types
i need to allow null for the checkboxes in the database due to which this error arises ...
is there any way to resolve this error...
|
|
|
|
|
NULL is not a valid value for the checkbox. Assuming your pulling data in from a select, wrap the columns with an isnull to the correct value.
|
|
|
|
|
Sorry For Butting in,
But how will you do that? i mean i dunno how to code that
|
|
|
|
|
Hello,
I have an access database and have a simple query in which i have 1 parameter.
I want to run this query in vb.net and display the results in a datagrid or anything but in vb.net.
I'm able to run the query but wht should i do to display the results of the query.
the code i m using now is:
Dim accApp As Object
accApp = GetObject("c:\mydb.mdb")
'this will run the query in the database
accApp.docmd.OpenQuery("myQuery")
accApp.Run("myQuery")
|
|
|
|
|
There are dozens of tutorials on this subject. I would recommend learning the "right" (there are others) way and looking through this article first. It will guide you in best practice for securely and efficiently connecting to databases.
http://www.codeproject.com/KB/database/ParameterizingAdHocSQL.aspx[^]
Once you have a DataSet or DataTable, you can just set it as the datasource for the grid and bind it.
myWebGrid.DataSource = myDataSet
myWebGrid.DataBind()
|
|
|
|
|
hi,
i am using two check boxes on my form (chkError & chkBlock) .. i want user will be able to check only one check box at a time not both... how can i do this.. please help..!
|
|
|
|
|
in checkbox_checkedchanged-event: when one checkbox is checked, uncheck all other checkboxes.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
If only one can be checked at a time, why not use option buttons?
modified on Tuesday, August 19, 2008 9:43 AM
|
|
|
|
|
Radio buttons are the way to go. The visual indicator of a radio button is a clue to the user that only one of the possible choices can be selected at a time.
Check boxes are used to show that one or more options are valid.
Think of pizza: (checkboxes)
Cheese
Mushroom
Onions
Sardines
Or Gender: (radio button)
Male
Female
|
|
|
|
|
Radio buttons are the way to go when there are a number of choices of which exactly one will be selected. Sometimes checkboxes can be a good choice, however, in cases where zero items is a possibility, or especially in cases where there are many attributes of which only a few are mutually exclusive. For example, a word processor may use checkboxes for bold, italic, underline, allcaps, and smallcaps, superscript, and subscript, even though allcaps and smallcaps are mutually exclusive, as are superscript and subscript. Such an approach would be far more intuitive and logical than having three checkboxes (bold, italic, and underline), and two sets of three radio buttons (allcaps/smallcaps/neither, and superscript/subscript/neither).
|
|
|
|
|
I have been developing some custom controls and want to be able to have them as functional as the controls that come with visual studios. Ive been working with the ControlDesigner class and i believe that is in relation to what i need for this as well but i can not find any examples.
I want to have it so that when a user is typing a function of the control that it provides custom information to the user in the form of the context-sensitive help that pops up. IE i want to provide the user with example usage.
I would be grateful if some one could point me in the right direction to do this.
|
|
|
|
|
To get some of the design-time integration like what I believe you are requesting, you can take a look at one of my articles: Targeting Design-Time Events of User Controls[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Hi, i am somewhat of a new programmer to visual basic... progamming knowledge at a bit of a sad low level. part of the program i am building requires the following:
my so called client leases out spaces on pieces of land for whatever purpose, in a sort of perfect grid. firstly, the layout of how the land will be divided is loaded as a template to the system, details stored on database... total plot dimensions, and vertical and horizontal spaces is stored. the program generates a little grid display of what it might look like, thats simple enough. when the user requires a piece of land to be formatted according to his needs, the template is selected from database, new entry is created in a table dealing with active plots. for each sector of land, a serial number gets generated, each sector state set to "vacant".
the problem on my part (due to my pathetic coding skills) comes in with coding the actual bookings part of the system. when the user selects the appropriate plot of land to perform bookings on, an interactive display of the plot needs be generated out of information in the database table. occupied sectors and vacant sectors in different colours, and the user needs to be able to highlight various (multiple) vacant sectors to book for his client. when "book" is clicked, the status field in the land plot table needs to be changed from "vacant" to "occupied".
i have a very very vague idea on how this is to be done, but at the moment, am completely stuck. not a clue as to how to generate the plot of land on screen with the different colours from the information in the database table, and beyond that, how to make it "interactive" with mouse events annnnd how to program it to return the values of which sections were selected i'd really appreciate any suggestions.
modified on Monday, August 18, 2008 8:22 PM
|
|
|
|
|
brajoez wrote: somewhat of a new programmer to visual basic
brajoez wrote: my so called client
brajoez wrote: due to my pathetic coding skills
Why do you have a client if your skill level is so poor ?
You basically need to handle the paint event, draw your land, track your mouse movement and actions and store changes back to the DB. I suspect you know that already, but if you do, I'd suggest making a start and asking specific questions as you get stuck. I'd be inclined to create a class that represents one object in the DB, and write it so that it responds to mouse events and knows how to draw itself, then call the draw code for your collection of objects in onpaint, and find the object your mouse is over in mouse events to pass it the event.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Christian Graus wrote: Why do you have a client if your skill level is so poor ?
Possibly because his strong marketing skills.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[Image resize DLL]
|
|
|
|