RichEditBox speed
Is there anyway to speed up the selecting and coloring of text in a
richedit. The parsing of the text is nothing in comparison with how long it
takes these two calls to take place (over many lines):
rtb.Select(currentPos, myLine.Length);
rtb.SelectionColor = myColor;
From my research, there are a few ways to speed up the richedit but none of
them help speed up the coloring process:
1) Inherit from the RichEdit and in an overloaded WndProc, ignore WM_PAINTs
while updating
2) Use SendMessage to pause redraws/events (EM_SETEVENTMASK, SETREDRAW)while
updating
3) Hide the RichTextBox while updating (seems to work the best...but it is
still slow)
Does anyone else out there have any better suggestions? I want to color the
entire richeditbox in one sweep...so I don't have flickering or other
noticeable side-effects caused by scrolling. I'm not looking to use a 3rd
party control either for a number of reasons.
TIA!
sb Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99769
State of MdiClient
Hi,
I'm developing an MDI application and i am having a problem: how do i
know the state of MdiClient; what i mean is: when i maximize a MDI
child, then close it and then open a new MDI child, it will open
maximized, then if i change it's state to Normal and close, then next
opened MDI child screen will have state Normal.
So i assume that MdiClient keeps state of MDI child windows even if none
of child forms exists at the moment. How do i find that?
Thank you,
MuZZy Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99764
Adding 'object' to Treeview?
I have a bunch of related classes that I want to add into a Treeview
with a hierarchy. However, Treeview doesn't support the insertion of
the root 'object' type into the nodes, which surprises me. I just
wanted to add them in and have the mouse events fire back with the
reference to the object clicked on. I figured I'd have to override
ToString in my classes to have them show up in the treeview in the
right way and that would be that.
But to my surprise it doesn't seem to work like that and it seems like
I have to start messing with data binding... which just seems so
overkill for the task that it must be the wrong thing to do.
Can't I just add 'object' types like I can to the collection classes?
What should I be doing instead?
Thanks for any help! Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99761
Is the computer locked?
Is there a way using the .NET framework to find out if the machine a service
is running on is locked by the user? Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99760
How to Package and Deploy Windows Installer 3.0
I have made setup project (VS 2005) that includes setup of my app and
Framework 2.0
How can I check if there is installed Windows Installer 3.1 and if not to
install it?
I know that I have to add launch condition, but don't know what to type in
properties.
Thanks Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99756
ReportViewer - Multiple forms or Single form
I have finally got the hang of this ReportViewer control. The one
question that I have is dealing with multiple reports. If I have, lets
say, 10 rdlc reports should I have 10 WinForms to put them on, or put
them on one form and programmatically choose which rdlc to use.
I have been doing the second option but have been running into some
weird data binding sharing issues.
Any thoughts/suggestions? Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99754
Notification Icon
Hi group, is there a way to make a Notification Icon object available
for the entire application?? because, for example, if i have a MDI form
(i'm using VS 2005) with a Notification Icon object, and display a
modal dialog, the click event on the notification object will not fire
while the modal is active. Any suggestions?
Thanks in advance Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99752
Serialization
hello,
i want to do the following:
I have an extender provider which is serialized correctly. the vs designer
generates the following code for a button for example:
myButton.SetMyProvider(this, new MyItem());
Now what I want to do is that he creates a new class first. this class
called MyItem has a collection. so i want that the code is generated like
the following
MyItem Item1 = new MyItem();
Item1.MyCollection.Add(new MyChildItem());
Item1.MyCollection.Add(new MyChildItem());
myButton.SetMyProvider(this, Item1);
Is it possible to get the objects serialized a way like that? Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99750
Using System.Web.Mail.MailMessage in Windows Forms
Hi,
I've written a small proof of concept application to show we can send emails
in VB.NET and it works a treat using this piece of code:
Dim myEmail As System.Web.Mail.MailMessage = New
System.Web.Mail.MailMessage()
myEmail.From = txtFrom.Text
myEmail.To = txtTo.Text
myEmail.Body = txtBody.Text
SmtpMail.SmtpServer = ""
SmtpMail.Send(myEmail)
But if I specify a mailserver in SmtpMail.SmtpServer I get this error:
Could not access 'CDO.Message' object.
Why does setting SmtpMail.SmtpServer = "" send the email?
Does this mean that using System.Web.Mail.MailMessage is reliant on having
Outlook or Outlook Express installed (Currently I have Outlook 2003
installed)?
Thanks
Darren Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99748
Slow Rendering on Windows Forms when I am using graphics as backgr
Hello,
I am trying to build a KIOSK application, where all windows forms are filled
with graphics images and a lot of buttons.
The major bproblem is that when the application is running and the forms are
ready to display on the screen I see a lot of cuts... for example when I show
a form that has a background image (800x600) and about 20 buttons on it,
which each of the button has a background image, the render on the screen is
not the recomended....!
Is there any technique that I could do the rendering smoother and faster???
Many thanks
George Barbagiannis
P.S. Computer 2.4G 1GB 128MB VGA Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99741
Windows forms Datagrid cell text
Hi,
I am trying to write some code that will return the text from a datagrid
cell when you click on it. So far I have the following code (which maybe
completely the wrong way to go about this), which returns the row number,
and the column number, but I am not sure how to get the contents of the cell
from this.
///
Private Sub dg1_MouseUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles Dg1.MouseUp
'Returns the room for the datagrid row that has been clicked
Dim pt = New Point(e.X, e.Y)
Dim hti As DataGrid.HitTestInfo = Dg1.HitTest(pt)
If hti.Type = DataGrid.HitTestType.Cell Then
MsgBox(hti.Row & " " & hti.Column)
Endif
///
Thanks
Richard Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99736
How to get mouse event when using DesignSurface?
Hi all,
When I use DesignSurface and DesignSurface Manager to build a Designer, I
only can use SelectionService's SelectionChange event to know which component
is selected. But I don't know how to get mouse click in the component.
Becuase I want to show a contextmenustrip in each component.
Thanks, Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99733
Email and .NET
Hello,
I am trying to format an email and have a .net application open up Outlook
or Outlook Express so that the user can simply click Send and have the
formatted email send from their email account. I am currently doing this
the following way:
Dim sParams As String
Dim TheTo, TheSubject, TheBody As String
TheTo = txtEmail.Text
TheSubject = ""
TheBody = ""
sParams = "mailto:" & TheTo
sParams = sParams & "?subject=" & TheSubject
sParams = sParams & "&body=" & TheBody
System.Diagnostics.Process.Start(sParams)
The problem this is that it creates a new instance of Outlook every time the
event is fired to create the email. All I want is for a new email to appear
and add the data that I want. After about 6 or 7 emails are created this
way, Outlook freezes up and stops working.
Any suggestions will be greatly appreciated,
This is vb .net.
Chuck Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99730
Edit different data types in a DataGrid in the same column on different rows
Hi All
Hopefully someone out there can answer this. I have a data source that
displays a set of property names and values (each name/value pair will
be displayed on a different row).
I want to be able to enable the data source to be edited through the
grid, but each of the values on different rows may be a different data
type.
I know I can apply a column style to set a whole column to display a
ComboBox for a selection, a DateTimePicker, etc., but I'd like to know
if there's a way to apply the style on a row-by-row basis. In doing
this I should be able to display all the property name/value rows and
have a different edit mode control appear for the value in each row
depending on its data type.
I should not neglect to mention that the data type of the value column
can be defined programatically, as it's also held in the data source to
describe the type of data in the value column.
Can anyone please advise if this is possible, or if you'd like more
information to clarify the problem.
Thanks in advance,
Sam. Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99728
clicking MDI child does not activate form...
Clicking an mdi child form will not activate the form unless I click on
the sizeable border or title/caption bar. Sometimes it works correctly
and I can click anywhere on the underlying child form and it pops to
the front. Other times, I can type in text boxes of the child for,
drop down combox boxes, etc, while the child form remains behind other
forms. Gotta love .NET, right?
I have noticed countless other posts on this topic going back to 2001,
but no resolution.
Has anyone been able to track down the cause for this behavior? Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99725
studio deleted my resx file, and now it won't rebuild it properly!
I'm using Visual Studio 2003. I have a C# Forms app with several forms.
While working, Studio asked to check the .resx file of a particular
form out of SourceSafe. It then completely erased the .resx file,
leaving the form empty in the Designer. However, all the code is still
in the .cs file!
Most solutions I've found say to delete the offending .resx file, and
Studio will rebuild it for you. Unfortunately, that's not happening
here. I close the form, delete the file, and try to reopen the form,
but it comes up with a blank form again.
This is EXTREMELY frustrating. Does anybody know how to fix this?
Lee Crabtree Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99724
CheckedListbox and CheckOnClick
I am working with the CheckedListBox and trying to get it to perform
functionality similar to the Windows Explorer Choose Details window. The
one thing I can't get to work is with the clicking on the checkbox part to
autocheck. I can set the CheckOnClick to true, but I don't want it to
autocheck if I click on the text part. Only if I click on the checkbox
part. Anybody have any ideas on this?
Lance Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99722
translucent panel...
i need to be able to adjust the opacity of a Windows Forms 'Panel' control.
currently, this is available on Forms, but not on Panel controls. can
someone please show me a trick to make this happen with panels or any other
control that i can use without having to display another Window/Form?
much appreciated,
ben Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99721
Multithreading in Form
Hi All,
I am new to C# thread programming. I got one issue. I appreciate if
anybody can point what i am doing wrong here.
I have created one C#.NET application (VS.NET 2003 and 1.1 Framework).
It contains two forms. (Form1 and Form2)
Form1 contains only one button.
On click of this button two threads will be created.
This thread will just display the Form2.
Form2 contains only one ActiveX control(Created by me, Works fine in single
thread app for last 3-4 years).
When i excute this application, if i click on the Button on Form1, Threads
are created and it shows the Form2 and ActiveX control. So far its fine.
When i close the Forms created by the thread it crashes.
When i use the Debuger it says "User Break Point Called" and Call Stack
shows following :
NTDLL! 7c901230()
_CrtDbgReport(int 2, const char * 0x5f4d0cf0 THIS_FILE, int 374, const char
* 0x00000000, const char * 0x00000000) line 353
AfxAssertFailedLine(const char * 0x5f4d0cf0 THIS_FILE, int 374) line 39 + 20
bytes
AfxWndProc(HWND__ * 0x0141056a, unsigned int 8, unsigned int 16057944, long
0) line 374 + 21 bytes
AfxWndProcDllStatic(HWND__ * 0x0141056a, unsigned int 8, unsigned int
16057944, long 0) line 57 + 21 bytes
USER32! 77d48734()
USER32! 77d48816()
USER32! 77d4c63f()
USER32! 77d4c665()
SYSTEM.WINDOWS.FORMS! 7b823b1e()
SYSTEM.WINDOWS.FORMS! 7b823a2b()
SYSTEM.WINDOWS.FORMS! 7b896ca4()
SYSTEM.WINDOWS.FORMS! 7b82291b()
0096453a()
USER32! 77d48816()
USER32! 77d4b4c0()
USER32! 77d4b50c()
NTDLL! 7c90eae3()
USER32! 77d48734()
USER32! 77d5418d()
USER32! 77d53fd9()
USER32! 77d5b82a()
USER32! 77d54e28()
USER32! 77d561b3()
USER32! 77d6a92e()
USER32! 77d6a294()
USER32! 77d95fbb()
USER32! 77d96060()
USER32! 77d80577()
USER32! 77d8052f()
__crtMessageBoxA(const char * 0x032fb9c8, const char * 0x102579a0 `string',
unsigned int 73746) line 65
CrtMessageWindow(int 2, const char * 0x5f4d0cf0 THIS_FILE, const char *
0x032fcafc, const char * 0x00000000, const char * 0x032feb20) line 520 + 22
bytes
_CrtDbgReport(int 2, const char * 0x5f4d0cf0 THIS_FILE, int 969, const char
* 0x00000000, const char * 0x00000000) line 419 + 76 bytes
AfxAssertFailedLine(const char * 0x5f4d0cf0 THIS_FILE, int 969) line 39 + 20
bytes
CWnd::DestroyWindow() line 969 + 21 bytes
COleControl::OnFinalRelease() line 358
CCmdTarget::InternalRelease() line 223
CCmdTarget::ExternalRelease() line 234
COleControl::XQuickActivate::Release(COleControl::XQuickActivate * const
0x03356630) line 69
OLE32! 7750de71()
OLE32! 7750dbd2()
OLE32! 77554a4f()
OLE32! 77554a30()
OLE32! 77564daf()
OLE32! 7750221e()
OLE32! 77502171()
OLE32! 774ff221()
OLE32! 774fee88()
OLE32! 775131f0()
OLE32! 774fd141()
OLE32! 774fd0e9()
NTDLL! 7c9011a7()
NTDLL! 7c919213()
KERNEL32! 7c80cce7()
KERNEL32! 7c80b511
My C#.Net app source code looks like this:
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
void MyThreadFunction()
{
Form frm = new Form2();
//Show the Form which contains the SymFacX. Here "using" is the keyword
which will release the frm object(Form2) once its job is done.
//If we didnt release this frm object. ActiveX will throw an excetion. As
SymFacX will try to delete itself but still frm object contains the reference.
using(frm)
{
frm.ShowDialog();
}
//frm.Dispose();
//GC.Collect();
}
private void button1_Click(object sender, System.EventArgs e)
{
//Create Thread
newThread1 = new Thread(new ThreadStart(MyThreadFunction));
//Start the Thread
newThread1.Start();
//Create Thread
newThread2 = new Thread(new ThreadStart(MyThreadFunction));
//Start the Thread
newThread2.Start();
}
private void Form1_Closing(object sender,
System.ComponentModel.CancelEventArgs e)
{
newThread1.Join(0);
newThread2.Join(0);
Environment.Exit(0);
} Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99720
Setting combo box items property?
I am building a user control that has a combo box (comboBoxMain) as a
constutient control. The user control has an Items property, which will set
the items of the combo box. I want the user control Items property to be
browsable at design-time, so the user of the control can click the
properties, enter a list of items in the String Collection Editor and have
them appear in the combo box.
Here's the code I'm using now:
[Browsable(true)]
[EditorBrowsable(EditorBrowsableState.Always)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor("System.Windows.Forms.Design.StringCollectionEditor,System.Design",
"System.Drawing.Design.UITypeEditor, System.Drawing")]
[Description("The list of objects in the combo box")]
public ComboBox.ObjectCollection Items
{
get { return comboBoxMain.Items; }
set { comboBoxMain.Items = value; }
}
The Editor attribute brings up the String Collection Editor, but it isn't
retrieving any items I place in the combo box. And nothing that I enter in
the editor is making it back to the combo box.
What do I need to do to complete the connection between the user control
Items property and the combo box Items property? Thanks.
--
David Veeneman
Foresight Systems Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99716
No touch deployment - internet cache full
We have had a few instances in our organization that the user was unable to
run a no-touch deployment exe from our intranet. Clearing their full
internet cache corrected this problem.
This happened in 2 scenarios:
1. When trying to run the no touch .exe over the intranet would do nothing.
2. When trying to run the .exe over the intranet the user would run their
old cached copy of the application and not download the latest from the
server.
In both scenarios clearing their internet cache and launching the
application again corrected this problem.
I thought the idea with internet cache is First In, First Out... in thus...
cache would be cleared to accomodate new temporary internet files. Is this
correct or is there an issue with no-touch deployment in this regard.
Has anyone else ran into this problem, and if so what solutions have you
come up with. Remember we have a large organization and no touch deployment
applications are being used by 100+ individuals. One way I know would be to
write a login script to clear the internet cache... of course.. not every
user will reboot their PC every night... and isn't ideal for other reasons.
Thanks in advance... Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99715
ConfigurationManager app.config
Dear Friends,
I have been trying to get the following to work properly, but with
little luck. I have created a class that inherits from ConfigurationSection.
I then added a <configSections> ... <section name="test"> in a new
app.config (which I added manually to my project). It seems to be able to
read the app.config, but not write back to it. I seem to have a
partial/temporary working config file that is created in the bin\debug
directory called XXX.vshost.exe.config. It seems to temporarily store the
proper values when I save the settings, but seeing that it is rebuilt
dynamically everytime the application is run, I lose all settings. What gets
to me is that the settings are not written to the app.config file. I get no
errors when I execute .Save method. Just no info is written.
Does anyone have an example in VB.NET or a guide/tutorial, etc... In
essence, I want to use my ConfigurationSection derived class to be able to
load and save a custom section in the app.config file as I have seen others
do, but can't get it to work myself. Also, any help on how to properly set
up an app.config file with the <configSections> etc... properties.
Regards,
Giovanni Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99713
Data binding a ListBox to a List<T>
I have 2 list boxes on the form. Each listbox is bound to a different
List<T>. My goal is for the user to select an item in ListBox1, click
a button, and have that item moved to ListBox2.
The way I approached this was to have a populated List<T1> bound to
ListBox1. I set the DataSource, DisplayMember, and ValueMember
properties of ListBox1 and the items in the List<T1> were correctly
shown in the listBox. I bound ListBox2 to List<T2>. Since List<T2>
had nothing in it, ListBox2 correctly showed no items.
I thought that if I removed an item from List<T1>, that ListBox1 would
update to reflect that but it doesn't seem to work that way.
Similarly, I thought that by inserting an item into List<T2>, that the
ListBox2 would update to reflect the addition. It does not seem to
work that way.
How can I get the ListBoxes to update and show the current contents of
their respective List<T> objects?
Is there a way to "rebind" them?
Thanks,
Chris Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99712
Create something of ContextMenuStripItem type ????
f I can declare a menu item as :
Dim mnuItem As MenuItem
then why cant I declare something of ContextMenuStripItem type.
There is a collection of items for a contextmenustrip.!!
I have a method :
private void NewLoad(object sender, System.EventArgs e)
{
//I need to do something like
MenuItem mn = (MenuItem)sender;
}
In debug when I hover my mouse over "object sender" I get
"[System.Windows.Forms.ContextMenuStrip], Name: contextMenuStrip1, Items: 6}"
I am baffled Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99704
Disable ArrowKey
Hello,
I have a datagrid and I would that if I press an arrow key (up and down) the
cursor don't move up and down on the datagrid.
There is a solution for my problem?
I have used keypress and keyup but don't capture the arrow keys.
Only KeyDown capture ArrowUp and ArrowDown but e.Handler = True don't avoid
the event "press arrow key" and the cursor move in the datagrid.
Thank you
Marco Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99703
Move Files
I have directory say C:\d1. It has a file say f1.
I have to move this file to a sub directory under c:\d1. i.e., I have to
move f1 into C:\d1\d2.
I use fileSystemInfo.move for this but I get an error as follows -
{"The process cannot access the file because it is being used by another
process."}
how do I move.
I tried to copy the file and then delete...same problem.
any solutions? Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99701
Open SDI form from MDI Parent
I have an application that has a main mdi parent window to navigate and
perform basic function. I need the mdi window to accomplish everything I
need in there. I also need to be able to open up records in a new SDI
window. When I attempt to open the form it is not given focus and is opened
behind the mdi parent form. How do I give it focus and have it be opened on
top. I do not want it always on top. Just when it opens. Here is my code.
Dim exists As Boolean = False
For Each f As Form In My.Application.OpenForms
If f.Tag = nodeTag.Substring(1) Then
exists = True
f.Activate()
End If
Next
If Not exists Then
Dim act As New frmActivities
act.Tag = nodeTag.Substring(1)
act.Show()
act.Activate()
End If Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99695
Cannot print a PrintDocument
Hi,
I not beeing able to print a document created using PrintDocument. I can
preview it, but when I try to print it, I receive an "Invalid Parameter"
exception in a "DrawString" method execution.
I tried changing the default printer and the printer settings but it
didn't work.
What can I do to make it print?
Thank you,
Roby Eisenbraun Martins Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99691
deriving DataGridTextBoxColumn - behaviour on new rows
Hello
I have derived a class from DataGridTextBoxColumn and am getting some
behaviour which I do not understand and I would like to know where I am
going wrong.
The problem is like this. I have a datagrid, lets say with four
columns. Two columns have my derived style and two have the default
DataGridTextBoxColumn. When you make changes to the datagrid there is
a button to press to validate and then send the changes back to the
database to be written. The problem comes when you click in the "new
row" at the bottom of a datagrid (the blank row with the star in the
header). If you click into and then straight off the default
DataGridTextBoxColumn in the new row, the UI indicates that no new row
has been created, and if you then save the changes, no new rows are
added to the database. However when you click on and then away from
the derived class, the UI performs in the same way - it appears as if
there are no new rows added, but when you click save changes you get a
new row written to the database - with all the row default values.
This implies that the row was created in the underlying DataTable, but
that fact was not reflected in the UI of the datagrid. For reasons
that I shall not go into this is a big problem for my application.
What I would really like to know is what I need to do to get my derived
column style to behave in the same way in this situation as the
DataGridTextBoxColumn. I.e. click on and away - the UI implies that no
row has been created and that is in fact the case when writing changes
to the database.
Thanks in advance for any light that can be shed on this issue! I've
been reading lots of articles on MSDN but none that I have found seems
to cover this situation!
Best Regards
David Smith Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99688
Fereshing an open form
Hi
I want to refresh the data in an open form from another form by calling a
procedure.
Is this possible?
thanks
Jonathan
--
===============
Jonathan Crawford
jc@tgsi.net
=============== Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99687
Hi
Hi,
I have made setup project in my solution.
I would like to include Windows installer 3.1 (since it is needed for
installations) and runtime of Framework 2.0.
How to do include runtime of Framework and and Windows Installer in setup
package?
I don't want when installing my program to connect to internet and download
this components.
.NET Framework Launch Condition
In help says: if you are distributing your application on CD-ROM, you should
include the redistributable file on the CD and change the InstallUrl
property to a relative file path.
If my solution is in folder C:\MySolution , what should I write in
InstallUrl property, so that it is a relative path.
Thanks in advance,
John Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99686
ClickOnce Install returns XML
I have deployed an application with ClickOnce Publish wizard to a web site.
But when I click web page Install button the web server just returns the
content of the .application file as XML to the browser on my own client.
I made a quick try on two other clients and it seems that they are capable
to interpret the web page correct .....
it is really a strange issue. trying the following command
line in cmd.exe:
rundll32.exe dfshim.dll,ShOpenVerbApplication
http://www.xxxx.com/ConfigurationTest/ConfigurationTest.application
Note: replace
"http://www.xxx.com/ConfigurationTest/ConfigurationTest.application" with
your clickonce application's deploy manifest URL.
With this we can determine if the client side's dfshim.dll works well with
the *.application files. However, even with dfshim.dll information, it is
still hard for us to troubleshoot out this issue. Maybe we need re-install
the Win2000 machine...
This works....
Ok, I think you may first download the *.application file to the local
disk, then double click this application file to do a test. Once your file
association is correct, it should display the clickonce checking dialog.
This works...
I think there is more of a problem here. I am getting the same results on
windows xp pro machines. I tried it on 3 different machines. The only
machine
that is able to install the application from the publish.htm is windows 2003
server that the application was publish from.
But not an any (at least the 4 i've tried) xp pro machine...
Ideas? Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99684
reading data from a datagridview
How can I read data rows from a datagridview and insert it into the
database. Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99683
window size and position - FixedToolWindow
Hi,
I'm using C# in VS2003 with .Net Framework 1.1 sp1 installed.
I have a tool window that is sized and positioned to cover a certain part of
another window. On my desktop machine this works perfectly however when I
run it on my laptop the window is neither the correct size or position. If
I close it and open it again it is moved slightly dwon and to the right each
time. The size seemingly has nothing to do with the size the window is set
too, all the controls appear in the correct place and size though.
So I thought I must be using a different version of the framework on both
machines so I spent ages making sure everything was the same version and as
far as I can tell they are.
If I take the version compiled on the laptop and run it on the desktop it
works so it would appear that it is something to do with versions rather
than the code but I'm clueless.
My window uses FixedToolWindow and I've noticed that even at design time on
the laptop its not showing a short title bar like a tool window should have.
Has anyone come across this before? Please help!!
I'm so annoyed because I thought I'd do this project in C# because it would
be quick and easy but now I'm left wondering why if I cant give my client
something that works identically on different machines why I didnt just do
it in C++. I'm sure I wouldnt be having this problem then!
Regards
Josh Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99678
Keydown Event
A tab control receives all Keydown events when a key is pressed in any of the
controls on the Tab control. Is it normal behaviour? Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99677
Blank DataGrid
Hello:
This must be quite simple! But I couldnt figure out whats wrong:
I have this following code, and I still see a blank datagrid:
Imports System.Data
Imports System.Data.SqlClient
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim conn As New SqlConnection("****")
Dim da As New SqlDataAdapter("Select * from tblNote where CDID
= 55", conn)
Dim ds As New DataSet
Dim dt As New DataTable
da.Fill(ds)
If (ds.Tables(0).Rows.Count > 100) Then
dt = Get100Rows(ds.Tables(0))
End If
dt.AcceptChanges()
Dim dv As New DataView(dt)
Try
DataGridView1.DataSource = dv
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Private Function Get100Rows(ByRef dt As DataTable) As DataTable
Dim dt1 As New DataTable
Dim i As Integer
For i = 0 To 99
dt1.ImportRow(dt.Rows(i))
Next
dt1.AcceptChanges()
Get100Rows = dt1
End Function
End Class
I can see that the DataTable dt has 1000 rows. The datagrid does get
populated if I were to have Tables(0) of the DataSet ds as the
DataSource.
TIA.
Skandy Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99671
DataGridView Columns Collection Editor
Hello
I am creating a UserControl that has a DataGridView control as a member.
I want to expose the column collection of the DataGridView, as a property of
my control.
in my code I have:
[Browsable(true)]
public DataGridViewColumnCollection myDGVCC
{...
but I get the generic collection editor, not the editor the normally is
invoked when modifying the columns of a DatGridView control.
Is there any way I can set the Columns property of my UserControl to use the
proper editor.
Thanks in advance
(Sorry for cross posting, not sure for the best place, and my english to) Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99670
VB6-MDI child in .NET application
Is it possible to integrate a VB6 MDI child form into a .NET
application? How is it done?
Thank you
Karl-Heinz Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99668
How to catch clicks on contained controls in the form.
I would like to capture, in my form, any mouse clicks on controls contained
in the form.
I know I can do this using a mouse hook, but that has a few problems with
catching clicks on dialogs the form owns that I have not been able to work
out.
I want to catch the click, so I can lock the data source, and then let the
click go on its merry old way.
Any simple solutions that I am overlooking?
Thanks,
/ken Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99666
Open Non-Modal Form from MDI Application
I have an application that has an MDI main page. I would like to open up
multiple non-modal forms for some of the items within that MDI application.
Essentially, I want to open SDI forms from and MDI main application. I have
the forms open, but they don't open up on top and with focus. I need to know
how to have them open on top with focus. Here is the code I have.
Dim exists As Boolean = False
For Each f As Form In My.Application.OpenForms
If f.Tag = nodeTag.Substring(1) Then
exists = True
f.Activate()
End If
Next
If Not exists Then
Dim act As New frmActivities
act.Tag = nodeTag.Substring(1)
act.Show()
act.Activate()
End If Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99661
Adding Control to a Form from another thread
In the background I want to load some control after form loaded.
I tried threading but it does not allow me to add control because current
thread have not created the form.
Also please tell me what BackGroundWorker control suppose to do.
How do I do it.
Please advise me.
Thanks, Dan Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99658
ClosingEventArgs 'Cancel' member already set to true by framework
I'm having a difficult time trying to track this issue down. Hopefully,
someone might be able to share some insight.
I have a situation where a form is not closed when I explicitly call Close()
on it. As part of trying to debug this problem, I overrode the "OnClosing"
method (and OnFormClosing, too) and noticed that the 'Cancel' member of the
ClosingEventArgs parameter is already set to true upon entering and before I
explicitly forward the call to base.OnClosing(). If I force Cancel to be
false, then the form will close without a problem.
Does anyone have an idea why the framework is setting Cancel to true?
It is difficult to reproduce the problem with a small example. What I can
tell you is that the form in question is a TopLevel (and TopMost) form with
the Owner property set to an MDI child. The TopLevel form has a splitter
control that houses two child forms... however, I remove the splitter control
from the form before I call Close() (the form then contains no child
controls). This is the point where the form fails to close. Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99657
Clipboard events
Hello ,
Does any one know if the clipboard fires any events (oncopy, onpaste)?
I would assume it does. If so, how would an application handle such an
event? The clipboard class itself does not have one. I am looking to change
the state of a button in my app when another app pastes something on the
clipboard.
Any help is greatly appreciated! Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99656
set a NotifyIcon to "Always Show"
Hi,
I've got an application that, when minimized, displays a NotifyIcon in the
System Tray.
Is there anyway to get that icon to be set to "Always Show" in WinXP?
What I mean is, XP allows the user to classify icons in the system tray as
"Hide when inactive" (default), "Always Show" and "Always Hide". I would like
my application to be set to "Always Show". Is that possible?
Thanks,
Doug Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99652
Accessing a form being created
Hello,
I would like to know if it possible to receive an event or intercept a
message so I can access every form I create in my application. I want to
add some functionality to my forms, but I want to do it in runtime. Is
it possible to be notified every time a new form is created and before
it is shown, so I can access it, for example, to add one specific
control to it or to subscribe an event?
Thanks in advance for any help given.
Regards,
paulo Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99650
Accesing form's components in design time
Hi,
I need to access all components of a winform (controls, and any other
component which does not inherit from System.Windows.Forms.Control) both in
design and run time.
In design time I access the components and iterate through them using form's
Component property, but in run time this property is null. I can access all
the controls using form's Controls property, but I need to access also the
other components such as ContextMenu, ToolTips... which are not Controls.
How can I get this?
Thanks in advance. Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99635
Exception in InitializeComponent
On my test run-time machine my application is generating a "... has
encountered a problem and needs to close..." exception from WITHIN the
InitializeComponent section of my main form. This is curious since if I do a
full install on my development machine it runs without a problem.
This has happened to be before and I traced it that time to a form control
using a font which was not on the target machine (why can't it just use a
default font in this case??), but I've double checked all fonts used this
time, and all seems to be ok.
So my question is in general: how can I find out where it's going down in
cases such as this? The "report contents" generated by the exception seem to
give me little clue. Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99633
mysterious resize behavior...
I have developed a custom Control inheriting from
System.Windows.Forms.Control
It has some children control.
Something really weird happen when I resize it, its children control move!
Even though I have specified Anchor = AnchorStyle.None & Dock =
DockStyle.None (and I checked with the debugger that they still equals to
that).
Any idea why it is so?
I have setup a break point on an event handler of the move event to
understand what's going on. (stack trace below).
starting with #### are the method I implement (but none set
Location/bounds/whatever), very mysterious...
any idea?
> #####
> PowerGui.dll!PowerGui.Grid.DefaultGridCell<System.Windows.Forms.TextBox>.control_Move(object
> sender = {Text = ""}, System.EventArgs e = {System.EventArgs}) Line 265 C#
System.Windows.Forms.dll!System.Windows.Forms.Control.OnMove(System.EventArgs
e) + 0x71 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.OnLocationChanged(System.EventArgs
e = {System.EventArgs}) + 0x26 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.UpdateBounds(int x,
int y, int width, int height, int clientWidth, int clientHeight) + 0x95
bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.UpdateBounds() +
0x1e8 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref
System.Windows.Forms.Message m) + 0x696 bytes
System.Windows.Forms.dll!System.Windows.Forms.TextBoxBase.WndProc(ref
System.Windows.Forms.Message m) + 0x8e bytes
System.Windows.Forms.dll!System.Windows.Forms.TextBox.WndProc(ref
System.Windows.Forms.Message m) + 0x97 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref
System.Windows.Forms.Message m) + 0xd bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref
System.Windows.Forms.Message m) + 0xd6 bytes
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr
hWnd, int msg = 3, System.IntPtr wparam, System.IntPtr lparam) + 0x75 bytes
[Native to Managed Transition]
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref
System.Windows.Forms.Message m = {msg=0x47 (WM_WINDOWPOSCHANGED)
hwnd=0x1a1072 wparam=0x0 lparam=0x3bebca8 result=0x0}) + 0x94 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.DefWndProc(ref
System.Windows.Forms.Message m) + 0xc bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.WmWindowPosChanged(ref
System.Windows.Forms.Message m = {msg=0x47 (WM_WINDOWPOSCHANGED)
hwnd=0x1a1072 wparam=0x0 lparam=0x3bebca8 result=0x0}) + 0x24 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref
System.Windows.Forms.Message m) + 0x7a5 bytes
System.Windows.Forms.dll!System.Windows.Forms.TextBoxBase.WndProc(ref
System.Windows.Forms.Message m) + 0x8e bytes
System.Windows.Forms.dll!System.Windows.Forms.TextBox.WndProc(ref
System.Windows.Forms.Message m) + 0x97 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref
System.Windows.Forms.Message m) + 0xd bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref
System.Windows.Forms.Message m) + 0xd6 bytes
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr
hWnd, int msg = 71, System.IntPtr wparam, System.IntPtr lparam) + 0x75 bytes
[Native to Managed Transition]
[Managed to Native Transition]
System.Windows.Forms.dll!System.Windows.Forms.Control.SetBoundsCore(int x,
int y, int width, int height, System.Windows.Forms.BoundsSpecified specified
= None) + 0x194 bytes
System.Windows.Forms.dll!System.Windows.Forms.TextBoxBase.SetBoundsCore(int
x, int y, int width, int height, System.Windows.Forms.BoundsSpecified
specified) + 0xc4 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds(System.Drawing.Rectangle
bounds, System.Windows.Forms.BoundsSpecified specified) + 0x101 bytes
System.Windows.Forms.dll!System.Windows.Forms.Layout.DefaultLayout.ApplyCachedBounds(System.Windows.Forms.Layout.IArrangedElement
container = {TestNGuiVisual.Grid.GridDemo}) + 0x111 bytes
System.Windows.Forms.dll!System.Windows.Forms.Layout.DefaultLayout.xLayout(System.Windows.Forms.Layout.IArrangedElement
container = {TestNGuiVisual.Grid.GridDemo}, bool measureOnly, out
System.Drawing.Size preferredSize) + 0x164 bytes
System.Windows.Forms.dll!System.Windows.Forms.Layout.DefaultLayout.LayoutCore(System.Windows.Forms.Layout.IArrangedElement
container, System.Windows.Forms.LayoutEventArgs args) + 0x19 bytes
System.Windows.Forms.dll!System.Windows.Forms.Layout.LayoutEngine.Layout(object
container, System.Windows.Forms.LayoutEventArgs layoutEventArgs) + 0x19
bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.OnLayout(System.Windows.Forms.LayoutEventArgs
levent) + 0x78 bytes
#####
PowerGui.dll!PowerGui.Controls.ScrollView.OnLayout(System.Windows.Forms.LayoutEventArgs
levent = {System.Windows.Forms.LayoutEventArgs}) Line 700 + 0xa bytes C#
#####
PowerGui.dll!PowerGui.Grid.GridView.OnLayout(System.Windows.Forms.LayoutEventArgs
levent = {System.Windows.Forms.LayoutEventArgs}) Line 329 + 0x9 bytes C#
System.Windows.Forms.dll!System.Windows.Forms.Control.PerformLayout(System.Windows.Forms.LayoutEventArgs
args) + 0xa7 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.PerformLayout(System.Windows.Forms.Layout.IArrangedElement
affectedElement, string affectedProperty) + 0x2e bytes
System.Windows.Forms.dll!System.Windows.Forms.Layout.LayoutTransaction.DoLayout(System.Windows.Forms.Layout.IArrangedElement
elementToLayout, System.Windows.Forms.Layout.IArrangedElement
elementCausingLayout, string property) + 0x2c bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.OnResize(System.EventArgs
e = {System.EventArgs}) + 0x48 bytes
##### PowerGui.dll!PowerGui.Controls.ScrollView.OnResize(System.EventArgs
e = {System.EventArgs}) Line 605 + 0xb bytes C#
##### PowerGui.dll!PowerGui.Grid.GridView.OnResize(System.EventArgs e =
{System.EventArgs}) Line 297 + 0x9 bytes C# Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99625
Listview selection on group click
Hi,
I am loosing my selected item when user click on a group in details modes.
Causes error and I would always like 1 item to be selected.
Any Ideas? Tag: MonthCalendar - Hot to retrieve the Month(s) displayed? Tag: 99623
How would I determine the first and last day, month and year of the currently
displayed month(s)? Withoutout clicking on the day 1 box?