|
Of course, this all depends on what you mean by "extract image ... feature"??
|
|
|
|
|
Thanks 1st of all, what i mean by 'extract image color feature' is to extract the color information of the specific pixel. For example, the pixel of (20,30) of an 800x600 images which contain RGB value = 123 192 134. Once i specify the pixel, then the corresponding value will be given.
|
|
|
|
|
Have you tried the Bitmap objects GetPixel method??
|
|
|
|
|
I'm making datagrid reports in .aspx pages and I was wondering if there was a way to find out how many pages will print before sending them to the printer?
Any help would be appreciated.
|
|
|
|
|
I'm assuming the document will be printed on the web browser side, so no, there isn't any way for your server-side code to know how many pages the client will use to print.
|
|
|
|
|
That sucks.....
Thanks for your reply though
|
|
|
|
|
How is the server going to know which printers are installed?? What paper size is selected?? What the margins are?? Any other Page Setup settings??
It can't! ASP.NET is a server-side only technology that (greatly simplified!) generates HTML/Javascript for client-side use and rendering only. The server code does not, nor should it ever, care about what the client is doing with, or how the client is rendering, the data sent down the pipe.
|
|
|
|
|
I am new to this but, I was thinking there would be a way in the VB code to find out.
|
|
|
|
|
Then I'd recommend studying how an HTTP server works. The server cannot initiate a connection to, nor can it interrogate, the client-side browser. Doing so would open up a huge range of security issues.
HTTP is simple. The client connects to the web server, makes a request for a page, the web server generates and returns that page, connection closed. Rinse and Repeat... There is no room in there for the client to tell the server anything the server wants to know about the client.
All that VB.NET code executes on the web server only. None of it executes on the browser side. Unless, of course, you start getting into SilverLight[^]. Even then, the code cannot find out anything about the machine the browser is running on...
|
|
|
|
|
Ok that makes sense,
Thanks for the replies
|
|
|
|
|
Hi Guys,
I have a combobox on a form. As soon as I click on the combobox I am unable to get out of it. The combobox shows me all the data it should, but I am unable to exit the control once selected. I can select any value, and do it any number of times however any attempt to close the form, click on another control in the form, etc fails. The only way out is to stop the debugger. No errors are issued.
I've spent an entire day tryin to find the problem and can't. I'd appreciate any ideas please.
The datasource is a very simple dataset (dsCorrespondenceMethods) containing a single table (CorrespondenceMethods). This table contains only 2 columns - an ID column and a description column. The table just contains a list of methods of corresponding such as "Email", "Fax", "Post", etc. I've put it into a table just to make any future changes simple and not require recoding of the app.
Thanks in advance
Mark
|
|
|
|
|
Are you doing any validation anywhere on the form??
I can't replicate the problem, nor can I find any occurances of it.
|
|
|
|
|
Thanks for responding Dave.
No validation yet. I've put together this form and not being experienced it has taken me days so I'm trying not to start again.
The source is a simple DS/table. It saves back to another DS for the client.
IF I remove the "Selected Value" from the combobox (so it has nowhere to save back to) the problem still occurs. This means the only thing on the combo box is the bound items to display the list.
In an attempt to replicate the behaviour and see if it was the dataset, I created a new form and put a combobox and a textbox onto the form. All worked nicely......so I am still lost...
|
|
|
|
|
Since you've been tinkering with this for so long, it sounds like there might be a screw up in the designer generated code. I'd recommend removing that ComboBox and re-adding a new one, setting it's properties to what you need, and see what happens.
|
|
|
|
|
Good to see we are thinking on the same lines. I already tried it after I responded last, and it resolved the problem with one of the combo boxes but not the second one I am having problems with....but at least it is a start.
Many thanks for your help.
MArk
|
|
|
|
|
Hello Friends ,
I am creating mail system in window based application .we are using
richtextbox for writing msgbody and also inserting image in
msgbody .Text is sending but image is not sending plz help
me. Sending button code metion here .
Dim mailmsg As New MailMessage
mailmsg.To = Me.TextBox1.Text
mailmsg.Cc = Me.TextBox2.Text
mailmsg.Subject = Me.TextBox3.Text
mailmsg.From = "Test"
mailmsg.Body = Me.RichTextBox1.Text
Mail.SmtpMail.Send(mailmsg)
Manu
-- modified at 7:38 Tuesday 18th September, 2007
|
|
|
|
|
I haven't tried using this technique, but a little searching of the articles here on CP revealed this little article[^].
|
|
|
|
|
Hi all
I need some thing like this
Open a word file read it, delete all the tables in it, save it.
1)So a browse button to select a word file.
2)a button called delete( code to delete all table inside the word file)
3) save it.
Prakash Mishra(Banglore,India)
|
|
|
|
|
Good Morning everybody, I am awfully new to posting on the code project website, so please go gently with me.
I am trying to figure out how to add sub sub menues to a menu programatically. I have the menu set up as follows
File.......Options......Play
=================================
Open.......Prefs.......Play DVD
Exit
Now after the program runs, I wish to add a Sub Menu to PLAY DVD, how could i accomplish this?
hope everyone reading this understands what i am trying to accheive
|
|
|
|
|
you can give a name to the toolstripmenuitem (play dvd) (for further reference I'll name it DVD;P)
then you can simply add one like this
Dim mnuunderdvd As New ToolStripMenuItem("underDVD")
AddHandler mnuunderdvd.Click, AddressOf mnuunderdvd_Click
DVD.DropDownItems.add(mnuunderdvd)
in mnuunderdvd_click you put the code that needs to run when the user clicks it
hope this helps
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Thank you that's great, how do i implement the Handler to handle the click event of the newley created item.
Sorry for such ignorance, but I am quite nwe to VB.Net
|
|
|
|
|
the handler is a normal methode wich would look like this:
Private Sub mnuunderdvd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
TDDragon wrote: the handler is a normal methode wich would look like this:
Private Sub mnuunderdvd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Thank you. Another query if I may.
I suppose there is no way around adding Handlers programatically as this is what i will be requiring.
My Form1.Load event call a sub routine as follows
Load_Menus()
then my sub routine is as follows
Public sub Load_Menus()<br />
<br />
For Each drive As DriveInfo In My.Computer.FileSystem.Drives<br />
<br />
If drive.DriveType = DriveType.CDRom Then<br />
<br />
Dim PlayDvd As New ToolStripMenuItem<br />
PlayDvd.Text = drive.Name<br />
Me.dvdMenuItem.DropDownItems.Add(PlayDvd)<br />
<br />
else<br />
End If<br />
<br />
next<br />
end sub
so i want to loop through all available CD-Drives on the system and if it finds one then add it to the menu under DVD.
But if it was to find several cd drives, how would i add a handler for each one found
|
|
|
|
|
just add the addhandler inside the for loop
and then in the mnuunderdvd_click methode you'll need to check wich one is clicked
the sender object contains the clicked toolstripitem so if you do
dim mnu as toolstripmenuitem = sender
you can compare the text property of mnu or if you can add something (like the drive path/letter) to the tag property of the toolstripitem inside you for loop (in the load) and then compare this tag or use this tag to access the drive inside the mnuunderdvd_click methode
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Could I get around this by putting this in a single handler for all
Dim Drive_To_Read_DVD_From as string = sender.tostring
'' result being for example drive_to_read_DVD_From equaling D:\
then take it form there
|
|
|
|