Having trouble with ShowInTaskBar property and child windows, any idea?
Hi All,
(I have posted similiar question ealier. Hope the other smart ones can
also catch this mesage instead.)
I have an windows form application that dynamically creates a lot of
child windows. I want such that when the user clicks on one of the child
windows, the window should goes to the front, but NOT the other windows.
If I set the ShowInTaskBar property to true for all the child windows,
then I get the effect (as mentioned above) that I want. But if the
property is set to false. Any time I click on one of the child windows, the
window goes to the top, but so DOES the other child windows!
Can anyone may tell me why and give me a hint or two to resolve this
issue?
- JB
P.S. Thanks for Iulian and other posters who gave me some sugestions in the
past. Tag: Problem between different Lang. VS.net2003? Tag: 67307
Auto-hide panels
Do you know a control (free or cheap) that can do what we have into VS.Net
IDE that has the auto-hide feature and that you can pin ?
--
TIA
Éric Moreau, MCSD
Conseiller Principal / Senior Consultant
Concept S2i inc.(www.s2i.com) Tag: Problem between different Lang. VS.net2003? Tag: 67300
ToolTipText length
The length of the ToolTipText in my TabPage ToolTipText does not seem to display all the text I included in the ToolTipText property. Is there a maximum length? Can this value be changed
(Repeat the above quickly for yuks, but please still answer the post!
Michael Tag: Problem between different Lang. VS.net2003? Tag: 67299
UserControl as Items in ListBox
Folks
Does anyone know how to successfully use a collection (ArrayList) of UserControl
as the items for a System.Windows.Forms.ListBox
I am trying to make the rows in a listbox contain multiple columns, some of whic
are text, some of which are images and some of which are checkboxes. The use
simply needs to select the desired row
I tried using a DataGrid, but am unable to get the desired look
It appears to be necessary to set DrawMode to OwnerDrawFixed and the
implement the DrawItem event handler. Sadly, though, the user contro
never seems to display
Any ideas
Daniel Tag: Problem between different Lang. VS.net2003? Tag: 67296
background color of columns
I would like to set the background color of my datagrid to a certain color.
Except for one column, that should be white.
How can I do this?
I have a datagridtablestyle and each column is a datagridtextboxcolumn.
thanks!
Eric. Tag: Problem between different Lang. VS.net2003? Tag: 67293
combobox and listview
I would like to do a search from a combobox and display the data on a listview Tag: Problem between different Lang. VS.net2003? Tag: 67289
Unable to Debug Forms and most subroutines
After months (really) of fiddling, I found out how to get debugging to work - under Debug > Exceptions, make sure Unhandled Exceptions break the code into the debugger and allow Visual Basic in the Options dialog to edit files while debugging
Anyway, on to my problem...I'm creating our own manufacturing software, IC, MRP, AP, AR, you get the idea. I'm on such a tight schedule I didn't have time to learn ADO.NET, so I created an active-x control in VB 6 that exposes the DAO functions and properties. It works like this
Dim msDAO as eDAO10182004.eDA
msDAO = Me.DAO_ICMAIN.GetOc
msDAO.DatabasePath = Unified.Settings.DataPath & "\Inventory Control.mdb
msDAO.RecordsetSQL = "SELECT * FROM [tblItemsMaster] WHERE [Item Number] = '" & Me.cboItemNumber.Text & "'
msDAO.OpenConnectio
You would then access the data through the msDAO.Recordset property. However, when it comes to debugging...hehehehe
I cannot use breakpoints or debug any form that has an Active-X control on it, whether it is mine, or one of Microsoft's (The Windows Forms Controls are okay though). Instead, I sometimes get a error message, but most of the time the program just quits without warning. It makes it hell for me because I keep having to write message boxes to figure out where in my code I am. Try...Catch statements don't even work on any subroutine that references an Active-X control. I'm at my wit's end. It takes hours a day to track down one bug. Just one
I'm using VB .NET 2003
Can someone, perhaps someone from Microsoft help me? Tag: Problem between different Lang. VS.net2003? Tag: 67283
Scalability of Smart Cients
Hi!
We want to develop a Smart Client using .NET Remoting and No Touch
Deployment (loading the Assemblys directly from the Webserver except
that there is no younger version). However, wie are wondering, how
scalable the Smart Client is, for example, if thousand people want to
download the new release on monday morning.
Does anyone know, if there are limits, where you should use a web
client instead?
Are there any possibilities to solve this problem?
Thank you, Christoph Tag: Problem between different Lang. VS.net2003? Tag: 67282
Why is windows forms controls bolding so hard?
Why are fonts so hard to use in .NET? All I want to do is bold the font in
runtime - yet, xxx.xxx.Font.Bold is readonly. The only way I can see to bold
a font for anything at run time is to change the font to a whole NEW font;
i.e., for my listview subitem I have to say:
lst.SubItems(6).Font = New System.Drawing.Font(lst.SubItems(6).Font,
Drawing.FontStyle.Bold)
Again, I don't want to change the font itself, just make it bold (or
italic).
Is this the only way to do it? Or am I missing an easier way? Thanks.
Tom Tag: Problem between different Lang. VS.net2003? Tag: 67280
Rich Text Box
I'm using VB.net and SQL server 2000. I have a Windows form that has a Rich
Text Box on it. I also have a Font Dialog Box that changes the font and size
in the Rich Text box. When I do a normal update to the database the font
info is not included.
How do I save font information to a database.
Thank you,
E Tag: Problem between different Lang. VS.net2003? Tag: 67278
FolderBrowserDialog- No Disk error
Greetings
lately, whenever I call the FolderBRowserDialog (Visual Basic.net 2003) and there is no media in my internal zip drive D:, I get the following eror
No Dis
There is no disk in the dirve. Please insert a disk into drive \Device\Harddisk1\DR1
I see this is a common error, but I do not know how to solve it in this context
Thank
Randy Tag: Problem between different Lang. VS.net2003? Tag: 67277
Form Inheritance vs. Anchor/Dock
I'm still using VS.NET 2002.
I just learned what disease I'm suffering from: Form Properties Aren't
Virtual Syndrome.
The example that's been killing me is having controls in a base form anchor
and/or dock. Then, if the derived form is a different size, one finds that
these inherited controls anchor and/or dock to the size of the base form,
not the size of the derived form. One notices this problem when the
designers update after doing a build...
I read something in this newsgroup that suggests this problem is fixed in
VS.NET 2003. Is that the case?
Also, is there a workaround for this in VS.NET 2002, other than not using
anchor or dock in base forms? I'm about to try using anchor and/or dock in
the most-derived form, which it seems might work. Is there a better way in
VS.NET 2002?
Thanks for any help. I'm reaching the limits of what I can do with Windows
Forms without actually reading a good book on it. It's really amazing that
it's possible to go so far without actually knowing what I'm doing!
--
John Saunders
John.Saunders at SurfControl.com Tag: Problem between different Lang. VS.net2003? Tag: 67276
Showing all tooltips at once...
Hi,
How can I show all tooltips at the same time?
I have 12 tabs, and 500 controls in a form. When the user presses
'Control' button, I want to show all the shortcuts available...
How can I achieve this?
Thank you,
HyperX.
Microsoft .NET 1.1, VS.NET 2003, WindowsForms. Tag: Problem between different Lang. VS.net2003? Tag: 67274
Adding a Button Control to a ListView/DataGrid Column
Hi All,
Is it possible to add other controls to the ListView control in C# windows
forms. i.e. I want to add a button column so to speak to the list view. You
can do this sort of thing with the datagrid in asp.net, however I think the
datagrid in c# is overly complex for what I'm wanting to do, and I'm not
even sure it is possible to do it in that.
Answers to both Controls would be appreciated.
Thanks
Alan Tag: Problem between different Lang. VS.net2003? Tag: 67270
No Touch deployment
Are there any good articles out there on no touch deployment and how easy is
this to setup? Also a friend of mine told me about Microsoft Update block I
believe which is a more low level version of No Touch what are the
differences? Tag: Problem between different Lang. VS.net2003? Tag: 67262
PropertyGrid -- controlling the Category Text Color
Is there a way to control the color of the text that appears in the Category
headings area of the property grid. I assume that it is tied to a system
color -- the text is hard to read with the "dark-gray" color that ends up
being the default under standard XP settings.
The "LineColor" property provides control of the background color of the
category heading -- but I don't see an obvious way to control the text
color.
Thanks,
Rob. Tag: Problem between different Lang. VS.net2003? Tag: 67260
Form Properites
Hello,
Is there a possibility to write a properties (or method) to class
derived from Form to make a some changes in InitializeComponent() for
ALL child:
for example add MYFUNCTION to retrieve item Name?
this.button1.Location = new System.Drawing.Point(120, 91);
this.button1.Name = MYFUNCTION("button1");
....
this.ctlTab.Name = MYFUNCTION("MyControlTab");
(something like globalization)
Manually changes are not acceptable by designer.
Thanx for help
P. Tag: Problem between different Lang. VS.net2003? Tag: 67256
Q:) Need sample code for a best practices Windows Form app
Is there anything like Petshop or Duwamish but more of a regular
client/server windows forms based app that demonstrates good Window Forms
coding practices? Or something that just demonstrates the right way to
bind controls to data for a c/s app?
My .Net experience is mostly web app based so I'm used to opening datasets
and going back to refetch records on subsequent server roundtrips, etc.
I'm not sure about the best way to work with data sets and bound controls on
a client/server type of app where I can be fully coupled to the database.
I used to work with Delphi which had components for persistent database
connections and table objects that you opened once, wired your grids and
edit boxes up to, and did all of your updates through. I know .net can do
that but everything seems oriented towards disconnected apps. Then again,
maybe thats the better way, either way - some pointers would be helpful...
Thanks
bill
wiw at nyc . rr com Tag: Problem between different Lang. VS.net2003? Tag: 67254
Office 2003 Style Menu/VS.Net 2003 Style Menus
Hello,
Is there anyway to get the menu's to appear like Office
2003 or VS.Net 2003 in .Net?
I was using Application.EnableVisualStyles() but this
works for textbox and buttons if the FlatStyle is System
but the menus are still in the old plain format.
Thanks Tag: Problem between different Lang. VS.net2003? Tag: 67252
Set Hidden (Key) Fields on RowChange
I am using C# WinForms with a DataGrid bound to a strongly typed dataset
I am not displaying key fields and logging fields (Create DT, Create By, etc.) in the datagrid
When a New Row is modified, I want to set the key and hidden fields in code.
Basically, when the user moves off of a row, I want to check if the RowState == Added, and all necessary values are entered, and if so, then set hidden fields
I have tried the Row_Changing event and the Row_Changed event. The Row_Changed event is to late because I get an error stating the key field can not be null. The Row_Changing event stated that I could not change a proposed value in the rowChanging event
What is the best way to set hidden columns on a row after the user has entered values in the visible columns
Here is the code that does not work
private static void Row_Changing( object sender, DataRowChangeEventArgs e
dsLD.LineDtlRow r = (dsLD.LineDtlRow)e.Row
MessageBox.Show("In Row_Changed: " + r.RowState.ToString())
if (r.RowState == DataRowState.Added && r.GroupCD != null
r.ClaimID = 1
MessageBox.Show("Set Hidden Fields")
Thanks
Larry Tag: Problem between different Lang. VS.net2003? Tag: 67251
Disabling Forms Redrawing
Hello. I have a problem. I have a control and I want to try if a specific value of one property can be setted, without catching exception. So I set the value and then I restore the previuos value. Anyone know how to prevent that the control redraw between this two operations, to prevent image flickering? Tag: Problem between different Lang. VS.net2003? Tag: 67250
DateTime truncation
I want to compare two DateTime values but only down to seconds, so how do I
truncate DateTime values to second granularity ?
Similarly, I may want to truncate to the minute granularity.
I also may want to round to the nearest minute.
How do I do these things ? I'm sure it must be really simple but I cant find
anything in the DateTime class. I know I can convert to a numeric date and
time format and do a string compare but I imagine this is a very inefficient
way to do it. Tag: Problem between different Lang. VS.net2003? Tag: 67249
use MFC Controls in WinForms?
Hi there,
is there a possibility to host MFC controls in a SWF Control?
I have a big MFC application and want to migrate to .NET. It is not possible
for me to rewrite all the MFC controls and views so I want to create a new
.NET based frame and use the old MFC controlbars and editors.
Is there a way (e.g. with subclassing / superclassing) to create a managed
wrapper around my old MFC CWnd and CVeiw derived classes?
I know that I could create ActiveX controls around them and use a RCW but
that would cause a lot of additional overhead.
There are some atricles saying that Whidbey bring support for hosting SWF
Controls in MFC. Is that also true for the oposite (MFC Controls in SWF)?
Thanks in advance
Thomas Tag: Problem between different Lang. VS.net2003? Tag: 67248
Custom StringArrayEditor
Hi,
I want to edit a property (type=string[]) in the propertygrid. Usually you
use StringArrayEditor.
But I'd like to change the instruction displayed in the StringCollectionForm
and the text of the form.
Unfortunaltely, StringArrayEditor is internal, so I can't inherit.
I tried to inherit from CollectionEditor and then provide
StringCollectionForm (see hereafter). So I can change the instruction and
text (thanks to reflection). But if I change the collection (add a string, I
get an 'object reference not set to...' outside of my code.
Do you see a better way to do it? What's wrong? I know I can create my own
MyStringCollectionForm, but I don't want to do that.
Any idea?
Sebastien
public class TheObject{
[Editor(typeof(OutputArrayEditor), typeof(UITypeEditor))]
public string[] TheProperty{
...
}
}
public class OutputArrayEditor : CollectionEditor //ideal would be
StringArrayEditor
{
public OutputArrayEditor(Type type) : base (type){}
protected override
System.ComponentModel.Design.CollectionEditor.CollectionForm
CreateCollectionForm()
{
Type editorType =
Type.GetType("System.Windows.Forms.Design.StringArrayEditor, System.Design,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
object editor = editorType.InvokeMember(null, BindingFlags.CreateInstance,
null, null, new object[]{typeof(string[])});
Form form = (Form)editorType.InvokeMember("CreateCollectionForm",
BindingFlags.NonPublic | BindingFlags.InvokeMethod | BindingFlags.Instance,
null, editor, null);
form.Text = "My Custom collection text";
//add code to chg instruction here (reflection)
return (CollectionEditor.CollectionForm)form;//base.CreateCollectionForm
();
}
protected override object SetItems(object editValue, object[] value)
{
return base.SetItems (editValue, value);
}
protected override object[] GetItems(object editValue)
{
return base.GetItems (editValue);
}
} Tag: Problem between different Lang. VS.net2003? Tag: 67239
Datagrid with Custom Columns - design time support?
Hello,
I have created a custom column for a datagrid and if I manually modify the
code it all works fine. However, when I click on properties, etc., from the
design time environment the custom column is never displayed. Nor can I add
a column of the custom type...
I have found several references/examples in C# which demonstrate what to do,
but my conversions don't seem to work. Does someone have an example of
creating a custom datagrid which will support custom columns in the design
time environment in a windows.forms VB.NET 2003 application?
Thanks!
Jim Tag: Problem between different Lang. VS.net2003? Tag: 67238
Closing messagebox?
2nd posting ...
How do I force messagebox to close after OK button click? I don't explicity
'close' the dialog. Maybe
I should somehow? See code below, where I do some database work after OK
click ...in this case, msgbox is displayed for several minutes. Is there a
DoEvents or something which can be applied?
Thanks for your help!
Graeme
myResult = MessageBox.Show("Are you sure you want to update ODRC lives and
costs? This process updates the assets database table and can take several
minutes.", "Update ODRC?", MessageBoxButtons.YesNo, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button1)
If myResult = DialogResult.No Then gbxODRCRequirements.Visible = False :
Exit Sub
If myAssetType = "Equipment" Then
RecalcODRC()
ElseIf myAssetType = "Structures" Then
RecalcPoleODRC()
End If
...and so on. Tag: Problem between different Lang. VS.net2003? Tag: 67237
Cursor and splitter.
How can I supress cursor "MoveTo" on splitter?
This cursor appears when I move mouse over splitter.
I would like to show different cursors by myself.
How can I do it? Tag: Problem between different Lang. VS.net2003? Tag: 67231
DateTimePicker
i am using a custom format in the datetime picker
The cursor does not move to the next position automatically ie.day or year after the Month is keyed in.The user has to click the right arrow to move to the day or year.i want the datetimePicker to be a free form for eg: my format is 'MMddyyyy HH:mm tt'. I want the cursor to automove to 'dd' after the user keys in 'MM'.This is not happening in Datetime picket in .net
Can anybody help me out?Any ideas how to do this. Tag: Problem between different Lang. VS.net2003? Tag: 67230
IE 6.0 Exception 0xc0000005 in mshtml.dll
In a ASP.NET enterprise application under development. Consistantly, when navigating using the browser Back navigation button between two web forms, receive Internet Explorer crash.
AppName: iexplorer.exe AppVer: 6.0.2800.1106 ModName:mshtml.dll
ModVer: 6.0.2800.1276 Offset: 000c698e
Exception Information
Code: 0xc0000005
Scenario: Webform A is 'no-cache' and does a Server-Transfer to Webform B. Use IE Back button (back to Webform A)causes exception. Repeat with Webform A now being cached (i.e 'no-cache' removed) and the IE Back button works fine. I'm using Visual Studio 1.1, C#, in Debug mode.
Q. Any ideas how to trouble shoot something like this? Thanks... Tag: Problem between different Lang. VS.net2003? Tag: 67228
component
Hi
I'm a new one on .NET development, I used VB6. In VB6, we can create component(COM) to expose some features to other applications. Is there a way to do same thing in .NET? Is the widows service or web service same as COM
Thanks Tag: Problem between different Lang. VS.net2003? Tag: 67225
Instantiate a form
I am loading a form in this method. I have an accessor that is called Loginstatus within the frmMainForm. When I Instantiate the frmMainForm I want to disable the File Menu if the Loginstatus is false. In VB6 I would do something like this
frmMainForm auth = new frmMainForm()
auth.Loginstatus = fals
However, in C# when I execute frmMainForm auth = new frmMainForm(); the InitializeComponent routine is triggered. I understand that you are not suppose to edit this code? If thats the case then where is the best place to check for the Loginstatus value to see whether the File menu should be enabled or not. Currently I have this checking the Load event of the form Tag: Problem between different Lang. VS.net2003? Tag: 67215
textboxes in user control: change event fired twice if only 1 char
Hello
Strange behaviour: I have several textboxes in a user control that fire
change events. This event is fired for every character I enter and the
control's "Text" property is updated correctly. But if I enter only 1
character and set the focus to a control outside the user control that
contains the textbox, another change event is being fired. Additionaly,
the "Text" property is set to the original value (without the entered
character). If I enter 2 characters or set the focus to a control within
the containing user control, everything is fine.
Thanks for your advice
Philipp Tag: Problem between different Lang. VS.net2003? Tag: 67213
winform in asp.net
I am trying to do rich-client code hosted in Internet Explorer, formally referred to as ActiveX. I have a couple of examples for embedding a .net winform on an asp.net page. However, I seem unable to make any of these examples to work. The control just does not render, and I donâ??t get any errors
Does anyone know of a â??Hello Worldâ?? example of embedding a Winform in aspx
Thanks Tag: Problem between different Lang. VS.net2003? Tag: 67211
RichTextBox Speed
I am building an IRC client in C#. I am having trouble displaying the messages in a quick and efficient manner. I need to format the messages (font size, font color, etc) as they arrive from the server
Everything I have read says to use the RichTextBox. The problem is that the RichTextBox is too slow. It flickers and the text scrolls much too slow. I have tried various "hacks" to get rid of the flicker and speed up the update, but nothing seems to work. The various methods I have tried include preventing the control from redrawing itself by calling the WM_SETREDRAW method
Is there any way to "speed up" the RichTextBox? Can I create a control that inherits from the RichTextBox class and somehow make it update faster? For that matter, can I create a control that inherits from the TextBox class and make it support text formatting
Here is the code I am using right now to add formatted text to the RichTextBox control (the slow code)
textMessage.SuspendLayout()
textMessage.Select(vAdvRichTextBox.Text.Length, 0)
textMessage.SelectedText = vText
textMessage.Select(vAdvRichTextBox.Text.Length - vText.Length + 1, vText.Length)
textMessage.SelectionColor = vForeColor
textMessage.SelectionFont = vFont
textMessage.ResumeLayout(true)
textMessage.SelectionStart = vAdvRichTextBox.Text.Length
textMessage.SelectionLength = 0
textMessage.ScrollToCaret()
Any ideas
Phil Tag: Problem between different Lang. VS.net2003? Tag: 67210
.net ExecuteReader
I have a loop that calls a function. The function contains a sql connection and a reader. This code works perfectly in windows xp/2000. But on windows 98/ME machines, it runs the first iteration of the loop, then hangs the thread on the second iteration. Any Ideas? The connection is closed on each loop, etc
Dim rcmd As New System.Data.SqlClient.SqlCommand(mySQL, rconn
Dim rs As System.Data.SqlClient.SqlDataReade
'PreHan
rs = rcmd.ExecuteReader(
'post Hang Tag: Problem between different Lang. VS.net2003? Tag: 67209
MonthCalendar DateChanged event firing every 2 minutes.
The MonthCalendar DateChanged event is firing every 2 minutes in my application. I cannot find anything that would cause this and the date is not changing. I put breakpoints on anything else that might affect the date in my code, but the code does not stop there
Anybody know why this might happen? Tag: Problem between different Lang. VS.net2003? Tag: 67205
Reflection Interface
Hi,
I'm trying to instantiate a class from a precompiled assembly .dll and cast it into a known Interface typ
// Load the assembl
Assembly externalAssembly = Assembly.LoadFrom("some.dll")
// Create The typ
Type externalType = externalAssembly.GetType("My.Created.UserClass")
//Create the objec
IView exView = (IView) Activator.CreateInstance(externalType)
My.Created.UserClass is the fully qualified name for the class, and it extends UserControl and implements IView interface in which I created. I was able to compile this fine but when I get "Specified Cast Not Valid" error in runtime
I need to do this because I have to run a Configure() method which is a member of the IView interface. I know I can make a MethodInfo and assign Configure to it, but I really dont want to because of design requirements. A weird thing I noticed is that the code runs if I instead cast the Activator.CreateInstance(..) into a UserControl Object
Thank you
Rizka Armadhan Tag: Problem between different Lang. VS.net2003? Tag: 67204
Datagrid cell loses digits
I have a bound datagrid and all works fine but on a numeric column but I
found that when the formatting for the column is set to C or N and I click
on a cell and replace the entire number it works fine, but if I change one
of the digits to the right of the decimal point and then I click on another
row the edit gets lost, the value returns to what it was.
When I use no formatting this problem does not happen. Is this a known
problem?
Luis C. Uribe Tag: Problem between different Lang. VS.net2003? Tag: 67202
quick data binding question...
My edit form has an UltraToolbarsManager control which contains a toolbar
with a "Save" button on it.
The data object that is bound to the form has an "IsSavable" property that
returns a boolean indicating whether or not the object is savable.
Is there a way to bind the IsSavable property to the Save button?
Thanks! Tag: Problem between different Lang. VS.net2003? Tag: 67201
Problems with HTMLDocumentEvents2_Event on Windows 2000
H
The following (shrinkwrapped) code works ok on XP but not on Windows 2000 SP4 where ALL events are blocked (e.g. context menu does not appear, impossible to write in search TextBox etc.
Framework: v1.1.432
Dependencies on W2000
mscoree.dll 1.1.4322.57
advapi32.dll 5.0.2195.671
urlmon.dll 6.0.2800.140
shlwapi.dll 6.0.2800.140
Which one is the culprit and what can I do during deployment to ensure that my program works on windows 2000
Code
Public Class Form
Inherits System.Windows.Forms.For
#Region " Windows Form Designer generated code
Public Sub New(
MyBase.New(
'This call is required by the Windows Form Designer
InitializeComponent(
'Add any initialization after the InitializeComponent() cal
End Su
'Form overrides dispose to clean up the component list
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean
If disposing The
If Not (components Is Nothing) The
components.Dispose(
End I
End I
MyBase.Dispose(disposing
End Su
'Required by the Windows Form Designe
Private components As System.ComponentModel.IContaine
'NOTE: The following procedure is required by the Windows Form Designe
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor
Friend WithEvents AxWebBrowser1 As AxSHDocVw.AxWebBrowse
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent(
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1)
Me.AxWebBrowser1 = New AxSHDocVw.AxWebBrowse
CType(Me.AxWebBrowser1, System.ComponentModel.ISupportInitialize).BeginInit(
Me.SuspendLayout(
'AxWebBrowser
Me.AxWebBrowser1.Dock = System.Windows.Forms.DockStyle.Fil
Me.AxWebBrowser1.Enabled = Tru
Me.AxWebBrowser1.Location = New System.Drawing.Point(0, 0
Me.AxWebBrowser1.OcxState = CType(resources.GetObject("AxWebBrowser1.OcxState"), System.Windows.Forms.AxHost.State
Me.AxWebBrowser1.Size = New System.Drawing.Size(292, 273
Me.AxWebBrowser1.TabIndex =
'Form
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13
Me.ClientSize = New System.Drawing.Size(292, 273
Me.Controls.Add(Me.AxWebBrowser1
Me.Name = "Form1
Me.Text = "Form1
CType(Me.AxWebBrowser1, System.ComponentModel.ISupportInitialize).EndInit(
Me.ResumeLayout(False
End Su
#End Regio
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa
AxWebBrowser1.Navigate("http://www.microsoft.com"
End Su
Private Sub AxWebBrowser1_DocumentComplete(ByVal sender As Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent) Handles AxWebBrowser1.DocumentComplet
Dim Document2 As mshtml.IHTMLDocument2 = CType(AxWebBrowser1.Document, mshtml.IHTMLDocument2
Dim Document2Events As mshtml.HTMLDocumentEvents2_Event = CType(Document2, mshtml.HTMLDocumentEvents2_Event
Tr
RemoveHandler Document2Events.onclick, AddressOf event2
Catch 'ex As Exception : Debug.WriteLine(ex.Message
End Tr
Tr
AddHandler Document2Events.onclick, AddressOf event2
Catch ex As Exception : Debug.WriteLine(ex.Message
End Tr
End Su
Private Function event2b(ByVal e As mshtml.IHTMLEventObj) As Boolea
e.returnValue = Tru
Return Tru
End Functio
End Clas Tag: Problem between different Lang. VS.net2003? Tag: 67193
mousehover
Is there any way to specify how much time to pass before the mousehover
event occurs? For instance I'd like 1 second to pass before a mousehover
event occurs. How would I go about doing this?
Lance Tag: Problem between different Lang. VS.net2003? Tag: 67190
Data Grid Input Mask
Can anyone point me to an example of how to use an input mask in a column of a datagrid
I want a mask like ##/##/#### for datetime input. Thanks Tag: Problem between different Lang. VS.net2003? Tag: 67189
Drag and Drop
I need to implement some kind of panel where the user can put rectangles on
it, move them around and resize them. Is there an API for that or do I have
to code the whole stuff by myself? I don't know anything about drag&drop
yet.
--
cody
[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk Tag: Problem between different Lang. VS.net2003? Tag: 67184
Using the MS IE HTML control to print a HTML document
Folks,
I'm facing a dilemma - my users would like to print a number of HTML
forms that I generate from XML.
They would like to do this in a batch-like manner, e.g. select a
number of those forms to print, and then have my app print one after
another, without prompting them, without interrupting their work.
I can easily read the data and convert it to HTML (using an XSL
transform), but here's the thorny part - how do I print this to the
default printer, quietly, without showing any dialogs and prompts??
Basically, I was hoping to "recycle" all my code that I already have
to display those forms on screen. In this case, I open a Windows form,
which contains the Internet Explorer ActiveX control. Works nicely.
But when I try to do this "secretly", without showing the form to the
user, but just using it as a container to fill my HTML into and then
print it from there, I keep getting errors such as:
"An unhandled exception of typ
System.Reflection.TargetInvocationException has occured in
system.windows.forms.dll.
Unable to get the window handle for the 'AxWebBrowser' control.
Windowless ActiveX controls are not supported."
This is plain greek to me ;-) What does it mean, and is there really
no way to use some of the IE controls provided by MS to load and print
a HTML document "silently" in the background?
Any help would be most appreciated!
Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch Tag: Problem between different Lang. VS.net2003? Tag: 67170
form scaling
Hi,
It seems vs.net does some automatic scaling in the ide. like if i take a project develloped under 96 dpi low res and load it under 120 dpi hi res it does all kinds of automatic resizing. this is undesirable, how do you turn it off?
I have a function that scales forms on the fly (form param). but now i realize that changing the dpi messes up the scaling. i need to take the dpi into consideration but the formulas i've tried don't scale with good precision. so what would be the best scaling formula taking screen width, height and dpi?
TIA Tag: Problem between different Lang. VS.net2003? Tag: 67166
WinForms, Citrix, Infragistics and a BIG red X
We have developed a Windows Forms MDI application that runs over Citrix ICA.
We use Infragistics for various UI controls.
Every once in a while when a user loads data into a grid they will get a big
red X in the area usually consumed by the grid and a JIT error box with no
real meaningful information (of course no data is visible). This has
happened 99.5% of the time over Citrix, although a few developers have seen
it once or twice on their dev PCs.
Any ideas/thoughts?
Thanks. Tag: Problem between different Lang. VS.net2003? Tag: 67165
DataGrid refresh with IBindingList - MergeFileInfoList.cs (0/1)
I am hoping someone can give me some help/pointers to a problem I'm
having binding an ArrayList to a DataGrid. In an attempt to teach
myself various aspects of .Net development I am trying to write a very
simple C# Windows Forms application for merging files together. The
user interface consists of:
- A DataGrid with the ordered list of files to be merged along with
their length and last access time.
- Command Buttons to Add a File to be merged, Remove a File from the
list, Remove All Files from the list, and Perform the merge.
- Buttons to move the currently selected file up/down within the
list.
- Buttons to move the currently selected file to bottom/top of the
list.
My first pass at this was to use an ArrayList of FileInfo objects
bound to the DataGrid and use a DataGridTableStyle and
DataGridTextBoxColumn objects to only display the properties within
FileInfo I wanted. This worked fine EXCEPT that the only way to have
the DataGrid update when new entries were added/removed from the
ArrayList was to set the DataSource property to null and then set it
back to my ArrayList.
I wanted to avoid this "reset" of the DataSource so in doing some
searching I think I found that in order to automatically refresh I
needed to implement an object that Implements the IBindingList
interface. I found some sample code on www.codeproject.com and
tailored it to my needs.
Now, after setting the DataSource to my IBindingList object and
performing a number of Add() calls nothing shows up in the DataGrid.
Using the debugger I've confirmed that the entries are in the list.
I'm obvioiusly missing something important but have no idea what it
is.
Any help is appreciated.
Fred Tag: Problem between different Lang. VS.net2003? Tag: 67161
Mantain state in forms and avoid kill handlers
Hi,
I have a form with a lot of ComboBox (with a lot of items), and it is used
very frequently. So, I want to reduce the latency to show the form.
I test to assign the instance of the form after close in a static field, and
show it again (with ShowDialog). This approach reduce the time to half
(although, the handles are destroyed when the form is closed, and recreated
when it is showed again). But I notice some problems (for example, the
MouseEnter and MouseLeave events are not fired over controls the second time
I show the form).
Other requirements:
- The form must be modal (so, I can't use a Show/Hide methods)
- I need to persist the state in the form (I need to keep the selected
options)
Any advice?
Thanks,
Nicolás Tag: Problem between different Lang. VS.net2003? Tag: 67160
How to delete checked row/s in a datagrig
Hi
I've got this code (see below) that lets me check rows in a datagrid. I want to delet
the checked rows in the datagrid, not in the database. How can I delete the checked rows
I've also tried using e.Item.ItemIndex, but it deletes the whole datagrid instead of the selected row
using System
using System.Collections
using System.ComponentModel
using System.Data
using System.Drawing
using System.Web
using System.Web.SessionState
using System.Web.UI
using System.Web.UI.WebControls
using System.Web.UI.HtmlControls
using System.Data.SqlClient
using System.IO
using System.Text
namespace ExportToExcelTes
/// <summary
/// Summary description for pcs
/// </summary
public class test3array : System.Web.UI.Pag
protected System.Web.UI.WebControls.ListBox lstPeriod
protected System.Web.UI.WebControls.Button btnSubmit
protected System.Web.UI.WebControls.HyperLink hHome
protected System.Data.SqlClient.SqlCommand sqlSelectCommand1
protected System.Data.SqlClient.SqlCommand sqlInsertCommand1
protected System.Data.SqlClient.SqlConnection sqlConnection1
protected System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1
protected System.Web.UI.WebControls.DropDownList drpTSC
protected System.Web.UI.WebControls.Calendar cldPCS
protected System.Web.UI.WebControls.TextBox txtFirstDate
protected System.Web.UI.WebControls.TextBox txtEndDate
protected System.Web.UI.WebControls.Calendar cldEnd
protected ExportToExcelTest.DataSet1 dataSet11
SqlDataAdapter da
DataSet ds
SqlParameter sp
string dbPeriod = ""
protected System.Data.SqlClient.SqlCommand cmdUpdateCDX
protected System.Web.UI.WebControls.DataGrid dgPCS
protected System.Web.UI.WebControls.DataGrid dgExport
protected System.Web.UI.WebControls.Label Label1
protected System.Web.UI.WebControls.Button GetSelections
protected System.Web.UI.WebControls.Label ResultsInfo
string dbPeriod2 = ""
private void Page_Load(object sender, System.EventArgs e
sqlDataAdapter1.Fill(dataSet11)
drpTSC.DataBind()
private void cldPCS_SelectionChanged(object sender, System.EventArgs e
txtFirstDate.Text = cldPCS.SelectedDate.ToString()
private void cldEnd_SelectionChanged(object sender, System.EventArgs e
txtEndDate.Text = cldEnd.SelectedDate.ToString()
private void btnSubmit_Click(object sender, System.EventArgs e
string strConn = "data source=localhost;initial catalog=Northwind;persist security info=False;user "
"id=sa;workstation id=NCOBOX_0G4XKLO1;packet size=4096"
SqlConnection conn = new SqlConnection(strConn)
dbPeriod = txtFirstDate.Text
dbPeriod2 = txtEndDate.Text
da = new SqlDataAdapter("Xolisa CS PCS",conn)
da.SelectCommand.CommandType = CommandType.StoredProcedure
sp = new SqlParameter("@LoggerLocName",System.Data.SqlDbType.NVarChar)
sp.Direction = ParameterDirection.Input
sp.Value = drpTSC.SelectedItem.Text
da.SelectCommand.Parameters.Add(sp)
//add Date input parameter
sp = new SqlParameter("@DateTransactedCurrent", System.Data.SqlDbType.DateTime)
sp.Direction = ParameterDirection.Input
sp.Value = dbPeriod2
da.SelectCommand.Parameters.Add(sp)
//add Date input parameter
sp = new SqlParameter("@DateTransactedPrevious", System.Data.SqlDbType.DateTime)
sp.Direction = ParameterDirection.Input
sp.Value = dbPeriod
da.SelectCommand.Parameters.Add(sp)
ds = new DataSet()
da.Fill(ds)
dgPCS.DataSource = ds
dgPCS.DataBind()
dgExport.DataSource = ds
dgExport.DataBind();
//Button for deleting checked row
private void GetSelections_Click(object sender, System.EventArgs e
ArrayList selectedRows = new ArrayList()
StringBuilder nextUrl = new StringBuilder()
int i = 0
foreach (DataGridItem item in dgPCS.Items
CheckBox chkBox = (CheckBox)item.FindControl("Checkbox1")
if (chkBox != null && chkBox.Checked
TextBox id = (TextBox)item.FindControl("productID")
if (id != null
{
selectedRows.Add(id.Text);
i++;
}//end of inner if
}//end of outer if
}//end of foreach
if (selectedRows.Count > 0)
{
//Delete checked rows
}//end of if
}
//Delete selected row
private void dgPCS_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
int rowToDelete = e.Item.ItemIndex;
dgPCS.DataBind();
}
}
} Tag: Problem between different Lang. VS.net2003? Tag: 67159
I have create a winform app, but when I open it in Traditional Chinese, the
size of the buttons, panel all changed become bigger.....why is this? anyone
have clue?
Re: Problem between different Lang. VS.net2003? by hirf-spam-me-here
hirf-spam-me-here
Wed Feb 25 06:39:47 CST 2004
* "hkjamjam" <hkjamjam@hotmail.com> scripsit:
> I have create a winform app, but when I open it in Traditional Chinese, the
> size of the buttons, panel all changed become bigger.....why is this? anyone
> have clue?
Did you try to set the form's 'AutoScale' property to 'False'?