This would have been better if I could have just implemented an interface or
two to author my own toolstrip controls... but no, I have to inherit from
just the existing ones. Fine, I thought...
Public Class GenericToolStri pComboBox(Of ItemType As New)
Inherits System.Windows. Forms.ToolStrip ComboBox
Generic combo boxes are sooo convenient, I really wanted to have them in my
toolstrip, too. So the first one I add of a particular type, I get the
exception below.
Charmingly, if I'm not in debug mode, this message pops up in an infinite
loop and I have to kill the process with Task Manager.
I want this fixed.
Paul
System.AccessVi olationExceptio n was unhandled
Message="Attemp ted to read or write protected memory. This is often an
indication that other memory is corrupt."
Source="System. Windows.Forms"
StackTrace:
at System.Windows. Forms.UnsafeNat iveMethods.Call WindowProc(IntP tr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows. Forms.NativeWin dow.DefWndProc( Message& m)
at System.Windows. Forms.Control.D efWndProc(Messa ge& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ComboBox. WndProc(Message & m)
at
System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage&
m)
at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows. Forms.UnsafeNat iveMethods.Send Message(HandleR ef
hWnd, Int32 msg, Int32 wParam, String lParam)
at System.Windows. Forms.Control.S endMessage(Int3 2 msg, Int32 wparam,
String lparam)
at System.Windows. Forms.ComboBox. NativeAdd(Objec t item)
at System.Windows. Forms.ComboBox. OnHandleCreated (EventArgs e)
at System.Windows. Forms.Control.W mCreate(Message & m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ComboBox. WndProc(Message & m)
at
System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage&
m)
at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows. Forms.UnsafeNat iveMethods.IntC reateWindowEx(I nt32
dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32
x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef
hMenu, HandleRef hInst, Object pvParam)
at System.Windows. Forms.UnsafeNat iveMethods.Crea teWindowEx(Int3 2
dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32
x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef
hMenu, HandleRef hInst, Object pvParam)
at System.Windows. Forms.NativeWin dow.CreateHandl e(CreateParams cp)
at System.Windows. Forms.Control.C reateHandle()
at System.Windows. Forms.ComboBox. CreateHandle()
at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible)
at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible)
at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible)
at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible)
at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible)
at System.Windows. Forms.Control.C reateControl()
at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.Form.WmSh owWindow(Messag e& m)
at System.Windows. Forms.Form.WndP roc(Message& m)
at
System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage&
m)
at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows. Forms.SafeNativ eMethods.ShowWi ndow(HandleRef hWnd,
Int32 nCmdShow)
at System.Windows. Forms.Control.S etVisibleCore(B oolean value)
at System.Windows. Forms.Form.SetV isibleCore(Bool ean value)
at System.Windows. Forms.Control.s et_Visible(Bool ean value)
at
System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo pInner(Int32
reason, ApplicationCont ext context)
at
System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo p(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.Form.Show Dialog(IWin32Wi ndow owner)
at System.Windows. Forms.Form.Show Dialog()
at RateSheet.Main. ShowMainForm() in C:\Documents and
Settings\Develo per\My Documents\Visua l Studio
2005\Projects\R ateSheet\RateSh eet\Main.vb:lin e 15
at RateSheet.Main. main() in C:\Documents and Settings\Develo per\My
Documents\Visua l Studio 2005\Projects\R ateSheet\RateSh eet\Main.vb:lin e 5
at System.AppDomai n.nExecuteAssem bly(Assembly assembly, String[]
args)
at System.AppDomai n.ExecuteAssemb ly(String assemblyFile, Evidence
assemblySecurit y, String[] args)
at Microsoft.Visua lStudio.Hosting Process.HostPro c.RunUsersAssem bly()
at System.Threadin g.ThreadHelper. ThreadStart_Con text(Object state)
at System.Threadin g.ExecutionCont ext.Run(Executi onContext
executionContex t, ContextCallback callback, Object state)
at System.Threadin g.ThreadHelper. ThreadStart() 1 2495
OK my bad, sort of. I had support transparent colors set to true, and
apparently the combo box in general (whether in a toolstrip or not) just
won't have any of that. It's not exactly news that the base combo class is
buggy... so never mind. *gumble*
Paul
"PJ6" <no***@nowhere. net> wrote in message
news:Of******** ******@TK2MSFTN GP05.phx.gbl... This would have been better if I could have just implemented an interface or two to author my own toolstrip controls... but no, I have to inherit from just the existing ones. Fine, I thought...
Public Class GenericToolStri pComboBox(Of ItemType As New) Inherits System.Windows. Forms.ToolStrip ComboBox
Generic combo boxes are sooo convenient, I really wanted to have them in my toolstrip, too. So the first one I add of a particular type, I get the exception below.
Charmingly, if I'm not in debug mode, this message pops up in an infinite loop and I have to kill the process with Task Manager.
I want this fixed.
Paul
System.AccessVi olationExceptio n was unhandled Message="Attemp ted to read or write protected memory. This is often an indication that other memory is corrupt." Source="System. Windows.Forms" StackTrace: at System.Windows. Forms.UnsafeNat iveMethods.Call WindowProc(IntP tr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows. Forms.NativeWin dow.DefWndProc( Message& m) at System.Windows. Forms.Control.D efWndProc(Messa ge& m) at System.Windows. Forms.Control.W ndProc(Message& m) at System.Windows. Forms.ComboBox. WndProc(Message & m) at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m) at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m) at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows. Forms.UnsafeNat iveMethods.Send Message(HandleR ef hWnd, Int32 msg, Int32 wParam, String lParam) at System.Windows. Forms.Control.S endMessage(Int3 2 msg, Int32 wparam, String lparam) at System.Windows. Forms.ComboBox. NativeAdd(Objec t item) at System.Windows. Forms.ComboBox. OnHandleCreated (EventArgs e) at System.Windows. Forms.Control.W mCreate(Message & m) at System.Windows. Forms.Control.W ndProc(Message& m) at System.Windows. Forms.ComboBox. WndProc(Message & m) at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m) at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m) at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows. Forms.UnsafeNat iveMethods.IntC reateWindowEx(I nt32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam) at System.Windows. Forms.UnsafeNat iveMethods.Crea teWindowEx(Int3 2 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam) at System.Windows. Forms.NativeWin dow.CreateHandl e(CreateParams cp) at System.Windows. Forms.Control.C reateHandle() at System.Windows. Forms.ComboBox. CreateHandle() at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible) at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible) at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible) at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible) at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible) at System.Windows. Forms.Control.C reateControl() at System.Windows. Forms.Control.W mShowWindow(Mes sage& m) at System.Windows. Forms.Control.W ndProc(Message& m) at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m) at System.Windows. Forms.Container Control.WndProc (Message& m) at System.Windows. Forms.Form.WmSh owWindow(Messag e& m) at System.Windows. Forms.Form.WndP roc(Message& m) at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m) at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m) at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows. Forms.SafeNativ eMethods.ShowWi ndow(HandleRef hWnd, Int32 nCmdShow) at System.Windows. Forms.Control.S etVisibleCore(B oolean value) at System.Windows. Forms.Form.SetV isibleCore(Bool ean value) at System.Windows. Forms.Control.s et_Visible(Bool ean value) at System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo pInner(Int32 reason, ApplicationCont ext context) at System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo p(Int32 reason, ApplicationCont ext context) at System.Windows. Forms.Form.Show Dialog(IWin32Wi ndow owner) at System.Windows. Forms.Form.Show Dialog() at RateSheet.Main. ShowMainForm() in C:\Documents and Settings\Develo per\My Documents\Visua l Studio 2005\Projects\R ateSheet\RateSh eet\Main.vb:lin e 15 at RateSheet.Main. main() in C:\Documents and Settings\Develo per\My Documents\Visua l Studio 2005\Projects\R ateSheet\RateSh eet\Main.vb:lin e 5 at System.AppDomai n.nExecuteAssem bly(Assembly assembly, String[] args) at System.AppDomai n.ExecuteAssemb ly(String assemblyFile, Evidence assemblySecurit y, String[] args) at Microsoft.Visua lStudio.Hosting Process.HostPro c.RunUsersAssem bly() at System.Threadin g.ThreadHelper. ThreadStart_Con text(Object state) at System.Threadin g.ExecutionCont ext.Run(Executi onContext executionContex t, ContextCallback callback, Object state) at System.Threadin g.ThreadHelper. ThreadStart()
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Fredrik Melin |
last post by:
2005 RTM:
Have a form, quite a few control, (full form of stuff, tab pages, buttons,
labels, text-controls etc)
Selecting controls, going in and out between code/design view is a little
bit sluggy, but still doable
Add a Toolstrip, add a few buttons to that toolstrip
|
by: gene kelley |
last post by:
I'm migrating/rewriting one of my VB6 apps to VB2005.
In the process, I'm trying to avoid using third party activex controls
used in the VB6 project.
One of the third party controls in the VB6 app was for menu/toolbars.
This control had an option to render the toolbar in an Office 2003
style which is nothing more than a top to bottom gradient.
When a new ToolStrip is added to a form, the default appearance of the
Toolstrip is that of...
|
by: mark.norgate |
last post by:
I've run into a few problems trying to use generics for user controls
(classes derived from UserControl). I'm using the Web Application model
rather than the Web Site model.
The first problem I'm having is that the partial class signature in my
projectDetails.ascx.cs file looks like this:
public partial class ProjectDetailsControl<TEntryServiceProvider:
UserControl, INamingContainer where TEntryServiceProvider :
IEntryServiceProvider...
|
by: Jon Davis |
last post by:
I'm taking the items from a menustrip of a control and moving them to the
parent form's menustrip:
private void TakeMenus(AdminControl ac)
{
foreach (Control c in ac.Controls)
{
if (c is MenuStrip)
{
MenuStrip ms = (MenuStrip)c;
|
by: Franky |
last post by:
I saw the following on the Internet and wonder if you have any inside
info about future improvements to the ToolStrip family that can be shared ?
Is it possible to have the same items in two different MenuStrip
controls, for example the main menu and a context menu?
With the entire ToolStrip family of controls we do not have an
integrated commanding architecture nor do we support cloning of items to
| |
by: chandu |
last post by:
Hello ,
I am developing an application which it contains one MenuStrip and
ToolStrip.
now i have to replace these controls with some other controls.
is dotnet providing any alternate controls to this .
I am dynamically adding the toolstripitems to the toolstrip,
|
by: Martijn Mulder |
last post by:
The ToolStrip on top of my form is to small. I want to increase its
height. Simply setting the Height-property doesn't change the height,
though. So I tried to place the ToolStrip in a ToolStripPanel, that does
react to changes in its Height-property, and by setting the
Dock-property of the contained ToolStrip to DockStyle.Fill, I expected
the ToolStrip to fill the entire ToolStripPanel. Nope. See the code
below, it is ready to run.
|
by: Tom P. |
last post by:
It's kind of hard to explain (so if you need more just ask) and any
help would be greatly appreciated.
I am writing a side-by-side file manager. On each side I have a
DropDownButton that holds either the root name or the Favorite name
for the current path. I also have a DropDownComboBox that has the
current full path as well as a series of paths that lead back to the
root (i.e. "C;\Program Files\Microsoft Office", "C:\Program Files", "C:...
|
by: daveL |
last post by:
Hi
I have a Toolstrip on a Window with 5 buttons
i want to send this to a application static fucnction
to enable / disable the buttons based on User rights
When i send Window.controls to the method
buttons dont exists in the Controls Collection
When i work with the Toolstrip i can't see any controls
|
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...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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,...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |