|
The tag property is just a place to put any piece of data you want. It's not used by anything in the .NET Framework. Think of it as a little box to put anything you want attached to that instance of the form.
There are other ways of doing it, like seeing if the ActiveMdiChild is of a specific form type:
Dim currentForm As Form
If TypeOf(currentForm) Is frmPad Then
Dim padForm As frmPad = DirectCast(currentForm, frmPad)
... do whatever you need to do to the form ...
End If
|
|
|
|
|
thanks for ur help
now its working fine
|
|
|
|
|
I am working on a project that try to extract image color features. I wonder if vb.net can use to perform the function. If that is possible, can anybody tell me how to do it with any sample code?
|
|
|
|
|
There are articles on here telling you how to do this. Christian Graus has done some very good articles (in C#) on how to access images pixel by pixel and apply filters etc. However this involves using pointers so is not really suitable for VB (take a look though as they are useful and show you the idea behind how you would go about doing what you want - the algorithms and methods at least). Check this thread:
http://www.codeproject.com/script/comments/forums.asp?msg=2216444&forumid=1649&mode=all&userid=2578352#xx2216444xx
There are picture box controls as well but they are not very flexible - check out msdn for info though as they may do what you need.
Take a two step approach here - look at how to access the picture at a low level and then look at what you want to do once you know how to do this.
Dan
|
|
|
|
|
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
|
|
|
|