Fixed window position
Does anybody know what's the best way to lock the window's position in .NET besides using Windows API?
Basically, it will prevent the user from moving the windows form.
--------------------------------
From: Rommel Ladera
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>GBWC9OW3eUy1j6phgTAt7A==</Id> Tag: Name of default web browser? Tag: 76918
Is this a good use of MDI
I'm developing a Windows Forms app that requires a fixed set of
graphical nav buttons along the top of the app window, then a number
of forms (or panels? or...?) that appear below, one at a time, based
on the selection the user makes from the nav bar. I've seen in other
postings refer to this a "MS Money navigation." I've looked at Money,
and that seems about right.
I've actually got everything up and running using an MDI parent to
contain the nav stuff, and then some child forms set to fill the rest
of the parent. The child forms are set to have no border, no max or
min buttons, etc.--they basically look like panels.
This works except for one major problem: I'm using show and hide
methods to control the appearance of each form, but when I execute the
methods, the title bar and border of the child forms briefly appear
then disappear--it's a flicker, very distracting and annoying. I've
searched for a solution, but haven't found one.
So, I'm now wondering if this is the best way to handle this app.
Perhaps MDI is not suited for this? If not, what would be a better
solution? It seems that panels would be right, except difficult to put
together at design time...
Any suggestions?
I'm on Visual Basic .Net 2003, 1.1 of the CLR, with the most recent
updates.
Many thanks,
Art Tag: Name of default web browser? Tag: 76915
strange problem with inerited user controls
I have a strange problem with inherited controls:
I have created two user controls called UserLoginA & UserLoginB.
One of the properties of these controls is of type UserGroup ( a class
I defined in another assembly).
Then I show that UserLoginA & UserLoginB have a lot of common code,
so I decided to inherit UserLoginB from UserLoginA.
So I Created a new user control UserControlC that inherits from
UserLoginA, added the code needed to make it work like UserLoginB,
tested it, and everything worked just fine.
Then I removed the file that defined UserLoginB from the project, and
renamed UserLoginC to UserLoginB (so I will not have to change all the
code using UserLoginB).
Then the strange stuff started:
Now when I try to drag UserControlB (that used to be UserControlC) on
a from I get this error:
Then I create an inherited user control called UserLogin2 that
inherits from UserLogin.
When I add these controls to the toolbox and try to drap UserLogin2 to
the form
I get an error:
An exception occured while trying to create an instance of UserLoginB.
The exception was "The type serialized in the .resources file was not
the same type that the .resources file said it contained. Expected
"UserGroup" but read ""UserGroup".".
Does anybody have any Idea why this happens?
Thanks,
Nadav. Tag: Name of default web browser? Tag: 76909
SupraText Open Source .Net Editor ... here it is (!)
Ok, here's what I did all day ( besides baking an Eggplant Parmesan ).
The SupraText Editor version 0.0001a :
http://home.earthlink.net/~jabailo/Windopes%20SupraText/
Take down the binary and the four sample files here:
http://home.earthlink.net/~jabailo/Windopes%20SupraText/bin/Release/
And run it in its own folder.
0. Select text in the middle window.
1. Drag a named anchor from the left hand window
2. Click on a different file in the right hand window.
I'm also building a mono version, but right now I'm more adept at VS.net so
I wanted to build the 0.1 version in VS.net and then re-engineer it in
monodevelop.
The idea of a SupraText editor is to build highly congruent, linked, text
oriented web sites.
The text and the hyperlink between the HTML pages becomes the main
structural component.
Well, it's not much to look at, but it's already helping me design my new
website ;)
Comments: jabailo@THIRDPLANETFROMSUN_link.net ( replace CAPS of course )
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.752 / Virus Database: 503 - Release Date: 9/3/2004 Tag: Name of default web browser? Tag: 76903
showdialog
I want to show a modal dialog box at a moment when I don't know which form
of my application is focused, so I can't call ShowDialog(owner). Keeping
current form in a global variable would be troublesome. Other ideas? Tag: Name of default web browser? Tag: 76897
Wheel and Vertical Scroll
Does the Wheel Mouse not automatically scroll a textBox ?
Suggestions?
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.752 / Virus Database: 503 - Release Date: 9/3/2004 Tag: Name of default web browser? Tag: 76896
2 column editable Listview?
Is it possible to setup a listview control with two columns so that the
second column is editable? Tag: Name of default web browser? Tag: 76895
Two ListBox Handlers Short Circuit Each Other
Given for a ListBox
this.HLinks.MouseDown += new System.Windows.Forms.MouseEventHandler
(this.HLinks_MouseDown);//
this.HLinks.SelectedIndexChanged += new
System.EventHandler(this.HLinks_SelectedIndexChanged);
It seems I can have one but not the other.
If I use both, then the MouseDown event fires, when I change selection the
SelectedIndexChanged does not fire !
I use the MouseDown for a DragDrop event.
Sometimes I want to DragDrop from the ListBox to a TextBox; other times I
want to respond to a simple change in the selected Index of the TextBox via
a mouse click.
How ?
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.752 / Virus Database: 503 - Release Date: 9/3/2004 Tag: Name of default web browser? Tag: 76894
Objidl.h problem
Every time I add a particular form to my VS 2003 C++ project, the project
can no longer compile. The error message indicates an ambiguity because
IDataObj is defined both in System::Windows::Forms and also in objdl.h.
I have no idea why objidl.h is being included in my project, but it must
have something to do with the objects in my form other than controls. There
are no COM objects involved.
The problem line in objidl.h is line 7408:
typedef /* [unique] */ IDataObject *LPDATAOBJECT;
Can anyone help me get past this compiler error? And maybe explain how
objidl.h gets included in my project?
Thanks for any help. Tag: Name of default web browser? Tag: 76893
good book on winforms, sql server ce syncing up to sql server.
I'm going to use .net for developing winforms on a pda or other hand held
device and have a fat client with sql server ce on it and sync up to sql
server on a main server. any GOOD easy to read books on this subject. I'm
very experienced with .net on web forms.
Thanks.
--
Chris Davoli Tag: Name of default web browser? Tag: 76892
Search Files using OS Search
Is it possible to call the OS Search (Start/Search) from a windows
form application?
What I'm looking is to develop an interactive cd using vb.net with
search capabilities. The cd will have some pdf, word , excel and html
documents, and what I need is to have the possiblity to search for
some text inside these files (the same that I can do with the windows
search)
Thank in advance
Juan Miguel Lavista Tag: Name of default web browser? Tag: 76890
Drag Drop, Then Select Text
I've set up a form with a TextBox and a ListBox
( You can see all code here:
http://home.earthlink.net/~jabailo/Windopes%20SupaText/ )
Right now, if you double-click and select text in the text box, then drag an
entry from the ListBox onto the Text, the selected Text will be replaced by
that entry.
That's not exactly what I want.
What I want is to drag the ListBox entry over a word in the TextBox and have
it replace that word.
Can you suggest some properties of the TextBox that I might use to
accomplish that ? Tag: Name of default web browser? Tag: 76889
Validation in MDI children
Hello
In my MDI Application, I have an MDI Parent Form which contains two
Child Forms, childA and childB. childA has a TextBox which has an
Validating event Handler
When the Users enters some text into this TextBox which does not pass
the validating event, the Event Handler sets the Cancel Property of
the CancelEventArgs argument to TRUE. The Cursor cannot leave the
Texbox, which is excty what I want... but:
When the user clicks on another MDI Child (e.g. childB), childB comes
to front. The user can click on any Textbox on childB, he will not get
the cursor into the Textbox, because the Cursor is held back in
childA. The user thinks that the Application is not responding.
It would be a lot better if I could prevent the User from activating
childB as long as childA has Validation Errors.
How can I do this?
Regards
Matthias Tag: Name of default web browser? Tag: 76888
Custom display format for databound combo box
I would like to be able to customize how data is displayed in my databound
combo box. The user will be selecting one of these values which will
correspond to a row in the database. However, I do not want it to display
in the selection items simple a single value from each row. I would like
for it to display a combination of two column values. For instance, suppose
I have this data:
ID, value1, value2
--------------------
1, data-A1, data-A2
2, data-B1, data-B2
And I want the combo box to display the items like this:
"data-A1 and data-A2" with value of 1
"data-B1 and data-B2" with value of 2
I could do this by selecting composite data in my original SELECT statement,
with: value1 + ' and ' + value2 as DisplayValue. However, this won't stay
current as I update the rows in the local cache. Is there a way to have the
databound combo box's composite display automatically update as the rows are
being modified? Tag: Name of default web browser? Tag: 76877
OutLook Calendar API?
I working on an application the is, Globalizable and Localizable, and using a
MonthCalendar Control. I want to be able to populate my calendar control
with a holiday schedule like OutLook 2003 does.
For an example do the following:
Add another country's/region's holidays
To add holidays to the Microsoft Office Outlook 2003 calendar, you must
first remove any holidays that might remain in your Calendar from an earlier
version of Outlook for the country/region whose holidays you want to add.
After you have deleted those holidays, follow these steps:
1. On the Tools menu, click Options, and then click Calendar Options.
2. Click Add Holidays, and then select the locations whose holidays you want
copied to your Calendar.
Is there an API I can access from the development environment to allow me to
bring up the list of countries?
Is there an API to let me get a list of holidays for a specific country or
list of countryies if I set the country?
Thanks,
Charles Tag: Name of default web browser? Tag: 76873
Complex question about using collections from derived Controls in V. Studio Designer
Hi,
I'm writng a control derived from UserControl (let's call this control
MyControl) that itself is meant to be derived further times.
MyControl hosts a public collection of specialized non-GUI objects.
This collection is therefore accesible from any controls derived from
MyControl. Derived controls have to be able to add, change and remove
objects from the collection.
In MyControl I set the DesignerVisibility to Content so that the
code-generation engine properly generates the code for the collection
and when I initialize MyControl, I add some objects to the collection.
Now, here's where the problem starts. The code generation for controls
derived from MyControl will generate code to create and add all
objects in the collection, even if some of these were added in
MyControl and there's already code (in MyControl) to create and add
them.
The situation is similar to that of the ControlCollection in Controls,
but here somehow, the code-generator doesn't add controls present in
the super-calss again.
I could not find any references or documentation of how to deal with
this, so I'm asking for some help. Has anybody had some experience
with this?
Sebastian
PS: I'll post some code if anybody needs an alternative explanation.
Thanks Tag: Name of default web browser? Tag: 76871
Complex question about using collections from derived Controls in V. Studio Designer
Hi,
I'm writng a control derived from UserControl (let's call this control
MyControl) that itself is meant to be derived further times.
MyControl hosts a public collection of specialized non-GUI objects.
This collection is therefore accesible from any controls derived from
MyControl. Derived controls have to be able to add, change and remove
objects from the collection.
In MyControl I set the DesignerVisibility to Content so that the
code-generation engine properly generates the code for the collection
and when I initialize MyControl, I add some objects to the collection.
Now, here's where the problem starts. The code generation for controls
derived from MyControl will generate code to create and add all
objects in the collection, even if some of these were added in
MyControl and there's already code (in MyControl) to create and add
them.
The situation is similar to that of the ControlCollection in Controls,
but here somehow, the code-generator doesn't add controls present in
the super-calss again.
I could not find any references or documentation of how to deal with
this, so I'm asking for some help. Has anybody had some experience
with this?
Sebastian
PS: I'll post some code if anybody needs an alternative explanation.
Thanks Tag: Name of default web browser? Tag: 76870
RichTextBox requires tons of memory for text
VS.NET 2K3 and .NET 1.1
I'm having a problem with RichTextBox allocating huge amounts of memory for
text. I have recreated the problem in the attached sample which, when the
button is pressed, will create a ~33MB file and load it into the
RichTextBox.
If you watch the memory in Task Manager, before the button it consumes ~15MB
max, but after it's finished, the memory is upwards of 140MB. Immediately
invoking the GC doesn't seem to help. I've tried different things to no
avail.
Strangely enough, if I minimize the window, or maximize and restore, it will
go down to something I could at least understand.
I thought it might be related to http://support.microsoft.com/?kbid=826981,
which fix was included in the recently released SP1. I retested the issue
using the service pack, but it's still there.
What can I do to fix this?
====================================================
Walter Williams
Software Engineer
Sawtooth Software, Inc.
http://www.sawtoothsoftware.com
----------------------------------------------------
"Do, or do not. There is no try." Tag: Name of default web browser? Tag: 76867
Form Real FullScren Question
Hi all, I have a following inquiry.
Here in news group I found the sample code of how to put a window form in
FullScreen (in the style VS 2003/2005 does)
protected override void OnLoad(EventArgs e)
{
base.OnLoad (e);
Point clientTL = this.PointToScreen(new Point(ClientRectangle.X,
ClientRectangle.Y));
Point clientBR = this.PointToScreen(new Point(ClientRectangle.X +
ClientRectangle.Width, ClientRectangle.Y + ClientRectangle.Height));
Point frameTL = this.Location;
Point frameBR = new Point(this.Location.X + this.Width, this.Location.Y +
this.Height);
int topXDelta = clientTL.X - frameTL.X;
int topYDelta = clientTL.Y - frameTL.Y;
int bottomXDelta = frameBR.X - clientBR.X;
int bottomYDelta = frameBR.Y - clientBR.Y;
Rectangle newFrameBounds = Screen.GetBounds(this);
newFrameBounds.Inflate(topXDelta + bottomXDelta, topYDelta +
bottomYDelta);
newFrameBounds.Location = new Point(-topXDelta, -topYDelta);
this.MaximumSize = newFrameBounds.Size;
this.MaximizedBounds= newFrameBounds;
}
But if I want that "fullscreen" behaviour to be complete how to round that
when leave "fullscreen" mode, click on maximized button of form
that from will be not in "real" maximized state - even more form will again
in "fullscreen" mode.
If anybody has any suggestions of how this is happen in VS 2003/2005 ? Tag: Name of default web browser? Tag: 76866
Prevent Designer Generated Code
I've created a button class (MyButton) that derives from
System.Windows.Forms.Button.
In the constructor, I set the ForeColor and BackColor properties of the
button with a static color like this:
this.ForeColor = StaticForeColor
this.BackColor = StaticBackColor
It's really important that the Designer Generated Code doesn't set the
ForeColor and BackColor at design time. Is there a way to prevent the
Designer Generated Code from doing this?
Let me explain why. My idea behind creating a class this way, is so I can
set the colors of the button for the whole class dynamically in my project
when the project is loaded like this:
MyButton.StaticForeColor = Color.Blue;
The problem is, the Designer Generated Code automatically puts in lines
like this:
this.MyButton1 = new MyNameSpace.MyButton();
//
// MyButton1
//
...
this.btnBuildingView.BackColor = System.Drawing.Color.Black;
this.btnBuildingView.ForeColor =
System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(102)),
((System.Byte)(255)));
And even though the button class (MyButton) the StaticForeColor is not
initialized, it's just:
public static Color StaticForeColor;
The Designer Still generates code for the ForeColor and BackColor in the
//
// MyButton1
//
section because I set those values in the constructor.
So, during runtime, no matter what I change the StaticForeColor to, the
button will have it's ForeColor set to the StaticForeColor but immediately
afterwards, it will be reset to:
this.btnBuildingView.ForeColor =
System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(102)),
((System.Byte)(255)));
or something like it.
Thanks
Steve Tag: Name of default web browser? Tag: 76864
How can I find the "natural" height of a property grid
I want to size a panel to contain a label followed by a PropertyGrid such
that the panel is the sum of the heights of the two properties (so that the
PropertyGrid doesn't have to scroll, but also doesn't have any unused space
after it). How can I find out what the "natural" height of the PropertyGrid
would have to be set to to achieve that? (The scrollbar must somehow know
when to appear).
And also, as the user opens nested complex properties, how would I track the
change to the height?
Thanks for any help you can provide.
Barry
barry.bentley@bentley.com Tag: Name of default web browser? Tag: 76863
COOKIES HELP Please
Can anyone give an example of how to create a cookie store data in it and
read it out again from windows forms???
Thanks in Advance. Tag: Name of default web browser? Tag: 76860
[Datagrid] How to optimize the refresh of the grid?
Hi NG,
I'm using a datagrid which is bound with copies of remote objects in my app.
It works quite well but the problem is that the grid refresh is very very very slow.
I'm refreshing only two fields by row (using Invalidate(Rectangle)).
Does anyone know how to optimize the refreshing?
Thanks for you help
ka Tag: Name of default web browser? Tag: 76859
How to get URL adress from "My favorites" files ?
Hi.
I'd like to get URL from any link file placed in "My Favorites" web browser
folder (as I see - that's shortcut files). How can I do it?
Thanks for wrote, nice sunny day with no work:). Tag: Name of default web browser? Tag: 76851
Symbol does not display in RichTextBox but does in Word
This is an obscure question, but I'm hoping someone may have
experienced something like it. My program uses RichTextBox controls
for all the text. Currently text in the Kannada language is being
entered into it using the font KN-TTUma (ttf). One symbol in
particular, the "Soft Hyphen", U+00AD, Keystroke Alt+0173, shows up
fine in Microsoft Word, but it does not display at all in the rich
text boxes. It also does not display in WordPad, so it's not just a
Windows Forms problem, it seems to be rich text in general.
Here is the rtf for the symbol in question. If I save this as
symbol.rtf it does not display in WordPad, but it looks fine in Word.
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fdecor\fprq2\fcharset0
KN-TTUma;}{\f1\fnil\fcharset0 Microsoft Sans Serif;}}
\viewkind4\uc1\pard\f0\fs28\'ad\f1\fs17\par
}
Has anyone ever run into a problem like this where a font character
does not display?
Thanks,
Kevin Tag: Name of default web browser? Tag: 76850
How to: Create AVI files?
I have an C# application that uses bitblt to perform animation. The display
is fine, but I would also like to save each frame to an AVI file. Anyone
know how to do this in C#? Or, and libraries out there for this? Any info
would be appreciated.
Thanks,
Steve Tag: Name of default web browser? Tag: 76848
Property to lock form at run time
I can't find a property to lock the form so that you can't drag it around by
the title bar. The locked property doensn't do this. Tag: Name of default web browser? Tag: 76847
Postponed Form Visible While painting
Hi,
I have a form which is full of controls (also 3rd party controls like
Infragistic).
Now because this form is full of controls its take some time until it
complete to be painted (and I don't want that the user will see a
delay in the paining).
I'm looking for a way to paint the form on the background and only
when it finishes to be painted that to show it to the user.
Thanks. Tag: Name of default web browser? Tag: 76844
No Vertical Scroll Bar in DataGrid!
I have a DataGrid that lies on a TabPage with a TabControl, and when I
associate the DataSource with a DataTable that has more rows than can be
displayed, I do not see any scroll bars! I cannot figure out why they are
not being drawn.
If I click on a cell, then my mouse scroll-wheel will work, but when I hit
the botm of the list, the focus seems to jump to some other DataGrid on the
same Form.
Help!
-Ken Tag: Name of default web browser? Tag: 76843
Mulilanguage Windows Application
Dear All,
I'm developing a Multilanguage application using C# that supports English
and French and Arabic.
I have created the Forms with the default language and changed the language
to each of the languages that I want to support and do any locale specific
changes. Now I have each Form with all its resources needed for all
languages I want to support.
I want to put menu items that switch the application interface
instantaneously between languages that the application support without
restating the application.
I have tried to change the current thread CultureUI to the new culture then
call the InitializeComponent() method but it gives strange results.
How could I do that?? Tag: Name of default web browser? Tag: 76835
Problem with ComboBox
Hello
Iâ??m experience a problem with a combo at VB .NET.
Iâ??m developing a window application and Iâ??m using a combobox.
Iâ??m populating the combo with a dataset. I set its ValueMenber and
DisplayMenber, and the selectedindex to -1. The dropdownstyle is set to
DropDown, but the problem persists whit DropDownList.
When I click in the button, it shows a message box whit theValueMenber and
DisplayMenber. Them I set again the selectindex to -1. The problem is that
the selectedIndex that the combo assume is 0, therefore it show its first
value.
This is the code that I use.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim objset As New DataSet
Dim str1 As String
objset = SP_Combo(strcon)
'cb1.DataSource = objset.Tables("Destinos")
cb1.DataSource = objset.Tables("Empregados")
'cb1.DisplayMember = "nome"
cb1.DisplayMember = "FirstName"
cb1.SelectedIndex = -1
Match = -1
objset.Dispose()
objset = Nothing
End Sub
Public Function SP_Combo(ByVal strConn As String) As DataSet
Dim a As String
Dim objComm As New SqlCommand
Dim objDataSet As New DataSet
Dim ObjdataAd As New SqlDataAdapter
Dim objConn As New SqlConnection(strConn)
objConn.Open()
With objComm
.Connection = objConn
.CommandType = CommandType.Text
.CommandText = "Select EmployeeID, FirstName from Employees
order by FirstName"
'.CommandType = CommandType.StoredProcedure
'.CommandText = "SpNet_DestRecp"
'.Parameters.Add(New SqlParameter("@Var_Onde",
"Combo")).Direction = ParameterDirection.Input
End With
ObjdataAd.SelectCommand = objComm
'ObjdataAd.Fill(objDataSet, "Destinos")
ObjdataAd.Fill(objDataSet, "Empregados")
objComm.Dispose()
objComm = Nothing
ObjdataAd.Dispose()
ObjdataAd = Nothing
objConn.Close()
objConn.Dispose()
objConn = Nothing
Return objDataSet
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
If Match <> -1 And cb1.SelectedIndex = -1 Then
cb1.SelectedIndex = Match
Match = -1
End If
If cb1.SelectedIndex <> -1 Then
MsgBox("Numero: " & cb1.SelectedValue & " com o nome " &
cb1.GetItemText(cb1.SelectedItem))
MsgBox("Indice: " & cb1.SelectedIndex)
End If
cb1.SelectedIndex = -1
End Sub
To resolve this issue I populate the combo again. But this makes the
application slower.
Thereâ??s anyone who knows to resolve this little problem?
Thanks to all.
Ana Rita Tag: Name of default web browser? Tag: 76833
mdi forms
Hi
I have few forms linked each other into the mdi project
the second form's scrollbar is not visible,only parents scrollbar is
visible,
regards
usha s Tag: Name of default web browser? Tag: 76824
Datagrid Column merge
G'day Folks,
One form in my app has a datagrid with multiple columns, 3 of which i want
to merge. I have been unable to obtain any information on merging datagrid
columns, is this possible ?... or do i have to merge prior to binding with
the grid.
Cheers
Rocket. Tag: Name of default web browser? Tag: 76814
Make mp3 player by vb.net
Dear all,
I want to make a mp3 player by vb.net, could anyone give me some idea?
Thank in advance Tag: Name of default web browser? Tag: 76808
where is ip address control?
vs.net 2003, vc.net project, i want to add a ip address control on my form,
but...where is it? Tag: Name of default web browser? Tag: 76807
where is ip address control?
in vs.net 2003, a vc.net project, i want to add a ip address control on my
form,but i can't find it.where is it? Tag: Name of default web browser? Tag: 76806
Show Blank value in Combo Box
I need to display a blank value as well as other values. I do not want to
alter any current records but just be able to display this blank value
amongst the list.
I have not been able to figure out how to do this in a combo box. Any help
will be greatly appreciated.
carlt@gicw.org Tag: Name of default web browser? Tag: 76803
Alignment of HeaderText of DataColumnStyle
Hi,
I am using DataGrid to develop my application. My screen design have to
shows all column on datatable in datagrid must be display text on center
alignment. When I set RightToLeft property to Yes then the column HeaderText
automatically align Right even I used to set to Center but the Data in row
still align Center.
Can anyone explain to me about behavior of datagrid when is set to right to
left?
How possible to set the HeaderText always align Center?
Cheer,
KPH Tag: Name of default web browser? Tag: 76802
COM Add-in toolbar click events only fire once if window is initialized
This is a very bizare problem. So, I have a C# COM Add-in for Excel
which creates a toolbar, then pops-up meaningful windows when you
click the toolbar buttons. Everything works fine the first time.
After that, my event handlers do not get called when I click the
toolbar handlers. I've isolated the problem down to initializing a
dialog window (never actually showing the window). Explicitely, the
VisualStudio IDE is initializing the first component, failing on:
this.instructionLabel.Location = ((System.Drawing.Point)
(resources.GetObject("instructionLabel.Location")));
in InitializeComponent(). If I comment out the rest of the
initialization code from this line to "this.ResumeLayout(false);", the
event will fire every time. Note that there are plenty of lines
before this with plenty of equally 'severe' calls:
System.Resources.ResourceManager resources = new
System.Resources.ResourceManager(typeof(AuthenticationPopup));
this.instructionLabel = new System.Windows.Forms.Label();
this.userIdLabel = new System.Windows.Forms.Label();
...
this.SuspendLayout();
...
this.instructionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)
(resources.GetObject("instructionLabel.Anchor")));
...
Unfortunately, this isn't a clear relationship, as I can't duplicate
it in a simple sample app where I create the add-in, toolbar, form
(localized), and one simple label. Other things happening:
- If I comment out all of the form stuff, there is also a networking
class that basically does XML-RPC http client calls that causes the
same problem. Commenting out the 2 together allows for multiple
firings.
- I was previously developing this app as a simple COM interop
application launching it from some Excel VB code. This issue wasn't
present in that mode.
Thanks,
Carlos
versions: .NET 1.1, OfficeXP, VisualStudio.NET 2003 (latest service
packs) Tag: Name of default web browser? Tag: 76800
Simple use of ToolTip in VB not working
OK, my understanding of the simple use of the tooltip is to do the
following:
Drag the ToolTip from the toolbox on to your form. Once this is done
all the controls have a new property added to them called "ToolTip on
ToolTip1" (default name).
For each control you can go and enter the specific text for that
particular control. Then when the mouse is hovered over your controls
any ToolTips you've defined for the controls should be displayed.
I COULD NOT GET THIS TO WORK until I did the additional step:
On my first control I added an event handler for mouse over as
follows:
Private Sub lblAddOne_MouseHover(ByVal sender As Object, ByVal e As _
System.EventArgs) Handles lblAddOne.MouseHover
ToolTip1.SetToolTip(sender, "Move Selected Items From List 1 to List
2")
End Sub
Once I added this code the ToolTip on the first control worked fine.
I then just configured the properties of the second control's ToolTip
and IT worked fine without any extra code!
What am I missing here?
TIA.
JB Tag: Name of default web browser? Tag: 76794
disposing of SystemBrushes
Hi
If i create a Brush object I believe it is good practice to explicitly
dispose it or use it within a using block.
Is it correct to assume that this does not apply to brushes from the
SystemBrushes collection?
Adam Tag: Name of default web browser? Tag: 76793
remove combox 3d border
How can I remove the 3d border of a combobox on a windows form.
even on a box using xp style it is painting with a 3d border.
it does not seem to have a BorderStyle property.
could I do this by overriding OnPaint at all?
Adam Tag: Name of default web browser? Tag: 76792
how to add button column in Datagrid
Hello everyone,
I was wondering if I can extend the Windows Forms Datagrid to add my own
ButtonColumn (like in ASP.NET Datagrid). I also would like to add my own
Formatted Text box column. Is it possible to extend the current Datagrid to
do this.
Please let me know
Thanks
--
Rajiv Tag: Name of default web browser? Tag: 76786
Running with XP-Style
In MSDN the topic "Add the Manifest to the Executable File"
under "Using Windows XP Visual Styles With Controls on Windows Forms"
explains how to add the manifest resource to the executable after it's been
built.
So after a subsequent rebuild the proccess (of adding the resource) must be
repeated.
Is there a way the VS.NET 2003 IDE can do this automatically?
Thanks,
Opher. Tag: Name of default web browser? Tag: 76782
TextBox carret not placed correctly
Hi,
When a user clicks a TextBox on a modal form, the caret immediately
moves to the clicked location within the existing text. On a non-modal form,
the user's TextBox click sets the focus appropriately, but fails to set the
caret. How do I correct this behavior? When the user clicks in the midst of
a word within a TextBox, the caret should be placed precisely between the
two characters at the click-point. Any ideas?
Thanks... Tag: Name of default web browser? Tag: 76781
AutoScroll property
Hi,
I have a very long Form whose AutoScroll property is set to true. The
user can easily scroll vertically through the form. The problem is that as
the user drags the scroll marker up and down, the form doesn't actually
scroll. Instead, the user must release the mouse button before the form
redraws. Is there any way to make scrollable forms behave like every other
Windows application on the market (Word, VS.NET, etc.) in that the view
would actually scroll in real-time as the user drags the scroller knob?
Thanks... Tag: Name of default web browser? Tag: 76780
ClickOnce Provider
Ok, I ran into this problem also ;-(
http://weblogs.asp.net/klaus.aschenbrenner/archive/2004/08/25/220475.aspx
Instead of un-installing / reinstalling or using mageui ... does anyone know
what registry setting is used so I can just have clickonce pick the info up
from there? Tag: Name of default web browser? Tag: 76778
AutoScale and MDI child maximized forms
Hi,
We have developed a MDI application using small fonts, when running the
application in a Large fonts setup it works ok AS LONG we make sure that the
mdi child forms open in normal mode (not maximized), if they open maximized
the control on the right and bottom of the form are lost (because the
controls are wrongly resized).
I do want the controls to resize... what i don't want is it to fail while it
does it.
Also: we worked around it so any time you open a form it opens normalized
instead of maximized (and that works fine, but it is a workaround).
Is this a bug?
José Tag: Name of default web browser? Tag: 76776
Inherits TextBox and then?
Hi,
I have inherit a class from TextBox. In my class I do some stuff. But how
can I get my class to a form? Placing a normal TextBox and changing TextBox
to MyTextBox will not work. The box disappears from the form.
What must I do?
Thanks
Werner Tag: Name of default web browser? Tag: 76769
clipboard
Hello,
Is it possible to put in the Clipboard, an object which implements the
IDataObject interface but that knows only a format that is not defined in
the DataFormats?
What i want to do is to pull an object from the clipboard lke this:
IDataObject pulledObject = Clipboard.GetDataObject();
if ( pulledObject != null && pulledObject.GetDataPresent(
"MyObjectFormat" ) )
{
CMyClass A = pulledObject.GetData( "MyObjectFormat") as
CMyClass;
}
Pascal Tag: Name of default web browser? Tag: 76764
Hi.
How can I get name and location of my default web browser?
Thanks for wrote.
PS.
I tried open my link like that:
System::Diagnostics::Process::Start(S"http://www.web.com");
and default browser STARTS correct, but there is system warning message:
can't find file or location - somthing like that - why? statement of my
expression i correct - I think.