Error runing MTS (develop with vb.net) in Windows98
Hi, I'm vb.net developer in thailand.
please help me solve my error.
I have an error to runing MTS (develop with vb.net) in Windows98.
Can I slolved my problem?
please reply any question to my email address (teon_dan@hotmail.com).
Thank you very much for any help. Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73755
'The object is currently in use elsewhere' exception
Hi,
I get the following an exception:
Message: The object is currently in use elsewhere.
Source: System.Drawing
Location: at System.Drawing.Graphics.FromImage(Image image)
in the following code:
private void engine_ClearScreen(
F2KScriptColor backColor)
{
lock (this)
{
using (Graphics g1 = Graphics.FromImage(mImage1), g2 = Graphics.FromImage(mImage2))
{
g1.FillRectangle(mEngine.GetBrush(backColor), 0, 0, this.ClientRectangle.Width, this.ClientRectangle.Height);
g2.FillRectangle(mEngine.GetBrush(backColor), 0, 0, this.ClientRectangle.Width, this.ClientRectangle.Height);
}
}
}
This code is called multiple times on the same thread (main GUI-thread).
Does anyone know what the problem is?
thanks, Koert Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73754
Toolbar buttons are not functioning
I have developed a system in VB.Net, which consists of a main menu. And, there is a toolbar consists of few buttons on my main menu.
Initially, the toolbar buttons are working probably. After sometimes, the toolbar buttons are not functioning when click on it.
Please help me, thanks. Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73753
drawing on the child control
I am creating a form designer, I want to be able to draw a temporary
selction rect in the window, over all the child control.
I have a HWND of the window, I get a HDC.
I call PatBlt() to do my XOR drawing.
However the drawing only paint the empty are of the form, it doesn't alter
child control.
How could I paint over them ?
--
Lloyd Dupont, Software Architect
Get Your Data Mobile
http://www.ihookdb.com Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73752
Visual Studio .NET Returns Error When loading CSharpAddWinFormWiz.vsz
When I try to add a new form using the solution explorer this is
returned "Could not run the
'C:\Program(...)\VC#\CSharpProjectItems\LocalProjectItems\..\CSharpAddWinFormWiz.vsz'"
, the file does not exist. I do not recall having touched nothing in the
configuration that could cause this.
Do I have to reinstall Visual Studio .NET ?
Has my hard drive malfunctioned ?
Thank You for any help.
Sorry for wasting time, but if this is the hard drive... Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73750
Display specific category in PropertyGrid
Hi All,
I would like to display ONLY a specific category in the PropertyGrid. Is this possible?
If not, then, is there a way to suppress base class properties being displayed in the PropertyGrid? The base class in my case is a NODE object from FORMS namespace and I do not want its properties being displayed in my PropertyGrid. Therefore, I cannot change the "Browsable" attribute of properties in the Node class.
Thanks in advance! Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73748
How to make AxWebControl.Navigate work!
When attempting to invoke "Navigate" on an AxWebControl that I
programmatically created, I was getting an
InvalidActiveXStateException exception. After searching around for a
solution to the problem, I couldn't find one that worked reliably. I
found a solution, deduced from the fact that the control seems to work
fine when created by the designer, yet doesn't when created
programmatically. I started with a working scenario in the designer
and eliminated code until I found the solution below. I thought that
I should post this solution, though I have no insight as to why it
works.
FWebBrowser = new AxSHDocVw.AxWebBrowser();
FWebBrowser.BeginInit(); // Seems to be critical the have the
begin...end init
FWebBrowser.Parent = <container>;
FWebBrowser.EndInit();
object LTemp = null;
FWebBrowser.Navigate(FURL, ref LTemp, ref LTemp, ref LTemp, ref
LTemp); Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73746
displaying data in list box
Hi
I have a form that has a list box bound to a Data view.
When I add a record to the data table in run time, it is displayed in the
list box as System.Data.DatarowView. When the app is saved and reloaded,
the data appears properly. Any ideas on how to work around?
Code Snippet to add the row to the data table
<Snip>
DataSetInfo.DetailsRow dr = this.dataSetInfo.Details.NewDetailsRow();
... code to fill the fields
this.dataSetInfo.Details.AddDetailsRow(dr);
</Snip>
Derrick Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73742
Viewin HTML in Winform application
I am looking for a way to view HTML in Winform application. Does anyone know if there is something like a browser control that I could use to render the HTML?
Thanks,
Serge. Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73737
MDI Form inter children sizing issue, by design ?
Hi! Here's my application: I have an MDI parent in which I open a child with WindowState = FormWindowState.Maximized. The child form hosts the WebBrowser control. When a user clicks on a link in the browser, I open up another child form like this:
PopUpForm newPopForm = new PopUpForm();
newPopForm.MdiParent = this.MdiParent;
e.ppDisp = newPopForm.webMain.Application;
newPopForm.WindowState = FormWindowState.Normal;
newPopForm.Visible = true;
newPopForm.Focus();
As you can see, the WindowState on the new popup form is Normal.
It works fine. However, the 1st child is no longer Maximized. It's WindowState
becomes Normal as well.
Question: Is it by design or I am doing something wrong? What can I do to keep the WindowState of the 1st child fixed from being changed by opening a new form? I mean the user can resize the 1st child, so I want 1st child to remain the same. I tried to save the WindowState and adjust it after I popup the new form. However, once I placed focus to the popup form, the 1st child lost its state.
Please help me solve the mystery.
Many Thanks in Advance, Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73735
ListView, last item?
Hi, i have un listview in a winform, multiselect = true. I would like to know which is the last item to select when it several item selected there.
Best regards.
Sylvain Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73733
BeginInvoke calls EventHandler with different parameters than supplied
Question,
When using BeginInvoke (on a From to marshal to the UI thread) with the
EventHandler delegate I see some strange behaviour. The problem is that I
call the UpdateTextBox method with a class derived from EventArgs ( i.e.
MyEventArgs) and when the BeginInvoke is called and the UpdateTextBox
methode is call on the UI thread the parameter e (EventArgs) does not
contain the derived MyEventArgs object but a EventArgs object.
The strange thing is that if I create a delegate with the same signature as
the EventHandler ( MyEventHandler) everything works as expected. (See
comments in the code below)
Can anyone explane this to me?
Sandor
(Methods below are implemented on a From derived class)
private void button1_Click(object sender, System.EventArgs e)
{
Thread t = new Thread(new ThreadStart(OnThreadStart));
t.Start();
}
private void OnThreadStart()
{
UpdateTextBox(null, new MyEventArgs(DateTime.Now.ToLongTimeString()));
}
private void UpdateTextBox(object sender, EventArgs e)
{
if(InvokeRequired)
{
// When using MyEventHandler everything works as expected.
//MyEventHandler h = new MyEventHandler(UpdateTextBox);
EventHandler h = new EventHandler(UpdateTextBox);
BeginInvoke(h, new object[] {sender, e});
}
else
{
// This cast will fail !!!!!!!!!!!!!!!!!!!!!!
MyEventArgs args = (MyEventArgs)e;
textBox1.Text = string.Format("Current time: {0}", args.CurrentTime);
}
}
public class MyEventArgs : EventArgs
{
public readonly string CurrentTime;
public MyEventArgs(string currentTime)
{
CurrentTime = currentTime;
}
}
delegate void MyEventHandler(object sender, EventArgs e); Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73732
Delegates & Events
I need some clarrification.
I have a class called ChatManager that will manage the interaction between
the ClientUI (WinForm) and the chat server.
The ChatManager will have a number of public events.
When the ClientUI is instantiated it will subscribe to these events
providing its own methods to be used as event handlers.
In the ChatManager code when I raise a particular event...which in turn
calls the delegate...
Will the delegate execute on the same thread as the ClientUI (which it must
do to update the WinForm) or does it execute on some other thread?
Kyle! Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73725
Anyone knows how to change the height of a ComboBox ?
Hi all,
I have modified a .NET (C#) ComboBox to display images along with text so I
need to set the combo box height to values larger than default in order to
show an image bigger than 16 pixel high.
Changing the control height property is irrelevant. The only way I found to
increase the height of the combo is to change the font size but that doesn't
help me much because I need regular font size to display the items.
Is there any other way to set the height??
Thanks,
\T Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73716
Shortcut for Refresh, F5 or symbolic code?
Hello!
I would like to introduce a keyboard shortcut for refreshing the user
interface in many programs. In english locales it's often F5 which is used,
but how about other locales and/or preferences. Should I simply bind the
refresh feature to F5 or is there a symbolic Shortcut for refreshment?
Comment: I think there must be symbolic key, because my IBM ThinkPad A31p
has a refresh button which refreshes in Internet Explorer, but it does not
work in my own program when I bind to F5, but F5 works perfectly of course.
Any recommendations?
Best regards,
Henrik Dahl Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73705
Datagrid: Binding to custom collection
Hi,
I´m binding an array of my own class to a datagrid.
The problem I have is that I don´t know where I have to code the order of
the columns (the public properties of my class). Datagrid sort them in a
"weird" algorithm cause it does´t sort alphabetically or by ocurrence on the
class.
How can I tell the datagrid how to sort this columns (properties). Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73703
Visual inheritance and .NET IDE
Hi
I create a abstract base class("MyBaseForm") which extends
System.Windows.Forms.Form class. I add buttons,.... . I then extend another
class("MyDerivedForm") from "MyBaseForm". This compiles fine, runs fine but
as soon as I double click - MyDerivedForm - to view the form in the IDE
designer - the IDE designer gives me an error.
Is the a bug? I saw a similar post earlier with no suitable explanation.
This is basically what we are trying to do. Create a base class with
something like this:
namespace MyFormClassLibrary
{
public abstract class MyBaseForm : System.Windows.Forms.Form
{
public MyBaseForm ()
{
}
}
}
Then create another Form and change the superclass from
"System.Windows.Forms.Form " to the "MyPage" class created above:
namespace MyFormClassLibrary
{
public class MyDerivedForm : MyBaseForm
{
public MyDerivedForm()
{
}
}
}
Is there a fix for the IDE? Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73701
So many fonts ...
I have noticed that the Windows Forms Designer generates code that
creates a new System.Drawing.Font object every time the Font property of
a control is set to any value other than the default. Isn't this a
terrible waste of system resources? Or are those mere flyweight objects,
and the framework prevents needless resource duplication behind the
scenes anyway?
--
Gerhard Menzl
Humans may reply by replacing the obviously faked part of my e-mail
address with "kapsch". Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73698
playing flash swf files using .NET C#
greetings
it is possible to use and display flash SWF files on .NET WinForms
applications?
If so, how?
TIA
Almeida Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73695
Abuse of GDI+ resources
Recently some friends were looking at some code written by an outside
contractor. In the code, there was a great deal of use of pens and brushes
without disposing of them.
What surprised me is that the system never seemed to run out. The brushes
and pens were being created in every paint event. I suppose it's possible
that the garbage collector was getting around to them often enough to
finalize the pens and brushes, but I doubt it was happening often enough to
keep up with the use.
I've always thought of pens and brushes as very limited system resources. Is
that no longer the case with Gdi+?
Also, in a similar vein, we were discussing the use of a static pen object
to optimize drawing in a control.
Is this considered acceptable? I mean, the pen (and I presume its underlying
GDI+ handle) are going to be held for the lifetime of the app if it's
static.
Can someone help modernize my understanding of GDI?
Pete Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73689
Inheritance
Hi everyone!
Is there a way to inherit the
System.ComponentModel.Design.CollectionEditor.CollectionForm form?
So, something like:
public class MyCollectionEditorForm :
System.ComponentModel.Design.CollectionEditor.CollectionForm
{
}
TIA,
Vlado Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73685
Menu and FormBorderStyle = None
Hi
I have a problem with menu and FormBorderStyle = None:
I opened new C# project and set the property FormBorderStyle = None ,
And added main menu. When I run the application and on the last pixel
of the menu, i have got a line drawn. This line divide the menu and
the rest of the form. How can I make the line disappear?
Thanks Rafi Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73683
Application Signed with strongname cannot use an assembly which is not signed?
Hello,
I came across with a problem...
I had developed a component which it's assembly does not have a keyfile for
strong name...
One of my customers tries to use it in an application where he attaches a
keyfile for strong naming it and when compiling it he gets "Does Not have a
strong file Name" error pointing my component's dll...
Does anybody has a solution for this? Do I have to generate a strongname for
my component?
Thanks in adnvance,
Özden Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73682
Datagrid non navigable
Quick question (I hope!)
I've been seaarching around, but havent found a way to make a datagrid non-navigable. The databinding value, is set to a dataset and a table which has relations, however I do not want the "+" buttons to the left of the rows to be displayed?
Thanks in advance.
k Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73679
Anchor Property Ignored On Custom Composite Controls
I have a composite custom control (VB.NET) which is constructed of several other controls, such as command buttons, a listview etc. I have several controls which border the boundary of the container and have their anchor properties set accordingly, for example, ensuring a button stays on the right border when the control is resized. Now in the control's design view everything works correctly, controls are correctly repositioned. However, when I put the composite custom control on a form, the anchor properties are completely ignored, for example, in the form's design view when you resize the control, the child controls with the anchor property set don't move, and even in runtime the control has not correctly resized.
Now obviously I could manually control things in the resize event, but this defeats the point of the anchor property, which works for single controls, so why not for a custom control. Has anyone else experienced this and found a solution or at least knows why it happens?
Thanks In Advance,
James Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73678
ParkingWindow revisited
This issue was already reported by several others but I did not find any useful solution / workaround.
The problem happens in a random non-frequent manner when I run my WindowsForms application. I get the following exception:
Cannot access a disposed object named "ParkingWindow"
In another post in this NG titled "Derived combo box controls in forms - MessageBox.Show breaks the control's message routing" Clive Dixon describes a potential reason for the problem. However, no practical workaround is suggested.
Could someone from MS suggest how to avoid this issue?
Thanks in advance,
--
Benzi
(my application is multi-threaded, uses Invokes and is run with .Net 1.1) Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73677
Issue with Data bound Text box validation
I have a C# Windows forms application which uses XSD file created in memory dataset. On one of the forms I have bunch of text boxes to enter values for various columns of a table and they all are data bound. For one of text boxes value entered must be unique and I want to check this uniqueness as soon as user leaves corresponding text box after entering any value.
I have tried following two methods and none seems to be working
1. If I try to attach a UniqueConstraint on corresponding column then it will not get fired until acceptchanges is not called and thus I cannot validate value as soon as user leaves field.
2. If I try to get a DataView with a rowfilter based upon value entered by user then it does not looks into rows which have â??modifiedâ?? or â??addedâ?? row state. I have tried to use all possible combination of DataViewRowState enumeration values but nothing seems to be able to force returned DataView to include modified or added status rows. Thus I get duplicate values in table
So I have two questions â??
1. Is it possible to enforce UniqueConstraint before AcceptChanges is called on Row / Table (may be in column changing event itself)?
2. What can cause an DataView to skip â??modifiedâ?? or â??addedâ?? row state rows even if DataViewRowState. CurrentRows has been specified for RowViewState of DataView?
My apologies for possibly a vague explanation of my problem and thanks in advance for any thoughts. Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73676
Issue with Data bound Text box validation (Sorry for some control charectors in last similar post)
I have a C# Windows forms application which uses XSD file created in memory dataset. On one of the forms I have bunch of text boxes to enter values for various columns of a table and they all are data bound. For one of text boxes value entered must be unique and I want to check this uniqueness as soon as user leaves corresponding text box after entering any value.
I have tried following two methods and none seems to be working
1. If I try to attach a UniqueConstraint on corresponding column then it will not get fired until acceptchanges is not called and thus I cannot validate value as soon as user leaves field.
2. If I try to get a DataView with a rowfilter based upon value entered by user then it does not looks into rows which have â??modifiedâ?? or â??addedâ?? row state. I have tried to use all possible combination of DataViewRowState enumeration values but nothing seems to be able to force returned DataView to include modified or added status rows. Thus I get duplicate values in table
So I have two questions â??
1. Is it possible to enforce UniqueConstraint before AcceptChanges is called on Row / Table (may be in column changing event itself)?
2. What can cause an DataView to skip â??modifiedâ?? or â??addedâ?? row state rows even if DataViewRowState. CurrentRows has been specified for RowViewState of DataView?
My apologies for possibly a vague explanation of my problem and thanks in advance for any thoughts.
KT
---
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73675
ParkingWindow revisited
This issue was already reported by many others. However, I did not find any useful solution / workaroud for this.
The problem is that when you run a WindowsForms application, you may randomly get the following exception:
Cannot access a disposed object named "ParkingWindow"
In this NG there is some detailed description regarding this problem by Clive Dixon (titled "Derived combo box controls in forms - MessageBox.Show breaks the control's message routing") but no practical workaround is suggested.
Could someone in MS suggest how to avoid this issue?
Thanks in advance,
--
Benzi
(my application is multi-threaded, uses invokes, runs with framework 1.1) Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73674
Issue with Data bound Text box validation
I have a C# Windows forms application which uses XSD file created in memory dataset. On one of the forms I have bunch of text boxes to enter values for various columns of a table and they all are data bound. For one of text boxes value entered must be unique and I want to check this uniqueness as soon as user leaves corresponding text box after entering any value.
I have tried following two methods and none seems to be working
1. If I try to attach a UniqueConstraint on corresponding column then it will not get fired until acceptchanges is not called and thus I cannot validate value as soon as user leaves field.
2. If I try to get a DataView with a rowfilter based upon value entered by user then it does not looks into rows which have â??modifiedâ?? or â??addedâ?? row state. I have tried to use all possible combination of DataViewRowState enumeration values but nothing seems to be able to force returned DataView to include modified or added status rows. Thus I get duplicate values in table
So I have two questions â??
1. Is it possible to enforce UniqueConstraint before AcceptChanges is called on Row / Table (may be in column changing event itself)?
2. What can cause an DataView to skip â??modifiedâ?? or â??addedâ?? row state rows even if DataViewRowState. CurrentRows has been specified for RowViewState of DataView?
My apologies for possibly a vague explanation of my problem and thanks in advance for any thoughts.
KT
---
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73673
Smart client template solution ???
HI!
I am currently at the beginning of a new project and I would like to start
with something out of the box. As we started our Web project we used IBuySpy
Portal
and it worked fine because we did not waste our time on authentification,
authorisation and all that but we were able to start right wit the logic
of the application. Is there something like that for SmartClient? I mean
template
solution containing the newest application blocks of Microsoft?
Any comments or help will be highly appreciated.
gicio Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73671
Change Cell Style
Hi!
I want to change the cell style of a datagrid.
I only want to change the cell (5,5) and set the forecolor RED.
How can I do??
Thx. Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73669
Custom TabContrl and TabStrip Problem
Hi,
I have a prolem please see if u can suggest something.
I am developing a TabControl derived from Control.
It consists of other control called TabStrip which is also derived frm control.
My TabControl can be aligned vertically or horizontally. When it is horizontal i am docking TabStrip at the Top of the TabControl. When the alignment is changed am docking it at the Right so that it becomes Vertical.
When am setting the Alignment of the TabControl to Vertical, the tabstrip is docked to the right inside the TabControl so that the tabs are shown vertically.
Now when i am using my TabControl it is working fine in designer mode, when am toggleing between horizontal and vertical. But when i run the application the tabStrip's ( even though it is docked at the Right) location becomes (0,0) and it is show to the Left. Don't know why it's location becomes (0,0) whe i run the applicatiion.??? And whern i click on the Tab then it goes to the Right. However, when in Design mode it shows very well to the Right.
--Nilesh Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73667
Custom TabControl using TabStrip and Dock probelm
I am developing a TabControl derived from Control.
It consists of other control called TabStrip which is also derived frm control.
My TabControl can be aligned vertically or horizontally. When it is horizontal i am docking TabStrip at the Top of the TabControl. When the alignment is changed am docking it at the Right so that it becomes Vertical.
When am setting the Alignment of the TabControl to Vertical, the tabstrip is docked to the right inside the TabControl so that the tabs are shown vertically.
Now when i am using my TabControl it is working fine in designer mode, when am toggleing between horizontal and vertical. But when i run the application the tabStrip's ( even though it is docked at the Right) location becomes (0,0) and it is show to the Left. Don't know why it's location becomes (0,0) whe i run the applicatiion.??? And whern i click on the Tab then it goes to the Right. However, when in Design mode it shows very well to the Right.
Any one can please help me suggest what's going wrong here??
--Nilesh Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73666
Cuatom TabControl using TabStrip and Docking Problem
I am developing a TabControl derived from Control.
It consists of other control called TabStrip which is also derived frm control.
My TabControl can be aligned vertically or horizontally. When it is horizontal i am docking TabStrip at the Top of the TabControl. When the alignment is changed am docking it at the Right so that it becomes Vertical.
When am setting the Alignment of the TabControl to Vertical, the tabstrip is docked to the right inside the TabControl so that the tabs are shown vertically.
Now when i am using my TabControl it is working fine in designer mode, when am toggleing between horizontal and vertical. But when i run the application the tabStrip's ( even though it is docked at the Right) location becomes (0,0) and it is show to the Left. Don't know why it's location becomes (0,0) whe i run the applicatiion.??? And whern i click on the Tab then it goes to the Right. However, when in Design mode it shows very well to the Right.
Any one can please help me suggest what's going wrong here??
--Nilesh Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73665
TabStrip TabControl and Docking Problem...
I am developing a TabControl derived from Control.
It consists of other control called TabStrip which is also derived frm control.
My TabControl can be aligned vertically or horizontally. When it is horizontal i am docking TabStrip at the Top of the TabControl. When the alignment is changed am docking it at the Right so that it becomes Vertical.
When am setting the Alignment of the TabControl to Vertical, the tabstrip is docked to the right inside the TabControl so that the tabs are shown vertically.
Now when i am using my TabControl it is working fine in designer mode, when am toggleing between horizontal and vertical. But when i run the application the tabStrip's ( even though it is docked at the Right) location becomes (0,0) and it is show to the Left. Don't know why it's location becomes (0,0) whe i run the applicatiion.??? And whern i click on the Tab then it goes to the Right. However, when in Design mode it shows very well to the Right.
Any one can please help me suggest what's going wrong here??
--Nilesh Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73664
Docking and Custom TabControl Problem...
I am developing a TabControl derived from Control.
It consists of other control called TabStrip which is also derived frm control.
My TabControl can be aligned vertically or horizontally. When it is horizontal i am docking TabStrip at the Top of the TabControl. When the alignment is changed am docking it at the Right so that it becomes Vertical.
When am setting the Alignment of the TabControl to Vertical, the tabstrip is docked to the right inside the TabControl so that the tabs are shown vertically.
Now when i am using my TabControl it is working fine in designer mode, when am toggleing between horizontal and vertical. But when i run the application the tabStrip's ( even though it is docked at the Right) location becomes (0,0) and it is show to the Left. Don't know why it's location becomes (0,0) whe i run the applicatiion.??? And whern i click on the Tab then it goes to the Right. However, when in Design mode it shows very well to the Right.
Any one can please help me suggest what's going wrong here??
--Nilesh Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73663
NullReferenceException in UnsafeNativeMethods.CreateWindowEx
Hi all,
I have the following situation. I create AppDomains on demand to host
winform based controls from C++ host. I'm using .NET 1.1.
I tried to do AppDomain.Unload from background thread to free up the main
GUI thread and make it more responsive.
When I try this, I get the exception, listed below, always on the 3rd
AppDomain and control creation.
I tried getting SystemEvents through reflection and calling Shutdown
manually. This delays the problem. It almost doesn't happen, but still
re-appears
sometimes.
This doesn't reproduce in .NET 2.0 alpha.
Is there any way I can work around this bug/limitation?
I also would like to know what is being null inside the
UnsafeNativeMethods.CreateWindowEx or under what conditions.
Maybe I can work around the problem.
Thank you in advance for any help on this
Exception trace:
------------------
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. ---> System.TypeInitializationException: The
type initializer for "System.Drawing.SafeNativeMethods" threw an
exception. ---> System.NullReferenceException: Object reference not set to
an instance of an object.
at Microsoft.Win32.UnsafeNativeMethods.CreateWindowEx(Int32 exStyle,
String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y,
Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef
hInst, Object pvParam)
at Microsoft.Win32.SystemEvents.CreateBroadcastWindow()
at Microsoft.Win32.SystemEvents.Initialize()
at Microsoft.Win32.SystemEvents.EnsureSystemEvents(Boolean requireHandle,
Boolean throwOnRefusal)
at Microsoft.Win32.SystemEvents.AddEventHandler(Int32 key, Delegate
value)
at Microsoft.Win32.SystemEvents.add_EventsThreadShutdown(EventHandler
value)
at System.Drawing.SafeNativeMethods.Initialize()
at System.Drawing.SafeNativeMethods..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.get_ThreadData()
at System.Drawing.SystemBrushes.FromSystemColor(Color c)
at System.Drawing.SystemBrushes.get_Window()
at
System.Windows.Forms.DataGridTableStyle.get_DefaultAlternatingBackBrush()
at System.Windows.Forms.DataGridTableStyle..ctor(Boolean
isDefaultTableStyle)
at System.Windows.Forms.DataGrid..ctor()
at DotNetControls.MainControl.InitializeComponent()
at DotNetControls.MainControl..ctor()
--- End of inner exception stack trace ---
Server stack trace:
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder
binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes)
at System.Activator.CreateInstance(String assemblyName, String typeName,
Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args,
CultureInfo culture, Object[] activationAttributes, Evidence securityInfo,
StackCrawlMark& stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String
typeName)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(Met
hodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessa
ge msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String
typeName)
at Adapter.CreateApp() in ... Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73660
Button swallows keys. Bug? Workaround?
The Setup:
================
I have a cardswiper attached to my keyboard, so that when I swipe a
card I get "keyboard input" that looks something like:
%748a45a1246fbac9d8fdeaf3572f221b?
I would like forms in my application to handle these card swipes. To
this end, I've made a base Form that sets KeypPeview=true, and that
overrides the ProcessDialogKey method.
The Bug:
==========
This setup works well, except in a few circumestances. One common
circumstance is if I have buttons with shortcuts (e.g. a button whose
Text attribute is "&add member". Here "a" is a shortcut.
I have noticed that if any button on the form has the focus, then "a"
is consumed by the button and does not make it to ProcessDialogKey. If
something else (like a listbox) has the focus, then I do receive the
key in ProcessDialogKey.
Does anyone have a solution, an idea, or a workaround?
Thanks in advance!
Felix Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73659
Proxy servers and embedded windows control in IE
Hi there,
I have a windows control embedded in a web page using the <object>
tag. The control sometimes needs to access an aspx page using
HttpWebRequest/Response (aspx page is located on the same web server
that the .dll file is located in).
This works perfectly when the client is not connecting through a proxy
server. When the client is connected to the web via a proxy server,
myHttpWebRequest.GetResponse() would fail with a 407 Authentication
Required.
I realize that any HttpWebRequest object has a Proxy property, but
whenever I tried to access it I got a SecurityException (Request for
type WebPermission failed). So to temporarily get past this problem, I
gave the dll FullTrust for my computer. Now no exception is thrown
when I try to access the Proxy property.
New problem. I got the proxy information using GetDefaultProxy(). It
is able to grab the address for the proxy server because I was able to
do MessageBox.Show(proxyObject.Address.ToString()).
So I *assume* I have the proxy information. However, when I try to do
a myHttpWebRequest.GetResponse(), I still get a 407 Authorization
required error. There does not seem to be any login/password for the
proxy server... or if there is, I don't know how to find it.
So is the cause of the problem because the proxy server thinks that
whatever is running the dll (I assume the JIT compiler or whatever) is
trying to access the proxy server? Or if not, what is the problem and
how do I go about fixing it?
Thanks,
Wendy Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73658
adding a control to a form
I converted a VB6 control to .NET using aximp. The converted control can be added to the toolbox. However, when I tried to add the control onto a form, VS throws the following error:
"The .NET assembly 'Name.Interop.mycontrol' could not be found".
Nevertheless, the converted control will be successfully added to the form in the second trial. Does anyone know how to fix this problem? Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73657
Form scrolling problem
I have a child form that has autoscroll set to true. However, when the mdi
parent is maximized and the child form is maximized, no scroll bars appear,
even though there is more controls and data below the visible area. Is
there a way to scroll the child form and/or the mdi parent when both are
maximized?
Thanks for any help.
Bernie Yaeger Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73655
Forms question (.)
I've created a custom control. And now I've done something that prevents
me from using the designer to layout controls on my custom control. I
tried deleting the .resx file, thinking the VS would just regenerate
it, but did not.
Here's how I got the problem:
I created a new user control. I called it BaseControl.
I created another new user control. I called it DerivedControl.
After VS generated the .cs file, I changed the base class to
BaseControl.
EG:
public class BaseControl : System.Windows.Forms.Control
public class DerivedControl : BaseControl
Now I am unable to add controls to DerivedControl using the designer.
I have to manually create the code in .cs file. This gets really hard
to lay things out.
So, what I can do so that I can use the designer?
Thnx
Matt Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73653
ComboBox Datasource problem
Hi, i am having a little problem with a combobox that i set his datasource
property to a collection, but doesn populate its items, the strange thing is
that i do the same thing on a datagrid and it works fine.
Take a look:
Public Class Account
Public Sub New(ByVal txtname As String, ByVal txtamount As Double)
name = txtname
amount = txtamount
End Sub
End Class
****************************************
Dim Accounts As New Collection()
Dim NewAccount As New Account("numer1", 1000)
Accounts .Add(NewAccount , 1)
Dim AnotherAccount As New Account("numer2", 2000)
Accounts .Add(AnotherAccount , 2)
*******************************************
Me.ComboBox.DataSource = Nothing
Me.ComboBox.DataSource = Accounts
Me.ComboBox.DisplayMember = "Name"
Me.ComboBox.ValueMember = "Amount" -----Error
"An unhandled exeception of type 'System.InvalidCastException ocurred in
microsoft.visualbasic.dll
Cast from type 'Microsoft.VisualBasic.Collection' to type 'Object()' is not
valid'"
Any ideas?
why i can set the same datasource for a datagrid and the is no error
showing? am i manipulating wrong the collection?
Any suggestion will help.
Thanks for your time Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73652
Change Cursor over ActiveX control
Hello,
I am trying to build a form that can display HTML content in the background
and various controls in the foreground. I am able to achieve this using the
WebBrowser activex and adding foreground controls to the form. So far
everything is ok. My problem is that I want to control the Cursor over the
controls and the background. Since the WebBroser (my background) is an
activex, I cannot control it's cursor!
I had also problems in this configuration with mouse events, but thanks to
you guys that one is now solved with IMessageFilter.
So my question is: How can I control the cursor shape over an ActiveX
control?
Thanks Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73651
Disable Performance Counters
Hi
Could anybody please explain the implecations of setting the value "
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance\Di
sable Performance Counters" to false on a Win2k server.
Regards
Ash. Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73649
Problem: HowTo update UI from workerThread?
Hi!
I want to update an userinterface from a background thread.
I think that a good way to do this is to use to use methodinvoker in
UI-thread and then begininvoke in workerThread to pass parameters back
and update the UI. But i have one question. The Method i start with
begininvoke is a public sub on another class (not the UI-class). Do I
have to pass the form (like a reference) to the other class which the
workerthread uses to be able to use it´s begininvoke method? Is this a
good way to do this. Here is my code:
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
' Some code
Me.Label1 = New System.Windows.Forms.Label
' Some more code
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim workerThread As New MyWorkerClass
Dim mi As MethodInvoker = New MethodInvoker(AddressOf
workerThread.StartWork)
mi.BeginInvoke(Nothing, Nothing)
End Sub
Public Sub UpdateLabel(ByVal o As Object, ByVal e As
System.EventArgs)
Dim myEvent As MyLabelEvent = CType(e, MyLabelEvent)
Label1.Text = e.LabelText()
End Sub
End Class
Public Class MyWorkerClass
Public Sub StartWork()
Dim e As System.EventArgs
While True
e = New MyLabelEvent("Text on label")
Dim lst As Object() = {Me, e}
???.BeginInvoke(New System.EventHandler(AddressOf
???.UpdateLabel), lst)
DoSomeWork()
End While
End Sub
Public Sub DoSomeWork()
End Sub
End Class
Public Class MyLabelEvent
Inherits System.EventArgs
Private _labelText As String
Public Sub New(ByVal label As String)
MyBase.New()
_labelText = label
End Sub
Public Property LabelText() As String
Get
Return _labelText
End Get
Set(ByVal Value As String)
_labelText = Value
End Set
End Property
End Class
Best Regards
/ Steve Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73637
Microsoft Application Block pattern
Long shot but here goes.....
I am developing a vb.net application using the MS application block pattern,
available @
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/uipab-ch03.asp
And I have developed some views that derive of
Microsoft.ApplicationBlocks.UIProcess.WindowsFormView BUT I am unable to get
any key press events, I want to stop the user pressing the Alt+F4 key to
close the application, I can do this in a normal application very easily so
don't bother replying with a simple example, what I want to know is why I'm
not getting the events when using the application block patterm?
the application block is written in C# and I have tried overriding the the
KeyDown method in the application block but don't get any event being caught
there either.
Anyone got any ideas?
Cheers for any help in advance
Ollie
any example class is shown below....
Public Class Welcome
Inherits Microsoft.ApplicationBlocks.UIProcess.WindowsFormView
....
....
....
Protected Overrides Sub OnKeyDown(ByVal e As KeyEventArgs)
If e.KeyCode = Keys.Alt Then
ErrorHandler.ProcessError("ALT PRESSED")
Else
MyBase.OnKeyDown(e)
End If
End Sub Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73636
how to lock focus of a form
Hello
I put my Options on e separated form and want to lock the focus on it until
user click ok or cancel, i mean deactivate the main form when option form is
shown (like IE option or most of the windows applications).
how`? Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73634
MDI and Word application
I would like to open a Word application into a MDI application.
I do this :
Word.ApplicationClass WordApp = new Word.ApplicationClass();
WordApp.Visible = true;
WordApp.Activate();
How can I open the object WordApp into a MDI application? Tag: How to solve Error runing MTS (vb.net) in Windows 98 Tag: 73632
hi,
I'm a vb.net Developer.
I cann't run my application (vb.net + MTS) in windows 98.
Please help me ,How to solve Error runing MTS (vb.net) in Windows 98 ?