program exited without throwing any exception
We have upgraded the VB6 application to VB.NET. The
application uses Crystal Reports 9.0 (Advanced) for
reports, it also has MSFLEXGRID of VB6. If we switch to
another application by pressing ALT+TAB, the .NET
application exits without generating any errors. It says "
The program xxx "has exited with code 0"" Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53350
Making control size fixed (like PictureBox.SizeMode)
How can I make my control have a fixed size?
I want it to act exactly like the PictureBox control does
when SizeMode is set to AutoSize.
Thanks! Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53348
WebBrowser ctrl: switch off context menu in C#?
Hi,
I am using the AxSHDocVw.AxWebBrowser
web browser control in my windows forms
application in C# and I would like to
switch off the context menu of the browser.
Currently, I only found a solution for c/c++:
It seems that one has to implement the
IDocHostUIHandler interface, which should
be defined in the mshtml assembly.
Apparently, it is not there.
Any ideas? Other solutions welcome as well!
Thanks in advance,
Guenter Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53345
Long drawing loop cancellation
Thinking about a standard "silly" problem of giving a user an option
to cancel long drawing loop, I read a lot of articles and did some
investigations of my own. (I work with C# .Net 2003).
My application must provide a very sophisticated drawing, which is
actually a millions-length sequence of simple line or ellipse drawings
executed in a very long loop. Naturally, I'd like to give a user an
option to cancel the drawing.
I have a number of rather bad solutions and I don't see any acceptable
one.
The Solutions are:
1. The drawing loop is execute in the UI thread and calls DoEvents()
to allow "Cancel" button to be pressed. The downside is well known
(see DoEvents() method adoption discussions) ? UI thread is busy and
natural events sequence is broken.
2. The drawing loop is executed not in the UI thread. The downside is
seldom exceptions. Generally, as I know, .Net does not allow drawing
from non UI thread.
3. The drawing loop is executed not in the UI thread but all drawing
operations are executed in the UI thread by calling Invoke for each
elementary drawing operation. Theoretically, this must be the correct
schema! . The downside is that Invoke() is a very expensive call, so
it works inappropriately long (see table below).
4. Using memory-stream metafile for buffering. Actually, this is not
what I need; in addition, it works even longer then #3.
Here is the execution time comparative graph for different
implementations of a loop with 2,000,000 drawing lines on my PC.
1. Execution in the UI thread (without DoEvents() calling) - time
00:00:04.6250592 (given as 1) and no "Cancel" available
2. Execution in the UI thread (calling DoEvents() on each step) -
00:00:10.5937500 (2.3 times longer)
3. Execution in a non UI thread (calling Invoke() for each drawing
operation) - 00:05:41.560314 (73.8 times longer)
4. Drawing in memory-metafile (no DoEvents() or Invoke() ) - execution
time 00:05:06.7153993 (66.3 times longer)
Of course, 5 minutes instead of 5 seconds is too much for such a
common task (a long loop cancellation). Any suggestions will be deeply
appreciated.
Alex Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53342
Cannot find CrystalReportViewer control
I did a full installation on VB .NET version 7.0 and .NET
framework 1.0. I tried to find the CrystalReportViewer in
the Toolbox but I couldn't. I also tried to look for it
in Tools/customize toolbox but still weren't successful.
Is it something to do with the VB .NET standard version
or enterprise version?
Also I found some control called CrystalReport, but it is
not mentioned in the .NET document. What's the difference
between this one and CrystalReportViewer?
Thanks in advance. Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53340
transfer a value from one form to another
I have a form with a textbox that will hold a mean value. When the textbox
gets focus, another form pops up, values are entered, and the mean value is
calculated. The mean value is stored in a Public variable. The two forms
are in different classes. How do I transfer this value to the original
textbox? Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53336
Opening a form over a control
Can anyone explain how set the location of a new windows form based aginst
the current loctaion of a control on a form, ie formA has a text control in
a group box and when the user starts typing in the text box I want to be
able to open a new form over the exact location of the textbox. the problem
I am having is that the textbox location is offset based aginst the groupbox
and not the form, pulling my hair out please help :) Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53333
Ole Automation Control in .Net
Dear all,
I want to embed word document in .net by ole
automation control, however, the control is only existing
in vb6. I have asked many people, they just say to use
axwebbrowser controls, however the controls is a little
bit limit functions! If I dont want to use the
webbrowsercontrols, what can i to use? Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53326
WebControl problem.
I am trying to iterate through the elements of a HTML
document loaded in a WebControl on a WinForm. I have
found many exemples and most of them are like the
following piece of code. Unfortunally this only catch the
tags HTML, STYLE, SCRIPT, HEAD and TITLE. I need to get
all the elements on the page specially the INPUT tags.
What am I missing?
Dim htDoc As mshtml.HTMLDocument
Dim oTags As Object
htDoc = webBrowserControl.Document
For Each oTags In htDoc.All
MsgBox(oTags.tagName)
Next
htDoc = Nothing Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53325
Excel Automation
This is a multipart message in MIME format.
--=_alternative 003B298F80256D74_=
Content-Type: text/plain; charset="US-ASCII"
Hi,
Is there a way (in VB.NET) to handle an opened Excel Process by his ID and
start using it as an Excel.Application object ???
Thanks in advance,
Carlos Cruz
--=_alternative 003B298F80256D74_=
Content-Type: text/html; charset="US-ASCII"
<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">Is there a way (in VB.NET) to handle
an opened Excel Process by his ID and start using it as an Excel.Application
object ???</font>
<br>
<br><font size=2 face="sans-serif">Thanks in advance,</font>
<br>
<br><font size=2 face="sans-serif">Carlos Cruz</font>
--=_alternative 003B298F80256D74_=-- Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53316
Hidding Row Selector Columns of DataGrid
This is a multi-part message in MIME format.
------=_NextPart_000_00BA_01C35777.7C55FA40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi
i want to hide the row selector column, first column of the datagrid =
which allows to select complete row / shows ">" for the active row.
how can it be done?
Rajeev
------=_NextPart_000_00BA_01C35777.7C55FA40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DVerdana size=3D2>Hi</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>i want to hide the row selector =
column, first=20
column of the datagrid which allows to select complete row / shows=20
"<STRONG>></STRONG>" for the active row.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>how can it be done?</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>Rajeev</FONT></DIV></BODY></HTML>
------=_NextPart_000_00BA_01C35777.7C55FA40-- Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53314
Why i can't localizing datetimepicker control?
I use windows 2000 and set regional option as "thai". I
use datetimepicker control in my .net application. And I
chang Culture of my Application to "en-US" by use code
below
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-
US");
Thread.CurrentThread.CurrentUICulture = new CultureInfo
("en-US");
But my datetimepicker still display in thai language.
How can i display it in English language.
Thank You. Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53305
Accessing System Menu from C#
For a simple form without its own menu I wanted to add
an "About..." command to the system menu as I would for
an old MFC/C++ application.
However I cannot find out how to access the system menu
other than to toggle it on/off via the ControlBox
property.
Is this simply a .NET style being enforced (thou shalt
not modify the system menu) or am I overlooking something?
Thanks in advance!
-- TB Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53297
Office is blocked when invoking AxSHDocVw.AxWebBrowser method's navigate
I'm using a Winform and AxSHDocVw.AxWebBrowser, but when I use de
Navigate method if I have the office, for example: word, opened in
another window, it frozzes! and it remains blocked until I close my
window.
(by blocked I mean that I could not use the Word that was already open
before the Navigate invocation)
Thanks in Advance
garci Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53294
Error Reading Configuration Settings
Hi,
I am deploying a project to a laptop. It works fine on my development
computer, and I have tested once a few weeks ago.
However, this time, the program can not start at all. After some digging, I
find that it stops right at the following line (this line is part of the
function called by my program's initialization code):
--------------------------------------------------------------
//location is a string
location = ConfigurationSettings.AppSettings.Get("Location");
--------------------------------------------------------------
Before this line, everything is normal, but program just exit at this line.
I can not catch any exceptions at all, and the process just disappears in
"Windows Task Manager".
Any ideas?
Thanks a lot,
Guogang Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53291
Call WinForm with parameter?
Hello..is it possible to call a winform (show or
showdialog) and pass the form a parameter? Could be a
single value (like an integer)?
thanks for any help or links.
,dw Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53289
Newbie problem
Hi,
I'm having a problem with a windows application in VB.NET.
It is an MDI application, and I have just added a splash
screen that is displayed in the beginning of the
constructor of the mainform, and then is hidden at the
end of the constructor (after all the init is done for
the mainform).
The splash screen has a background image that fills all
the form. There is also 4 labels on top the the
background image. The problem is that for some reason,
when the splash screen is displayed, the labels are not
displayed. In fact, instead they act as if they were
transparent, so I see whatever is behind the form on my
desktop.
Any idea what can I do for this?
thanks,
Ross
. Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53287
Transparency Problems
I am attempting to wrap-up development cycle and have arrived at the point
where "small annoyances" can no longer be avoided<g>. I notice that other
applications windows (i.e. from other apps) "bleeding through" the UI from
time to time.
Now the "strange" thing is that the "underneath app" that always "bleeds
through" is Internet Explorer. I am at a loss as to how to proceed since I
have done nothing "knowingly" to enable any sort of transparency, all
TransparencyKey values have been left to their default values.
Carlos Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53286
Problem using a textbox to change the data
Hello:
I have a form that has a dataset that has one table, a
command button, and a data-bound textbox. I also have
navigation button that navigates through my dataset.
When I run the application, I see the row values
displayed appropriately.
But when I make changes to the value that is dispalyed
textbox and click on the Update command button to save
the changes, the changes are lost when I refill the
dataset.
But if I navigate to the privious or next row and then
click on the Update button, my changes are saved.
Can somebody explain to me what's happening?
Here's the code
Private Sub Form1_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
tbxDDLID.DataBindings.Add(New Binding("Text",
MyDataSet.Tables("DDL"), "DDL_ID_N"))
tbxDDLName.DataBindings.Add(New Binding("Text",
MyDataSet.Tables("DDL"), "DDL_Name_C"))
End Sub
Private Sub btnUpdate_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnUpdate.Click
MyDataset.Update()
End Sub
. Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53285
Floating window for Office add-in?
Hi,
I'm developing a Microsoft Word add-in using VB.Net. It contains a custom
non-modal dialog box, built from a Windows Form. The form should float
above the active document in Word, similar to the behavior of the Find and
Replace dialog in Word.
In VB.Net, this can be achieved by setting the floating form's Owner
property to the lower form:
Dim Form as New Form2
Form.Owner = Me
Form.Show()
However, this doesn't work here since the "owner" is a Microsoft Word
window, rather than a .Net Windows Form. Also, I can't just use the
.TopMost property for my form, because that will cause it to float above
_every_ window on the screen (including other applications.)
Is there a way (probably through an API call) to make my form float above
the active Microsoft Word document, but not other documents or applications?
Thanks,
Robert Jacobson Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53284
DataGrid (or ListBox) "Viewport" Size
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C356B4.FB15D580
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
How do I find out the size (specifically width) of a listbox's =
(specifically datagrid) "viewport" where the "viewport" does not contain =
borders (Fixed3D and otherwise), scrollbars, etc. ?
Microsoft defines a "viewport" in help text for the =
"DataGrid.VisibleColumnCount" property as so: "The viewport is the =
rectangular area through which the grid is visible." Well that's =
exactly what I need but where do I get it and it's attributes?
I'm asking because I'm writing a method which fills the width of a =
DataGrid with the columns defined in the active TableStyle. The problem =
is that I can't get the width of the datagrid which does not include the =
border, scrollbars, etc. =20
I've tried the following and they all refer to the width of the =
ClientRectangle which inclues scrollbars, borders, etc.
dataGrid.Width=20
dataGrid.ClientRectangle.Width=20
dataGrid.Bounds.Width=20
dataGrid.DisplayRectangle.Width
dataGrid.Size.Width
If I allocate column widths such that the total of all column widths is =
equal to, say, dataGrid.Width, I still get a horizontal scrollbar. The =
difference between dataGrid.Width and this total of all column widths is =
the width of say a 3D border, vertical scrollbar, etc.
Any suggestions?
Kristin
Kristin Barker=20
Principal Software Engineer=20
Email: kristin_barker@natureserve.org=20
http://www.natureserve.org
------=_NextPart_000_0008_01C356B4.FB15D580
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff background=3D""><FONT face=3DArial size=3D2>How =
do I find out=20
the size (specifically width) of a listbox's (specifically datagrid) =
"viewport"=20
where the "viewport" does not contain borders (Fixed3D and otherwise),=20
scrollbars, etc. ?<BR><BR>Microsoft defines a "viewport" in help text =
for the=20
"DataGrid.VisibleColumnCount" property as so: "The viewport is the =
rectangular=20
area through which the grid is visible." Well that's exactly what =
I need=20
but where do I get it and it's attributes?<BR><BR>I'm asking because I'm =
writing=20
a method which fills the width of a DataGrid with the columns defined in =
the=20
active TableStyle. The problem is that I can't get the width of =
the=20
datagrid which does not include the border, scrollbars, etc. =
<BR><BR>I've=20
tried the following and they all refer to the width of the =
ClientRectangle which=20
inclues scrollbars, borders, etc.<BR><BR>dataGrid.Width=20
<BR>dataGrid.ClientRectangle.Width <BR>dataGrid.Bounds.Width=20
<BR>dataGrid.DisplayRectangle.Width<BR>dataGrid.Size.Width<BR><BR>If I =
allocate=20
column widths such that the total of all column widths is equal to, say, =
dataGrid.Width, I still get a horizontal scrollbar. The difference =
between=20
dataGrid.Width and this total of all column widths is the width of say a =
3D=20
border, vertical scrollbar, etc.<BR><BR>Any=20
suggestions?<BR><BR>Kristin<BR><BR>Kristin Barker <BR>Principal Software =
Engineer <BR>Email: kristin_barker@natureserve.org=20
<BR>http://www.natureserve.org </FONT></BODY></HTML>
------=_NextPart_000_0008_01C356B4.FB15D580-- Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53283
Converting a Job into a VB.Net App
Hello All
I have a Job which used 2 Stored Procedure and runs on
SQL-Server 2000.I Need to write a Application in VB.Net to
do same work of JOB on a Application Tier instead of SQL-
Server.Any Hints Please.
Thanks Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53281
TabControl.TabPageCollection property "Item" missing
I am developing a form which uses a TabControl. I want
the code to be able to detect which TabPage is currently
active. The documentation indicates that the
TabPageCollection should have an "Item" property which I
think may be the way to do this, but the "Item" property
doesn't show up on this object in intellisense, and it
gives me an error on compile. The error is:
"System.Windows.Forms.TabControl.TabPageCollection' does
not contain a definition for 'Item'"
Any ideas? Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53280
Detecting Column Data Change without Leaving Row
I have a WinForms application that has a master DataSet with related
DataTables that various forms reference and bind to. I need to detect when
changes are made to the DataSet by a particular form so that the user can
choose to cancel or apply thoses changes (the Apply button is only enabled
after a change is detected, e.g. after they alter a value and then tab out
of the control). So I'm interesting in detecting changes made only to the
DataRows that that form's controls bind to for a specific BindingContext.
I've got it mostly working with one remaining issue. When there are multiple
controls on a form that reference the same DataRow, I have not been able to
detect a change to the row (e.g. when the user tabs to the next field)
unless the control gaining focus does not reference the same DataRow as the
control losing focus.
What I've learned from my experimenting with it is that the RowState is not
updated until I use EndEdit for the row. However, this only works after the
"row loses focus." As long as the next control still binds to the same
DataRow the DataRowVersion.Proposed doesn't exist and the EndEdit doesn't do
any good.
Please advise. Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53279
Problems with ImageList Control
This is a multi-part message in MIME format.
------=_NextPart_000_000D_01C35625.5D88C910
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I am developing a Windows Form application and I am experiencing issues =
with the following line of code.....
Me.ImageListCRSGroupImages.ImageStream =3D =
CType(resources.GetObject("ImageListCRSGroupImages.ImageStream"), =
System.Windows.Forms.ImageListStreamer)
The type of error I get is a System.TypeInvocationException
Can anyone help please?
------=_NextPart_000_000D_01C35625.5D88C910
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<DIV><FONT face=3DArial size=3D2>I am developing a Windows Form =
application and I am=20
experiencing issues with the following line of =
code.....</FONT></DIV></DIV>
<DIV>
<P><FONT face=3DArial =
size=3D2><STRONG>Me.ImageListCRSGroupImages.ImageStream =3D=20
CType(resources.GetObject("ImageListCRSGroupImages.ImageStream"),=20
System.Windows.Forms.ImageListStreamer)</STRONG></FONT></P>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial size=3D2>The =
type of error I=20
get is a <STRONG>System.TypeInvocationException</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Can anyone help=20
please?</FONT></DIV></DIV></BODY></HTML>
------=_NextPart_000_000D_01C35625.5D88C910-- Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53273
Databinding combobox
I have a windows form app that is bound to a dataview. If I add a combobox
(with the default style of dropdown) and bind its text property to a field
then everything is fine. If I now change the DropDownStyle to DropDownList
then the binding no longer works (data from the back end SQL doesn't get
displayed and if I select something in the combo then the update writes a
null value back).
I've tried binding to SelectedItem instead but that also doesn't work.
Anyone come up with a solution to this one?
--
Rob Oldfield
www.realuk.co.uk Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53272
How to iterate webcontrol document elements
Hi there,
I have an HTML page loaded in a webbrowser control which
is on a WindowsForm. I need to iterate through all the
object in the document from the winform code. I want to
retreive all textbox, combobox and any other element on
that page.
Thanks,
RC Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53267
Dataset Update che funziona in modo strano
Ciao ho una piccola anomalia, in un dataset. Ho una form di dettaglio
collegata con delle textbox a un database sqlserver tramite dataadapter,
dopo aver generato il dataset e le stringhe sql per aggiornamenti e
selezioni, mi si presenta il prblema. Tramite metodo fill riempio il
database, e poi aggiorno tramite il metodo update soltanto che il database
viene aggiornato solo se mi sposto al record successivo a quel punto riesco
ad aggiornare il database. Mi sposto tramite bindingmanager, è normale che
si comporti così. Insomma modifico e se salvo nulla, se mi sposto al record
successivo e salvo mi salva il record precedente. Come mai?
DaAccessori.update("DsAccessori,"T_Accessori"")
e si comporta come vi ho detto mah.
Grazie Ciao. Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53260
CheckBox in DataGrid
Hello all.
I have place a CheckBox in a DataGrid using the following
code:
DataColumn dcInclude = new DataColumn("Include?");
dcInclude.DataType = System.Type.GetType
("System.Boolean");
dtParams.Columns.Add(dcInclude);
The CheckBox column works and all is good, however, the
CheckBox has 3 states. Ticked, un-ticked and grey ticked.
Is it possible to have it so that the CheckBox only has 2
states (Ticked and un-ticked)?
Thanks people,
Jon Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53256
Custom Controls with VB.NET Standard?
Is there a way to create inherited custom controls in the Standard
Edition of VB.NET or is this only possible with the Professionel
Edition?
Please inform.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53255
Help please: RichText Control ActiveX and Load event
Please can anyone assist:
I try to use the Microsoft Rich Textbox Control 6.0 (SP4) on a winform
dialog, since .NET's RichTextBox has problems with legacy components I
have to use.
I added the ActiveX control to the toolbox and successfully can add it
to any Form I like, just like any other control.
When the form the richtextbox is on is the main form of the
application it seems to work ok, but as soon as I put it on a dialog's
form which is modally shown via Form.ShowDialog() suddenly my dialog's
OnLoad-event isn't called anymore !
I verified it by setting a breakpoint in VS.NET and even adding a
MessageBox.Show(), but I can't get the OnLoad-Event to fire.
Can anyone explain?
Completely clueless,
Martin Müller Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53254
calling a form in a different project
How do you instantiate and display a form that is in a
different project within the same solution?
I have a project full of Crystal Reports and one simple
form (clientCrystalViewer) that displays them. It seems
like I need to have the Reports in the same project as
this clientCrystalViewer form so I can manipulate the
dbconnection string dynamically (Its a Crystal issue).
Rather than put everyting in one gigantic project (I've
got 50 reports so far) I'd rather just call my
clientCrystalViewer (really just a dialog box) from my
project which holds all the rest of my forms.
It seems to me that this should be possible and easy, but
I can't find any documentation on it.
Any ideas?
Thanks Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53253
I've fixed my problem.
I had a problem with aspnet_wp.exe.I'm a newcomer to Web
developement.I've just read first two lessons of:
MCAD/MCSD Training Kit: Developing Web Applications with
Microsoft Visual Basic .NET and Microsoft Visual C# .NET.
I wasn't able to launch my WebForm from VisualStudio.Net
Academic because I received: 1) aspnet_wp.exe could not be
started. HRESULT for the failure: 80004005;2)aspnet_wp.exe
could not be launched because the username and/or password
supplied in the processModel section of the config file
are invalid. from error log.
Then I searched through Newsgroups and found:
Subject: Re: Can't access CDO.Message
From: "Lion Shi" <lionshi@online.microsoft.com>
I must say that I tried only step 1 of recommended
remedies below reported:
***********************************************
Please try these steps:
| >
| > 1. Find machine.config (usually under <windows
| > directory>\Microsoft.NET\Framework\v1.0.3705\CONFIG)
and edit the
| > <processmodel> section. Change the "userName"
attribute value to
"SYSTEM".
| >
| > 2. Edit the "web.config" file in the ASP .NET
project. Add the
following
| > line:
| > <identity impersonate="true" userName=<your user name>
password=<your
| > password> />
| >
| > The user name you provide here need to have the
permission to call the
CDO
| > component.
| >
| > 3. Restart the aspnet_wp.exe. You can also kill it
in Task Manager.
************************************
Then I launched WebForm1 I created yesterday in C# and it
works fine on my Microsoft Internet Explorer.
I didn't try other two steps because I don't know syntax
of C#,of HTML,and other scripts.I suppose for example that
these lines:
<!-- GLOBALIZATION
This section sets the globalization settings of
the application.
-->
written mostly in green,are comments,but I'm not sure...
Anyway,thanks to Lion Shi,and I hope to find other useful
hints if I'll need more.
Thanks
Mr. Trevisan Andrea Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53246
Getting the active window
Hi,
Is there any way to get a reference to the currently
active form in .NET (even if it is another application)?
Is there then any way to give that form focus? (even if
it is outside of the .net application?
Thanks,
Paul Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53245
Maximise or show a window without giving it focus
Hi,
Is there a way of maximising a form without having it
grab the window focus?
Thanks Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53244
Embedding icons
I want to embed some icons into my application and then use these icons for
specific file extension.
How can i do this?! Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53236
DataGrid Q: How to force a column to go muti line if necessary to handle the text
I want to have all my columns visible in the window. I've found out how to
disable the column resizing, and even to force the horizontal scroll bar to
hide itself. What I dont know (if it can be done in the WinForms control)
is how to force a cell to go multi line if necessary to show text. I've
seen it done in the Web DataGrid.
For the edification of everyone, here's how to disable column sizing, and
hide the horizontal scroll bar. This, when combined with proper sizing of
the columns, puts everthing on the screen for you:
Do do any of this you must derive your own DataGrid and override stuff.
To make the columns fixed (to prevent the user from increasing their size
and necessitating a scroll bar) you must override OnMouseMove and
OnMouseDown and stop it from calling the base class when a column resize is
being done. To force the scroll bar to hide, hook into the VisibleChanged
event and force it to hide there.
public class MyDataGrid : System.Windows.Forms.DataGrid
{
public MyDataGrid()
{
this.HorizScrollBar.Visible = false;
this.HorizScrollBar.VisibleChanged += new
EventHandler(HorizScrollBar_VisibleChanged);
}
protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
{
DataGrid.HitTestInfo hti = this.HitTest(new Point(e.X, e.Y));
if (hti.Type == DataGrid.HitTestType.ColumnResize)
{
return; //omit base class call
}
base.OnMouseMove (e);
}
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
{
DataGrid.HitTestInfo hti = this.HitTest(new Point(e.X, e.Y));
if (hti.Type == DataGrid.HitTestType.ColumnResize)
{
return; //omit base class call
}
base.OnMouseDown (e);
}
private void HorizScrollBar_VisibleChanged(object sender, EventArgs e)
{
if(this.HorizScrollBar.Visible == true)
{
this.HorizScrollBar.Hide();
}
}
} Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53223
Windows Forms Dynamic Properties - Running on a Web Server????
I got in to a situation where we are planning to deploy our WinForms
app in to a web server.
We have dynamic properties already in it, and an XML file to read
certain configurations.
I know that this will give me an exception indicating that it could
not find the the files locally.
Is there a way to run a WinForms app that runs on the web with an
app.config, and an XML file? If so, where would I be able to put it on
the local machine. Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53221
Events - publish/subscribe and GC'ing
In my application the main thread my create several worker threads that will
create additional objects. These additional objects become "publishers" and
the main thread object (amongst others) then can "register" to receive the
events.
My question is, what happens when the "publisher" object completes it's work
and disappears? Do I need to first broadcast a "please unregister" message
to the subscribers? When the publisher goes away, if the subscribers
haven't unregistered, will this create a leak and/or prevent the GC from
collecting the now demised publisher object?
Thanks! Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53218
rotate label
Hi,
How do I rotate a label in a windows form? Is it
possible to do so?
Please help, thx! Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53212
Vertical label
Hi,
Is that possible to rotate a label in a windows form? I
want to have it written from top to bottom.
Please help. Thanks. Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53211
How to associate icons with menu items
Does anyone know a quick and easy way to place icon images in menu items of
a MainMenu control? This is usually an effortless task for other controls
using their ImageList properties, which is not available for MainMenu. The
only way I can find is to set the menu item's OwnerDraw property to true and
write code to handle the MeasureItem and DrawItem events.
TIA for any input.
Joyce Liu Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53205
C# Get username (htaccess) when the winform application starts
Hi,
My winform application is accessible via an intranet. To access to
this intranet, I need to enter my login and password. I would like to
get the login in my application to identify the user.
The intranet login type is htaccess and the password type is
htpassword.
Here is my code :
public Form1(string htaccess,string htpassword)
{
// Requis pour la prise en charge du Concepteur Windows Forms
InitializeComponent();
this.user=htaccess;
this.pass=htpassword;
}
static void Main(string[] args)
{
if (args.Length<2)
{
Application.Run(new Form1("",""));
}
else
{
Application.Run(new Form1(args[0],args[1]));
}
}
Actually, I don't know how to obtain this username from the intranet
with this code.
Thanks for your help!
Mathieu Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53201
How to Display 2 lines in 1 row?
Hi,
I need to display in the datagrid 2 lines for each row,
but I can't find the way to do it. I need to do something
that look like this:
ID/Name | State\Country |---> Header
12 | FL |--->Row1
Charles | USA|--->Row1
23 | IL |--->Row2
Viktoria | USA|--->Row2
Any Idea??
Thanks Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53200
Splash Screen Problem
Hi,
I'm having a problem with a windows application in VB.NET.
It is an MDI application, and I have just added a splash
screen that is displayed in the beginning of the
constructor of the mainform, and then is hidden at the
end of the constructor (after all the init is done for
the mainform).
The splash screen has a background image that fills all
the form. There is also 4 labels on top the the
background image. The problem is that for some reason,
when the splash screen is displayed, the labels are not
displayed. In fact, instead they act as if they were
transparent, so I see whatever is behind the form on my
desktop.
Any idea what can I do for this?
thanks,
Ross Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53199
DataGrid row HasErrors
I am creating my own DataGridTextBoxColumn class and I want to display an
"Error" icon when the dataset row has errors. How would I check to see if a
datarow has errors (.HasErrors) from the paint event of a
DataGridTextBoxColumn class. I tried using
Dim strErrorMessage As String = CType(source.Current,
DataRowView).Row.RowError.ToString
but this just looks at the currently selected row.
Any help? Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53198
OpenFileDialog
Hello,
How use OpenfileDialog in page ASPX?
OpenFileDialog is good in Windows application but isn't good in project
"Application Web ASP.NET"
Thanks Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53197
MDI Problems
HI!
I've got following problem: I got an app which mainly consists of one
main window. There serveral other windows (which I use for settings),
but there's also one important data-form. The main windows must not be
closed, the other windows must not be modal, they also must not be
AlwaysTop and they also are not allowed to become "invisible" (main
window covers it, cause of operation in main window (to get information
for child window)).
So I've choosen to convert my sdi to mdi. My main window is child
of another window and should always be maximized. Thats my first
problem, cause it doesn't help to cut off the min and max button
(resizing through dblclick on title bar) and I can't make my main
windows the parent window cause it holds several controls and
when I'm showing the child (property/data window), I can't see
anything from the child.
Most of my property windows are created dynamicly through a database,
the size of the window is handled and the Style is set to fixed 3d,
but it got maximized. How can I prevent this?
I'd be very grateful for your answers
Bernhard Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53194
MDI Form
How can I make sure that only one instance of a child form can be opened at
a time ?
Thankyou Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53188
RowSelect Disabled Datagrid
Hi Everybody,
I have been trying to create a Datagrid wherein
1) the first row is selected by default when the Form Loads.
(Easily done with dg.Select(0))
2) user cannot tab into any column.
ie. unlike the default behaviour which is when the current cell
gets focus,
the existing text inside it is selected and cursor is at the end of
the
textbox.
I can state it alternatively as "the column should not get focus"
3) When user clicks any other row with mouse or moves in the datagrid
using
keyboard, the new row shall get selected.
For this, i have hooked into CurrentCellChanged event to get the
new row
and select it.
My problem is
1) When user presses Tab in the DG, the focus moves along the columns
and
which ever column gets focus, the text in it gets selected and text
within
it gets selected.
I have the row selected, but this columns display is not consistent
with
rest of the columns.
2) As soon as the DG looses focus, the row gets de-selected.
For eg. a Messagebox popup and the row gets de-selected.
3) If user presses tab on the last column of the last row, there is no
row
selected.
My dg.select(rownum) has been coded in CurrentCellChanged so, a row
shall be
always selected. But its not so!!!
As an example of what i want to achive is exactly as implemented in
TASKVISION sample application provided at
http://www.windowsforms.net/Default.aspx?tabindex=7&tabid=44 .
I have gone through the source code of this sample and have set the
properties
of my DG exactly as in the sample, created my TableStyle and
GridColumnStyles dynamically.
Cant Figure out what to do more.
Anybody got ideas/solutions?? Tag: Need to write a App to read a Ftp and a Stored Procedure Tag: 53185
Hello All,
I would like to write a VB.Net App which reads Ftp and a
Stored Procedure.Any Idea.?