Clickonce: keep data files on uninstall?
Hi,
I'm getting my first ClickOnce app ready for prime time, but there's still
one thing bothering me:
At this moment I'm using |DataDirectory| to point to the SqlCe database. The
database itself is marked as "data file".
However, when I uninstall my ClickOnce app the SqlCe database is also
removed. What are my options to prevent this? Isolated storage? What would
be my connection string like?
Steven
- - - Tag: XSLT Editor Control Tag: 113820
Location of Taskbar (Top, Bottom, Left or Right)
I'm trying to figure out the location of the taskbar (top, bottom, left or
right). I am creating an owner drawn tooltip for a NotifyIcon and trying to
figure out where to position the form when the user hovers over the
NotifyIcon in the system tray. Is there another way to approach the issue of
the form placement?
Thanks in advance,
Terry Tag: XSLT Editor Control Tag: 113819
scaling UI (higher resolution => bigger buttons + bigger font)
I want to create a UI with Windows Forms that should scale with the
resolution. It's some sort of demonstration UI to be used on
presentations.
For example: my application is always maximized and lets say it
contains 4 big buttons (in 2 rows and 2 columns) that completely fill
the screen.
When it runs on a 800x600 screen it should fill all space. When it
runs on a 1600x1200 screen it should also fill all available space.
I have already used a tableLayoutPanel but this only scales the
controls, not the font.
Is the tableLayoutPanel the right tool for this job? And can it also
dynamically change the fontsize? Tag: XSLT Editor Control Tag: 113818
change location of control
Hi all,
I have a form that inherits from another form.
I want to change the location of a specific control. For this I have a
method in the base form which does only this:
public virtual void SetLocation(int x, int y)
{
myControl.Location = new Point(x, y);
}
I call this method from the inheriting form, like this: base.SetLocation(0,
0);
It doesn't work. The control's location changes but not to (0,0).
When I call this method from inside the base form it does work(changes to
0,0).
It looks like the inheriting form can't touch some certain area.
Can anybody explain to me what may cause this issue, and how to solve it?
Thank you very much Tag: XSLT Editor Control Tag: 113814
Audio Restoration
Hi! All we have working with "Audio Restoration" application, in that
application we need to develop .avi files noise clarification using "audio
restoration" software. First we need to download .avi files from cam to PC
drivers, then we apply "audio restoration" software and do the audio
process. After that we need to save the .avi files in same location in PC
hard drive and also copy the restored files back to the camera over-writing
the unprocessed file. So we need to develop the "Audio Restoration"
software. Is this requirement fullfiled by using ASP.Net 2.0 framework.
Please tell us any information about our application requirement.
Thanking you.
Regards,
Development team. Tag: XSLT Editor Control Tag: 113813
DllImport issue!
Hi All,
I have a dll created using vc++(Unmanaged).So when we are using this
I have to give to full path of this dll as a parameter of DllImport
attribute. The parameter takes only const string value. It will work
fine by hard coding, but what will be case when I deploy this project?
Is there any way to pass the relative path of dll to the DllImport
attribute??
Let me know if more clarification is required about the problem.!!!
Thanks in advance!
Chandan Kumar Tag: XSLT Editor Control Tag: 113803
Embed Form in TabPage
Can somebody provide an example on how to embed a form in a TabPage.
I have a bunch of tabPages that behave pretty much the same, so I created a
base form with the basic functionality and from there I am going to create
instances of that base form and embed them in TabPages, is it possible?
TIA Tag: XSLT Editor Control Tag: 113802
Cannot bind to the property or column on the DataSource.
I'm trying to use the following code to do a very simple databind to a
combobox on a Windows Form. I keep getting the error shown in the code. Can
anyone tell me what I'm doing wrong?
Thanks.
Public Sub CreateDataSetsInitializeBindings()
Dim dsCompany As New DataSet
'create datasets
dsCompany = CreateDataSetCompany()
'initialize bindings
frmRoute.cboCompanyID.DisplayMember = "cmpCompanyID"
frmRoute.cboCompanyID.ValueMember = "cmpCompanyID"
frmRoute.cboCompanyID.DataSource = dsCompany
frmRoute.cboCompanyID.DataBindings.Add("SelectedValue", dsCompany,
"cmpCompanyID")
*** this line returns the error: Cannot bind to the property or column
cmpCompanyID on the DataSource.Parameter name: dataMember***
'clear objects
dsCompany = Nothing
End Sub
Public Function CreateDataSetCompany() As DataSet
Dim daCompany As New OleDb.OleDbDataAdapter()
Dim dsCompany As New DataSet
'Execute the SQL
daCompany = New OleDb.OleDbDataAdapter("SELECT * FROM Company", cnn)
'fill the dataset
daCompany.Fill(dsCompany, "Company")
'return the dataset
CreateDataSetCompany = dsCompany
'clear the objects
daCompany = Nothing
dsCompany = Nothing
End Function Tag: XSLT Editor Control Tag: 113800
Application deployment
Hi there,
I am nearing completion of my first real project in .NET and I'm looking at
the various deployment options. The clickonce alternative seems like the
ideal option for us, but my solution contains sevreal projects which make up
2 .exe files and a few .dll s which must be included in the installation.
It would appear that clickonce deployment only applies to a single solution
file, is there any way to combine multiple exe files into a single clickonce
installation that will take advantage of the autoupdate feature?
I have made a deployment project and that seems to work fine, but I really
need the update procedure of clickonce and if possible want to avoid any
major changes to the project at this stage.
Any help/suggestions are very much appreciated.
Kind regards
Darren Sim Tag: XSLT Editor Control Tag: 113798
DllImport issue for relative path!
Hi All,
I have a dll created using vc++(Unmanaged).So when we are using this
I have to give to full path of this dll as a parameter of DllImport
attribute. The parameter takes only const string value. It will work
fine by hard coding, but what will be case when I deploy this project?
Is there any way to pass the relative path of dll to the DllImport
attribute??
Let me know if more clarification is required about the problem.!!!
Thanks in advance!
Chandan Kumar Tag: XSLT Editor Control Tag: 113795
DllImport issue for relative path!
Hi All,
I have a dll created using vc++(Unmanaged).So when we are using this
I have to give to full path of this dll as a parameter of DllImport
attribute. The parameter takes only const string value. It will work
fine by hard coding, but what will be case when I deploy this project?
Is there any way to pass the relative path of dll to the DllImport
attribute??
Let me know if more clarification is required about the problem.!!!
Thanks in advance!
Chandan Kumar Tag: XSLT Editor Control Tag: 113794
Using ComboBox in DataGridView with custom classes as datasource
Hello.
I'm working on a telephone directory lookup for an application and have
a custom class I would like to show in a datagridview.
The problem is that a person might have more than one mobile phone
registered, but the application expects only one, so the user will have
to choose one. My idea was to use a DataGridViewComboBoxColumn in a
datagridview to let the user choose one of the phone numbers.
This is the class:
public class PersonInfo
{
private string _name;
private string _address;
private string _workPhone;
private string _homePhone;
private string[] _mobilePhone;
public PersonInfo(string name, string address, string workPhone,
string homePhone, string[] mobilePhone)
{
this._name = name;
this._address = address;
this._workPhone = workPhone;
this._homePhone = homePhone;
this._mobilePhone = mobilePhone;
}
public string Name {
get { return _name; }
}
public string Address {
get { return _address; }
}
public string WorkPhone {
get { return _workPhone; }
}
public string HomePhone {
get { return _homePhone; }
}
public string[] MobilePhone {
get { return _mobilePhone; }
}
}
The problem is getting the numbers in the MobilePhone property to show
up. Is this at all possible?
Does anyone have some idea of how to do this? Tag: XSLT Editor Control Tag: 113792
How to disable Start menu or prevent it to open?
Hi,
I need an app to run in kiosk mode, so user will not have access to
start menu and taskbar while the app is running
I was able to hide / show the taskbar with the following code when
app starts / exits
[DllImport("user32.dll", EntryPoint = "FindWindowA")]
static extern int FindWindow(string lpClassName, string
lpWindowName);
[DllImport("user32.dll")]
static extern int SetWindowPos(int hwnd, int hWndInsertAfter,
int x, int y, int cx, int cy, int wFlags);
const int SWP_HIDEWINDOW = 128;
const int SWP_SHOWWINDOW = 64;
static public void HideTaskbar()
{
int intReturn = FindWindow("Shell_traywnd", "");
SetWindowPos(intReturn, 0, 0, 0, 0, 0, SWP_HIDEWINDOW);
}
static public void ShowTaskbar()
{
int intReturn = FindWindow("Shell_traywnd", "");
SetWindowPos(intReturn, 0, 0, 0, 0, 0, SWP_SHOWWINDOW);
}
But users still can access the start menu with Windows button (or
Ctrl
+Esc)
Is there any way to disable start menu too?
Thank you Tag: XSLT Editor Control Tag: 113788
Help - Sudden crashes while editing DataGridView properties!
I have a fairly large winforms project, VB/Dot Net 2.0. While in the midst
of fairly routine editing I have suddenly found myself unable to click on the
'Choose Data Source' dropdown of DataGridView Tasks without crashing Visual
Studio.
This goes for all DataGridViews within the project and only this one
project. It does not matter if the the DataGridView has been setup already
or if it has just been put on the form. I am able to edit DGVs normally in
other projects. I have also tried rebuilding the solution and even
rebooting. Nothing works.
(One of my co-workers has just suggested that the solution itself is corrupt
and I should try creating an entirely new solution and copying over
individual files. I'll probably do that.) Tag: XSLT Editor Control Tag: 113787
Drawing tabs in ListBox.DrawItem event
I have a ListBox, and have changed the DrawMode to DrawMode.OwnerDrawFixed.
I'm using the ListBox.DrawItem event to do some custom coloring in my ListBox
object.
My item strings contain tabs, but after drawing the items myself, the tabs
are not intepreted. Currently I'm just using the sample code given in the
MSDN docs for the event handler:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
private void listBox1_DrawItem(object sender,
System.Windows.Forms.DrawItemEventArgs e)
{
// Set the DrawMode property to draw fixed sized items.
listBox1.DrawMode = DrawMode.OwnerDrawFixed;
// Draw the background of the ListBox control for each item.
e.DrawBackground();
// Define the default color of the brush as black.
Brush myBrush = Brushes.Black;
int mod = e.Index % 3;
// Determine the color of the brush to draw each item based on the index
of the item to draw.
switch (mod)
{
case 0:
myBrush = Brushes.Red;
break;
case 1:
myBrush = Brushes.Orange;
break;
case 2:
myBrush = Brushes.Purple;
break;
}
// Draw the current item text based on the current Font and the custom
brush settings.
e.Graphics.DrawString(listBox1.Items[e.Index].ToString(), e.Font,
myBrush,e.Bounds,StringFormat.GenericDefault);
// If the ListBox has focus, draw a focus rectangle around the selected
item.
e.DrawFocusRectangle();
}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
As I mentioned, my items contain tabs, and when I intercept this event, my
strings look like this:
"Name\taddress\tetc..."
Also, in case it matters, I'm setting my own tab stops in the list box:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
private void SetDeviceListTabStops()
{
// A tab-stop location of 4 equates to the width of one average
character for the specified font
int[] listBoxTabs = new int[] { 20, 75, 110, 160 };
// Send an LB_SETTABSTOPS message to the ListBox control.
int result = SendMessage(this.listBox1.Handle.ToInt32(),
LB_SETTABSTOPS, listBoxTabs.Length, ref listBoxTabs[0]);
// Refresh the List Box control.
this.listBox1.Refresh();
}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Anyone know what I need to set in order for the tabs to be drawn/interpretted? Tag: XSLT Editor Control Tag: 113785
Problem rendering metafile text on bitmap.
Hi,
I have a problem with the quality from metafiles rendered on a
System.Drawing.Bitmap. In particular, text is drawn poorly. If the same
metafile is rendered directly onto a form's drawing surface, the quality is
fine. There's also a problem with scaling, with a difference in size between
the bitmap and directly drawn versions.
The code below illustrates the problem. It draws a string three times. The
top one is the string drawn directly on the form. The middle one is from a
metafile (with the string drawn onto it) drawn directly onto the form. The
bottom one is from the same metafile, rendered onto a bitmap, which is then
drawn onto the form. Top two look fine, bottom one not so good. Any ideas
what I'm doing wrong?
Thanks,
Chris.
Bitmap bitmap;
Metafile metafile;
private void button1_Click(object sender, EventArgs e)
{
using (Graphics formGraphics = CreateGraphics())
{
IntPtr handle = formGraphics.GetHdc();
metafile = new Metafile(handle, EmfType.EmfOnly);
formGraphics.ReleaseHdc();
using (Graphics metaGraphics = Graphics.FromImage(metafile))
{
metaGraphics.DrawString("Test string", new Font("Arial",
14), Brushes.Black, new PointF(0, 0));
}
bitmap = new Bitmap(400, 100);
bitmap.SetResolution(formGraphics.DpiX, formGraphics.DpiY);
using (Graphics bitmapGraphics = Graphics.FromImage(bitmap))
{
bitmapGraphics.DrawImage(metafile, new Point(0, 0));
}
formGraphics.DrawString("Test string", new Font("Arial",
14), Brushes.Black, new PointF(0, 0));
formGraphics.DrawImage(metafile, new Point(0, 50));
formGraphics.DrawImage(bitmap, new Point(0, 100));
}
} Tag: XSLT Editor Control Tag: 113784
What are my options for implementing a horizontal drag/drop contro
I have an interesting problem. I have a set of records in a data table
organized by a simple key. What I want to do is represent these records as
icons on a horizontally oriented control in asending order. Furthermore, I
want to be able to use this display to reorganize the order of the records in
the data table. i.e. If the control is displaying item1, item2, item3, I
want to be able to select item2 and drag it to the left so that the new order
in the data table is item2, item1, item3.
Also I want the control to have horizontal scrolling capability because
there will almost certainly be more than a few of these items.
I have some old code that I might be able to adapt but I'd like to see other
options. Any ideas? Tag: XSLT Editor Control Tag: 113774
Missing Record in Crystal Report
I have a Crystal Report, which DataSource is made up of 2 tables, 1 Header
table and 1 Detail table. The Detail table contains extra details of the
items in the Header table. Not all Header items has a record in the Detail
table. As for my Crystal Report, I'm grouping the records by the Header
table's primary key (which is linked to the Detail table).
I discovered that for those items that does not have a record in the Detail
table, it wont show up in my Crystal Report. What should I do to let those
record appear? Tag: XSLT Editor Control Tag: 113767
Binding DateTimePicker question
Hello,
I thought that my DateTimePicker was bound to my binding source in my entry
form, but it does not behave as though it were.
Here is the AutoGenerated code for that control:
// modifiedDateDateTimePicker
//
this.modifiedDateDateTimePicker.DataBindings.Add(new
System.Windows.Forms.Binding("Value", this.bsMTask, "ModifiedDate", true));
this.modifiedDateDateTimePicker.Enabled = false;
this.modifiedDateDateTimePicker.Location = new
System.Drawing.Point(129, 366);
this.modifiedDateDateTimePicker.Name =
"modifiedDateDateTimePicker";
this.modifiedDateDateTimePicker.Size = new
System.Drawing.Size(200, 20);
this.modifiedDateDateTimePicker.TabIndex = 25;
Here is exception text that is returned when I get the error: "Column
'ModfiedDate' does not allow nulls."
************** Exception Text **************
System.Data.NoNullAllowedException: Column 'ModifiedDate' does not allow
nulls.
at System.Data.DataColumn.CheckNullable(DataRow row)
at System.Data.DataTable.RaiseRowChanging(DataRowChangeEventArgs args,
DataRow eRow, DataRowAction eAction, Boolean fireEvent)
at System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32
proposedRecord, DataRowAction action, Boolean isInMerge, Int32 position,
Boolean fireEvent, Exception& deferredException)
at System.Data.DataTable.InsertRow(DataRow row, Int32 proposedID, Int32
pos, Boolean fireEvent)
at System.Data.DataView.FinishAddNew(Int32 currentIndex, Boolean success)
at System.Data.DataRowView.EndEdit()
at System.Windows.Forms.CurrencyManager.EndCurrentEdit()
at System.Windows.Forms.BindingSource.EndEdit()
at HIP2007.AddEditMasterTask.btnSave_Click(Object sender, EventArgs e) in
M:\HIP2007\HIP2007\Dialogs _ CurrentWork\AddEditMasterTask.cs:line 92
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
I thought that the default value of the DateTimePicker was the value that is
displayed in the control - the current datetime.
BTW I have disabled this control from user interaction so that it will
behave as read only.
What do I do so that today's datetime is by default put into the control so
I do not receive this error?
Thank you.
Doug Tag: XSLT Editor Control Tag: 113766
Catching mouse events on all child controls
Greetings,
I've already tried googling for the following problem, but it seems
every solution I've found is too complex and error prone.
I've got a control (Panel) that acts as a container for several other
controls. These controls, in turn, have several other controls and so
on. I wish to be notified whenever the mouse is hover the area defined
by the container control, regardless of its children. OnMouseEnter and
OnMouseLeave triggers as soon as the mouse enters/leaves a child
control, so I can't use them. Same applies for OnGotFocus/OnLostFocus.
One solution would be to hook upon all events in every child control.
Despite the resulting complexity of event triggering (and the fact
that some controls can simply override the events I'm listening for
and inhibit them), the controls I'm using can (and will) change in run-
time (we are talking about adaptative interfaces here); this would
probably mean that I also need to hook upon the ControlAdded and
ControlRemoved events.
So my question is simple: is there any "clean" way for a control to
know that a mouse is in its area (ClientRectangle)? I don't mind if
the solution involves WndProc...
Best regards and thanks in advance,
Hugo Ferreira Tag: XSLT Editor Control Tag: 113765
Very weird RichTextBox bug
I have tried to make a simple sample of this - but the simple samples all
work. The basic problem is I create a RichTextBox and then call
RichTextBox.LoadFile() to load a rtf file in it.
If the file has an image in it - the control displays nothing and
RichTextBox.Text returns "". If I do the same thing in my simple sample
program, it all works fine.
Where it does not work I have a Word AddIn (IDTExtensibility2, not VSTO)
that uses DevExpress for it's ribbon forms, etc. In it to display the rtf
file I bring up a Form that has a RichTextBox in it and call LoadFile(). And
if the rtf has an image in it I get a blank control.
To try and recreate it I just did a plain old Windows form - no DevExpress
and no Word AddIn. But that works fine. Has anyone ever heard of anything
like this?
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm Tag: XSLT Editor Control Tag: 113761
Set the row background color according to a cell value
Hi,
At this time I'm able to set the background color of a cell depending
on it's value. I'm able to achieve this by extending the
DataGridTextBoxColumn class and overriding the Paint method:
[code]
protected override void Paint(System.Drawing.Graphics g,
System.Drawing.Rectangle bounds, CurrencyManager source, int rowNum,
System.Drawing.Brush backBrush, System.Drawing.Brush foreBrush, bool
alignToRight)
{
if (internalHighlightInformation != null)
{
object objAtRow = GetColumnValueAtRow(source, rowNum);
//(Values A, C and X are just an example, this values
are set at run-time)
if (objAtRow = "B" || objAtRow = "C" || objAtRow =
"X")
{
backBrush = new SolidBrush(Color.Red);
foreBrush = new SolidBrush(Color.White);
}
}
base.Paint(g, bounds, source, rowNum, backBrush,
foreBrush, alignToRight);
}
[/code]
My problem now is, how can I do this to the full row? At this stage I
know the row number, and the cell, but I don't have any access to the
cells that exist in the same row :( (or do I?)
Any ideas? I just cannot figure out how to do this...
Thanks ahead for all the help.
Best Regards,
L. Pinho Tag: XSLT Editor Control Tag: 113757
Beginners question - DataGridView with a combo box column
I have not tried this before. I have a fairly simple table bound to the
grid itself and I want to make one of the columns a combo box. To this end I
bound the grid to the first table and the column to a second. No matter what
I try, I keep getting 'DataGridViewComboBoxCell value is not valid.'
How does one normally set up an arrangement like this and how do I begin
troubleshooting this? Tag: XSLT Editor Control Tag: 113756
I need to be able to trap when the user clicks on a Web Browser control.
So the .NET 2.0 web browser control does not provide a MouseDown or
Click event handler, but I have a need to trap on this. I would like
to know the best approach to accomplish this. I see Enter and Leave
event handlers on the control and I have tried to trap on these and
then check the MouseDown event on the parent, but this doesn't seem to
work.
Is there an approach I can use with API calls. I don't require an 100%
managed solution.
Thanks. Tag: XSLT Editor Control Tag: 113754
ListView - one column
Hi everybody,
I want to have a ListView which has only one column and all the items have
the width of the listview (that is, no room fro subitems since i don't need
them).
It may sound like a ListBox, but I need to have ListViewItems and not
objects in the control.
Thanks in advance,
--
Mihai TÄ?tÄ?ran
H.P.C. Consulting
www.hpc-consulting.ro Tag: XSLT Editor Control Tag: 113752
Component Designer
A great problem on VS2005. After I dropped an object on the design area of a
component, it does not maintain the position assigned. All objects, after
closing and reopening the designer, move on the left of the area.
It's hard to work in this situation. VS2005 SP1 resolves the situation?
Please, help me!!
Loris Tag: XSLT Editor Control Tag: 113746
Component Designer
A great problem on VS2005. After I dropped an object on the designer area,
it does not maintain the position assigned. All objects, after closing and
reopening the designer, move on the left of the area.
It's hard to work in this situation. VS2005 SP1 resolves the problem?
Help me please!
Loris Tag: XSLT Editor Control Tag: 113744
Exceptons when debugging
My VB 2005 winforms application has an Application.ThreadException
handler to catch any unhandled exception.
When debugging, the debugger doesn't stop when I get an exception,
control passes to my application exception handler. Currently I
comment out the handler to be able to get the debugger to stop when an
unhandled exception occurs.
Ideally I would like to have the debugger stop when any exception
occurs, then optionally be able to proceed by having the exception
bubble up. Is this possible? Tag: XSLT Editor Control Tag: 113741
PictureBox.Load and animated GIFs
Loading an animated GIF using PictureBox.Load causes an
ObjectDisposedException with the message "Cannot access a closed file" to be
thrown in the FileStream.Read method ultimately called by
ImageAnimator.UpdateFrames.
Looking at the output from ILDASM, it seems that the underlying file stream
is being disposed in the PictureBox.Load method. However, KB article 814675
states that the stream must not be destroyed for the lifetime of the image.
Can anyone shed some light on whether the .NET framework really is closing
the stream before the image is finished with.
Thanks Tag: XSLT Editor Control Tag: 113739
ClickOnce xamlparse error
Hi
I was trying to use ClickOnce in VS2008 beta2 for my WPF application but got
error after I ran the setup.exe.
Error signature:
...
P9: system.windows.markup.xamlparse
Any thoughts?
--
Leon Tag: XSLT Editor Control Tag: 113738
Autocomplete textbox with dynamic datasource
I know how to use autocomplete with 2.0 framework on a textbox. I also know
how to use COM interop to use the IAutoComplete interface directly.
But with either approach I seem unable to change the list while the user is
typing.
I have an XML document and i want the user to be able to navigate to nodes
by typing in an XPath.
i.e. when the user types /A
it pops up with
/Animals
/Applications
and when they type
/Animals/
it pops up with:
/Animals/Dog
/Animals/Cat
I do NOT want to prepopulate the whole list.
However when using the .NET framework and changing the list I get an 'Access
Violation' exception which is unacceptable.
I tried to use the AutoComplete COM control (IAutoComplete) based upon this
blog entry :
http://jiangsheng.spaces.live.com/blog/cns!1BE894DEAF296E0A!732.entry
Unfortunately the control doesn't 'ask' for an updated list of items as I
type. I've tried all kinds of nasty tricks, like faking an 'Escape' key press
but none are acceptable because of unwanted sideeffects.
I essentially want the same behavior you get with the windows filename
autocompletion, but I dont see how I can achieve this. I might just have to
make my own autocomplete dropdown,but woudl rather not have to do that.
Any suggestions?
-andy Tag: XSLT Editor Control Tag: 113730
WebBrowser (loop automation)
Hello,
Background information â?¦.
I have a VS2005 C# Windows forms app which has several text fields, one
button control and one webbrowser control that I use to display an external
webpage and based on the input data provided by the user, I perform some
tasks on the webpage. The idea is to go automatically go through several web
pages based in data captured by the user until I reach to a desired webpage.
All this works fine,
The user fills the data on the windows form, then clicks on the form's
button and the process starts.
The click method of this button does something like like â?¦
private void btnSendData_Click(object sender, EventArgs e)
{
Uri myUri = new Uri (http://www.externalwebsite/page1.htm);
this.myWebBrowser.Url = myUri;
this.stageSecuence = 1;
}
I use a variable named "stageSecuence" in the next method to perform some
automated tasks depending on the webpage that is being processed.
Then for the webbrowser control I have the following method:
private void myWebBrowser_DocumentCompleted(object sender,
WebBrowserDocumentCompletedEventArgs e)
{
switch (this.stageSecuence)
{
case 1:
// perform some tasks like invoking the submit on the web page
this.stageSecuence++;
case 2:
// perform some other tasks
this.stageSecuence++;
// and so on
}
Current situation,
Now, instead of executing this automation on the webpage based on the data
manually typed by the user; I want to call this process several times based
on some database information.
I wrote the following code to perfom a loop (hoping to call sereval times
the automation process)
for (int i = 0; i < this.numberOfTableRecords; i++)
{
// get record info
Uri myUri = new Uri (http://www.externalwebsite/page1.htm);
this.myWebBrowser.Url = myUri;
this.stageSecuence = 1;
}
By doing this I only get the myWebBrowser_DocumentCompleted method executed
only once for the last record of the loop; in fact this method is executed
once the loop has finished.
How can I get the DocumentCompleted method executed once for every record in
the loop ?
Can I call this method manually such as:
this.myWebBrowser_DocumentCompleted( â?¦ ) ??
Thanks in advance,
Cesar Tag: XSLT Editor Control Tag: 113727
Word 2007 symbols problem
I recently got word 2007 on my windows vista computor and no matter what I do
when i push the slash/question mark it puts a french e in it's place. Tag: XSLT Editor Control Tag: 113726
Layout MDI problems with more than 3 windows
Hello,
When i use LayoutMdi with TileHorizontal or TileVertical and more than 3
windows the result is not the expected one and is the same.
When i TileVertical 4 windows i want them
===
=1=
===
=2=
===
=3=
===
=4=
===
(like ALL windows application does) but i got them :
======
=1==2=
======
=3==4=
======
If TileHorizontal : the result is the same.
Example VB Code :
You open a new windows application and paste this in Form1.vb
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Me.MdiParent Is Nothing Then
Me.IsMdiContainer = True
For i As Integer = 1 To 4
Dim f As Form1 = New Form1
f.MdiParent = Me
f.Show()
Next i
Me.LayoutMdi(MdiLayout.TileVertical)
End If
End Sub
Thanks,
Olivier Tag: XSLT Editor Control Tag: 113722
Non-English Warnings
When I use OpenFileDialog.ShowDialog(), the dialog is in Dutch (which is
fine for the moment). It says 'Bestandsnaam' for Filename,
'Bestandstypen' for File Types etc. But when I select a non-existing
file, the warning is in English. How can I change the warnings to Dutch
(or to any other language)? Tag: XSLT Editor Control Tag: 113720
Inconsistent image behavior in a Winforms app.
I'm writing a Winforms app in Dot Net 2.0. I created a few PNG images for
use as button images in order to liven up appearances a bit. I thought I had
given the images a transparent background using Paint.Net and they display
correctly on my own computer (a lenovo T60p laptop). However when the app is
run on another computer (A Dell desktop with a flat monitor, if I remember
correctly) the images have a white background. (The actual button background
color is the system default grey. I have not changed that.)
Am I forgetting some setting? Tag: XSLT Editor Control Tag: 113719
Delete key in DataGridViewComboBoxCell
I have a DataGridViewComboBoxCell in a DataGridView. When it is
selected and
the user presses Delete key it is reseted to default value (or first
value in
ComboBox).
How can I override this default behavior and delete entire row
instead?
Thanks,
Peter Tag: XSLT Editor Control Tag: 113716
Capturing Shift+Return when AcceptButton is used
Hi,
I've got a search form with the search button used as AcceptButton for
the form and everything works as expected. However, I want to be able
to capture not only Return, but also Shift+Return in which case I want
to change some settings and then perform the search as normal.
As I understand it, when an AcceptButton is used the form's KeyDown
event handler doesn't receive the Return key event even with
KeyPreview on. If I remove the AcceptButton the Return key event gets
through as expected. Is there a good way to find out whether Shift is
currently pressed form within the accept button's Click event handler?
Is there a way to display the search button with "AcceptButton style"
without it actually being accept button?
Any thoughts would be appreciated!
Regards
Henrik Jernevad Tag: XSLT Editor Control Tag: 113714
.net controls advice
Hi
I am contemplating purchasing either Infragistics or DV Express .net
controls. I need advise on which one is better if any. I need the usual
controls that both offer i.e. grid, tab, explorer bars etc.
Many Thanks
Regards Tag: XSLT Editor Control Tag: 113711
Disable Close button and remove Close menu and then reactivate
In Vs2005 i need to disable the Close button and remove Close Menu and then
reactivate them.
I have found how to disable Close button and remove close menu, but i
haven't found how to reactivate them.
Does someone knows how to reactivate them?
This is how i disable close button and remove close menu:
----
<DllImport("user32.dll")> Private Shared Function GetSystemMenu(ByVal hWnd
As IntPtr, ByVal wMsg As Boolean) As IntPtr
End Function
<DllImport("user32.dll")> Private Shared Function RemoveMenu(ByVal hWnd As
IntPtr, ByVal uPosition As Int32, ByVal uFlags As Int32) As Boolean
End Function
<DllImport("user32.dll")> Private Shared Function SendMessage(ByVal hWnd As
IntPtr, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32)
As Int32
End Function
Private Const SC_CLOSE As Int32 = &HF060
Private Const MF_BYCOMMAND As Int32 = 0
Private Const WM_NCACTIVATE As Int32 = &H86
Private Sub DeactivateCloseButtonAndMenu()
Dim hMenu As IntPtr
hMenu = GetSystemMenu(Me.Handle, False)
RemoveMenu(hMenu, SC_CLOSE, MF_BYCOMMAND)
SendMessage(Me.Handle, WM_NCACTIVATE, 0, 0)
SendMessage(Me.Handle, WM_NCACTIVATE, 1, 0)
End Sub
----
Thanks. Tag: XSLT Editor Control Tag: 113710
Lost Main Id Emails after HP system restore
Hi
Last night did a full system restore using HP F11 function on boot up. Now i
have lost all my Parteners old emailsand she was the main Account in OutLook
Exspress 6. I can find my emails just not sign of hers at all any where.
Please Help she is not best pleased. Im running XP home SP2.
Thanks for Reading
Tom Tag: XSLT Editor Control Tag: 113709
clickonce applications on linux with mono project?
Hi,
I want to known if I can run clickonce applications on linux or Mac.
Specially I want to run Report Builder.
From what I see the .application is not loaded from the web site.
so I manually copy the reportbuilder folder and try to run it, but nothing
appears.
so... any guide?
do you know if its possible?
thanks.
Jerome. Tag: XSLT Editor Control Tag: 113708
printing source code from vs 2005 solution
is there a utility program, other than 'VS.Net Code Print', that can print
source code from a visual studio 2005 solution? 'VS.Net Code Print' is
buggy and crashes before completing the print of my solution.
Thanks!!! Tag: XSLT Editor Control Tag: 113707
Grid view readonly property
I am having problem with the fallowing piece of code
foreach (DataGridViewRow Rows in prePDDataGridView.Rows) {
Rows.DefaultCellStyle = null;
Rows.ReadOnly = true;
DataGridViewDisableButtonCell buttonCellSave =
(DataGridViewDisableButtonCell)Rows.Cells["Save"];
buttonCellSave.Enabled = false;
}
The above code will make all the rows in data grid view as readonly and the
button cell to disable.
The above code works properly when i made the form as non MDI child.
But it does not work if i made the form as MDI Child.
I dont know what is the reason. Any solution for this ? Tag: XSLT Editor Control Tag: 113703
Threading question
Let's say I have an event handler that spawns another thread
In that original event handler, is there a way to check, and do something
ONLY after the thread is complete? Tag: XSLT Editor Control Tag: 113696
A treeView node with multiple columns?
Hello, friends,
I need to have multiple columns in a TreeView node. How can I do this?
Thanks a lot. Tag: XSLT Editor Control Tag: 113695
printing source code
is there a utility program, other than 'VS.Net Code Print', that can print
source code from a visual studio 2005 solution? 'VS.Net Code Print' is
buggy and crashes before completing the print of my solution.
Thanks!!! Tag: XSLT Editor Control Tag: 113690
binding CheckBox.Enabled to ComboBox selection
I have a combo which is bound to a List<MyCustomObject>.
One of the properties of MyCustomObject is a boolean which I would like to
bind to a checkbox so that depending on the selection on the combobox, the
checkbox below it would get enabled/disabled accordingly.
How can this be achieved through databinding? I don't want to implement
this through any event handling - just pure databinding.
My initial effort was this:
checkbox.DataBindings.Add("Enabled", combobox,
"SelectedItem.MyBooleanProperty");
However, the above code does not work.
Thanks Tag: XSLT Editor Control Tag: 113688
RTF Parsing super/subscript
I'm looking for some sample code to implement super and subscript in an RTF
control w/o using the baseline offset and font size division/multiplication.
I want to actually use the \super and \sub tags from the RTF spec. Even some
open source RTF editor would be fine. Java or C++ source would even be
acceptable.
Thanks
Brian Tag: XSLT Editor Control Tag: 113685
Where is the application setting file?
Hello, friends,
As you know, we use application settings to store and retrieve property
settings (such as window form size/location) for our application for each
user.
But, I could not find the file that stores all these info after running our
app. (I think it should be under C:\Documents and Settings, but just could
not find).
Any ideas? Thanks a lot. Tag: XSLT Editor Control Tag: 113672
Hi, Anyone know any XSLT editor control to use in .net windows desktop
applications?