473,395 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

SuspendLayout & ResumeLayout - PLEASE HELP

Good evening all,

I am having a little (HUGE ACTUALLY) problem using the
SuspendLayout & ResumeLayout functions from a module.

DELEGATE PROBLEM

This is the code from the Module_Data:
Public Delegate Sub Delegate_Layout()
Public Delegate_Form_Layout() As Delegate_Layout = _
{ _
AddressOf Form_SuspendLayout, _
AddressOf Form_ResumeLayout _
}

This is the code from the Form_Main.vb:
Public Sub Form_SuspendLayout()
Me.SuspendLayout()
End Sub

Public Sub Form_ResumeLayout()
Me.ResumeLayout()
End Sub

This doesn't work as it can't find
Form_SuspendLayout/ResumeLayout unless they are on another
Module. Does this mean I am not referencing the
Form_Main.vb properley ?

ARRAY PROBLEM

This is the code from the Module_Data:
Public Update_Array(1) as control

Public Sub Load_001(ByVal Update_Negative as Control, _
ByVal Update_Positive as Control)

update_array(0) = Update_Negative
update_array(1) = Update_Positive

End Sub

This is the code from the Form_Main.vb:
Load_001(me.suspendlayout, _
me.resumelayout)

This doesn't work as it can't understand the load_001 part
as there seems to be a problem with calling it a Control
even though that is what Help tells me it is

RUN FROM MODULE

form_main.activeform.suspendlayout

But it returned the following error:

An unhandled exception of
type 'System.NullReferenceException' occurred in
Questionnaire - Employment Consultant.exe

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

RUN FROM FORM_MAIN.VB

me.suspendlayout

It works, but I can't do it from here due to a lot of
other coding

Any help you may be able to provide would be much
appreciated.

Yours sincerely,

Brent McIntyre
Jul 21 '05 #1
0 1564

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

Similar topics

1
by: DrTebi | last post by:
Hello, I have the following problem: I used to "encode" my email address within links, in order to avoid (most) email spiders. So I had a link like this: <a...
1
by: 2G | last post by:
Hi, I've a usercontrol that fills a listview with data from my db, I had this.SuspendLayout() in the beginning and this.ResumeLayout at the end of the function that loads the data and all worked...
6
by: Brent McIntyre | last post by:
Good afternoon all, I am having a little problem using the SuspendLayout & ResumeLayout functions from a module. This is the Delegate Declaration in the module: Public Delegate Sub...
0
by: Brent McIntyre | last post by:
Good evening all, I am having a little (HUGE ACTUALLY) problem using the SuspendLayout & ResumeLayout functions from a module. DELEGATE PROBLEM This is the code from the Module_Data:...
17
by: MeerkatInFrance | last post by:
There comes a time when you know you are not going to be able to work something out yourself, however hard you try. I have reached that moment. I have a master page and a slave page (or whatever...
12
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b)...
0
by: Gwl | last post by:
I have a DataGridView and following code: private void button1_Click(object sender, EventArgs e) { dataGridView1.ColumnCount = 365; } When I click on the button it is extremely slow (some...
1
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= | last post by:
Hi, I was just about to wrap some code for filling a DataViewGrid in grid.SuspendLayout(); //Grid filling code grid.ResumeLayout(); when I got worried t hat something might go wrong in the...
1
by: timor.super | last post by:
Hi all, I've read that if i have to add many item to my listview/treeview/... I can use SuspendLayout or BeginUpdate and after resume with ResumeLayout or EndUpdate But I don't understand...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...

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.