473,804 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Browse Components

Hello
I finally found out why context menus don't show in
form.controls its a component!

I did a google search and someone sugested to use the
site property.

The followoing code :

Public Sub teste(ByVal f As Form)
Dim a As New System.Componen tModel.Componen t
MessageBox.Show
(f.Site.Contain er.Components.C ount.ToString)
For Each a In f.Site.Containe r.Components
MessageBox.Show (a.GetType.ToSt ring)
Next
End Sub

Produces the following exception:
An unhandled exception of
type 'System.NullRef erenceException ' occurred in SIGDIN
2003.exe

Additional information: Object reference not set to an
instance of an object.

The problem is that site = nothing...

What am i doing wrong? Any suggestion would be most
welcome, thanks

Kind Regards
Jorge

Nov 20 '05 #1
1 1038
Ok got it to work i used :

System.Reflecti on.FieldInfo()

Kind Regards
Jorge Cavalheiro
-----Original Message-----
Hello
I finally found out why context menus don't show in
form.control s its a component!

I did a google search and someone sugested to use the
site property.

The followoing code :

Public Sub teste(ByVal f As Form)
Dim a As New System.Componen tModel.Componen t
MessageBox.Show
(f.Site.Contai ner.Components. Count.ToString)
For Each a In f.Site.Containe r.Components
MessageBox.Show (a.GetType.ToSt ring)
Next
End Sub

Produces the following exception:
An unhandled exception of
type 'System.NullRef erenceException ' occurred in SIGDIN
2003.exe

Additional information: Object reference not set to an
instance of an object.

The problem is that site = nothing...

What am i doing wrong? Any suggestion would be most
welcome, thanks

Kind Regards
Jorge

.

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2293
by: Chris Lasher | last post by:
Hello, I'm trying to write a tool to scrape through some of the Ribosomal Database Project II's (http://rdp.cme.msu.edu/) pages, specifically, through the Hierarchy Browser. (http://rdp.cme.msu.edu/hierarchy/) The Hierarchy Browser is accessed first through a page with a form. There are four fields with several options to be chosen from (Strain, Source, Size, and Taxonomy) and then a submit button labeled "Browse". The HTML of the form is...
1
3232
by: ASP Spam Fighter | last post by:
Hello all, I don't know how to get around this one... If anybody can help me with this problem, I would appreciate it very much. I've been trying to send a (large) file to the browser via a download page that uses a file download component. The file downloads fine, except that Internet Explorer refuses to browse to a different page while the file is downloading! I don't understand why it does that and I don't know how to fix this...
5
1788
by: Eric Twietmeyer | last post by:
Hi, Does anyone know why starting with VS.NET 2002 (and same with 2003) it is no longer possible to browse to a directory that has "ept" as part of the path? It worked fine in Vc 6.x. My initials and user name happen to be "ept", and so I have directories with that name. It is no longer possible to browse to any subfolder and therefore open any file under an "ept" directory. I can browse to such a folder using explorer and then drag a...
0
1496
by: Chad Dollins | last post by:
This is technically my first full scale VS project, so I may be way off base. I would like to develop an application that can import, export, combine, and edit distribution list from outlook. One of the features of this app would be to take the profile folder names from (a) box(es) across the network and compile distribution list based on user that have logged in on them. This may seem hackish and there may be a better approach than...
3
11078
by: Highlander | last post by:
Hello all. Consider the following HTA: <HTML> <HEAD> <TITLE></TITLE></HEAD> <BODY> <SCRIPT LANGUAGE="VBScript"> Sub ButBrowse_onclick() '-- show browse window and Get file path:
6
1711
by: naima.mans | last post by:
Hello :) I'm newbie to XSLT and i need some advice please: Here the action: I have to browse an XML file with xslt : For each node i have to determinate if it is a node where i need to add an attribute... The question is:
1
1993
by: developing | last post by:
Hello, This time I want to filter the 'browse for file' API so that certain drives/folders cant be accessed. Not sure how to go about this...here is the module I am currently using to browse for a file then return the file link... any ideas/help are highly appreciated. Option Explicit Option Compare Database
8
1983
by: =?Utf-8?B?UGV0ZXJX?= | last post by:
I install Visual Studio 2005 Pro on Vista. I open and migrate a 2003 web project to 2005. I attempt to browse an aspx file from the Solution Exploer. It displays a blank html page. I create a master page with 3 content placeholders. I create a WebForm that uses the master and then browse it to have a look. I get an empty html page. I change from the IIS to the internal server. No change. Only displays blank page.
2
1418
by: =?Utf-8?B?SHVzYW0=?= | last post by:
Hi EveryBody: I remember in Vb.net 2003 I could go through any dll like SHvdoc.dll and see all its components but how I dont know ? or I forgot how was I did it ? Ho w can I go inside any dll or namespase in Vs 2005 and see all the components of that liberary ? Any help will be appreciated
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10604
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10356
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10361
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10103
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9179
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7644
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5676
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3839
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.